Fix/stackittpr 102 objectstorage handling region in individual resources (#711)

* Revert "fix: make resource/data-source specific region attribute read-only (#682)"

This reverts commit 3e8dcc542b.

* fix: Support individual regions

* fix: review findings
This commit is contained in:
Rüdiger Schmitz 2025-03-12 10:49:47 +01:00 committed by GitHub
parent 81f876adea
commit c257ac49e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 176 additions and 143 deletions

View file

@ -60,7 +60,7 @@ func (r *clusterDataSource) Configure(ctx context.Context, req datasource.Config
} else {
apiClient, err = ske.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}

View file

@ -267,7 +267,7 @@ func (r *clusterResource) Configure(ctx context.Context, req resource.ConfigureR
} else {
skeClient, err = ske.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}
@ -284,7 +284,7 @@ func (r *clusterResource) Configure(ctx context.Context, req resource.ConfigureR
} else {
enablementClient, err = serviceenablement.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}

View file

@ -86,7 +86,7 @@ func (r *kubeconfigResource) Configure(ctx context.Context, req resource.Configu
} else {
apiClient, err = ske.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}

View file

@ -62,7 +62,7 @@ func (r *projectDataSource) Configure(ctx context.Context, req datasource.Config
} else {
apiClient, err = ske.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}
@ -79,7 +79,7 @@ func (r *projectDataSource) Configure(ctx context.Context, req datasource.Config
} else {
enablementClient, err = serviceenablement.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}

View file

@ -74,7 +74,7 @@ func (r *projectResource) Configure(ctx context.Context, req resource.ConfigureR
} else {
apiClient, err = ske.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}
@ -91,7 +91,7 @@ func (r *projectResource) Configure(ctx context.Context, req resource.ConfigureR
} else {
enablementClient, err = serviceenablement.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithRegion(providerData.Region),
config.WithRegion(providerData.GetRegion()),
)
}