chore(terraform): refactor region overrides in mapping funcs (#872)
This commit is contained in:
parent
0272a86292
commit
5e5404b459
31 changed files with 185 additions and 194 deletions
|
|
@ -226,14 +226,11 @@ func (r *credentialsGroupResource) Read(ctx context.Context, req resource.ReadRe
|
|||
}
|
||||
projectId := model.ProjectId.ValueString()
|
||||
credentialsGroupId := model.CredentialsGroupId.ValueString()
|
||||
region := model.Region.ValueString()
|
||||
region := r.providerData.GetRegionWithOverride(model.Region)
|
||||
|
||||
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.GetRegion()
|
||||
}
|
||||
|
||||
found, err := readCredentialsGroups(ctx, &model, region, r.client)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue