Skip to content

Commit e1f4607

Browse files
authored
feat(provider): allow override of organization_id in provider (#1386)
1 parent 7143c71 commit e1f4607

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scaleway/provider.go

+9
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ func Provider(config *ProviderConfig) plugin.ProviderFunc {
8080
Description: "The Scaleway project ID.",
8181
ValidateFunc: validationUUID(),
8282
},
83+
"organization_id": {
84+
Type: schema.TypeString,
85+
Optional: true,
86+
Description: "The Scaleway organization ID.",
87+
ValidateFunc: validationUUID(),
88+
},
8389
"region": regionSchema(),
8490
"zone": zoneSchema(),
8591
"api_url": {
@@ -311,6 +317,9 @@ func loadProfile(ctx context.Context, d *schema.ResourceData) (*scw.Profile, err
311317
if projectID, exist := d.GetOk("project_id"); exist {
312318
providerProfile.DefaultProjectID = scw.StringPtr(projectID.(string))
313319
}
320+
if orgID, exist := d.GetOk("organization_id"); exist {
321+
providerProfile.DefaultOrganizationID = scw.StringPtr(orgID.(string))
322+
}
314323
if region, exist := d.GetOk("region"); exist {
315324
providerProfile.DefaultRegion = scw.StringPtr(region.(string))
316325
}

0 commit comments

Comments
 (0)