Skip to content

Commit

Permalink
fix: preserve back compat in path_id behavior
Browse files Browse the repository at this point in the history
If the path_id is not configured it should also not be submitted, even
if we have it in the state. This is to preserve the portability that we
had in previous versions (e.g. when Terraform is executed with different
credentials).
  • Loading branch information
heiko.rothe committed Jan 26, 2022
1 parent 3300097 commit 0f7620c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/provider/resource_aws_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ func resourceAWSAccountUpdate(ctx context.Context, d *schema.ResourceData, m int
}

// Optionally add the path id.
if v, ok := d.GetOk("path_id"); ok {
params.PathId = aws.String(v.(string))
if pathIdConfig := d.GetRawConfig().GetAttr("path_id"); !pathIdConfig.IsNull() {
params.PathId = aws.String(pathIdConfig.AsString())
}

accountMutex.Lock()
Expand Down

0 comments on commit 0f7620c

Please sign in to comment.