Skip to content

Commit

Permalink
Fix type conversion error in polaris_aws_exocompute (#209)
Browse files Browse the repository at this point in the history
During a prior refactoring, a new type was introduced for AWS regions
to handle cases where the same region has multiple representations in
the GraphQL API. This type was not properly converted in all code
paths.
  • Loading branch information
johan3141592 authored Nov 27, 2024
1 parent 3432040 commit 1a276fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/provider/resource_aws_exocompute.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func awsReadExocompute(ctx context.Context, d *schema.ResourceData, m interface{
return diag.FromErr(err)
}

if err := d.Set(keyRegion, exoConfig.Region); err != nil {
if err := d.Set(keyRegion, exoConfig.Region.Name()); err != nil {
return diag.FromErr(err)
}

Expand All @@ -274,8 +274,8 @@ func awsReadExocompute(ctx context.Context, d *schema.ResourceData, m interface{
return diag.FromErr(err)
}
subnets := schema.Set{F: schema.HashString}
subnets.Add(exoConfig.Subnet1)
subnets.Add(exoConfig.Subnet2)
subnets.Add(exoConfig.Subnet1.ID)
subnets.Add(exoConfig.Subnet2.ID)
if err := d.Set(keySubnets, &subnets); err != nil {
return diag.FromErr(err)
}
Expand Down

0 comments on commit 1a276fe

Please sign in to comment.