fix: new region field in object storage forces recreation (#689)
This commit is contained in:
parent
67f5fe37b9
commit
8f2435be05
3 changed files with 9 additions and 0 deletions
|
|
@ -248,6 +248,9 @@ func (r *bucketResource) Read(ctx context.Context, req resource.ReadRequest, res
|
|||
projectId := model.ProjectId.ValueString()
|
||||
bucketName := model.Name.ValueString()
|
||||
region := model.Region.ValueString()
|
||||
if region == "" {
|
||||
region = r.providerData.Region
|
||||
}
|
||||
|
||||
ctx = tflog.SetField(ctx, "project_id", projectId)
|
||||
ctx = tflog.SetField(ctx, "name", bucketName)
|
||||
|
|
|
|||
|
|
@ -346,6 +346,9 @@ func (r *credentialResource) Read(ctx context.Context, req resource.ReadRequest,
|
|||
credentialsGroupId := model.CredentialsGroupId.ValueString()
|
||||
credentialId := model.CredentialId.ValueString()
|
||||
region := model.Region.ValueString()
|
||||
if region == "" {
|
||||
region = r.providerData.Region
|
||||
}
|
||||
|
||||
ctx = tflog.SetField(ctx, "project_id", projectId)
|
||||
ctx = tflog.SetField(ctx, "credentials_group_id", credentialsGroupId)
|
||||
|
|
|
|||
|
|
@ -249,6 +249,9 @@ func (r *credentialsGroupResource) Read(ctx context.Context, req resource.ReadRe
|
|||
ctx = tflog.SetField(ctx, "project_id", projectId)
|
||||
ctx = tflog.SetField(ctx, "credentials_group_id", credentialsGroupId)
|
||||
ctx = tflog.SetField(ctx, "region", region)
|
||||
if region == "" {
|
||||
region = r.providerData.Region
|
||||
}
|
||||
|
||||
found, err := readCredentialsGroups(ctx, &model, region, r.client)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue