Skip to content

Commit

Permalink
chore: mini refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wanisfahmyDE committed Jan 8, 2025
1 parent 5c18c87 commit b9736bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/provider/resource_aws_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ func resourceAWSAccountUpdate(ctx context.Context, d *schema.ResourceData, m int

scconn := servicecatalog.NewFromConfig(cfg)
organizationsconn := organizations.NewFromConfig(cfg)
sso := d.Get("sso").([]interface{})[0].(map[string]interface{})

if d.HasChangesExcept("tags", "organizational_unit_id_on_delete", "close_account_on_delete") {
productId, artifactId, err := findServiceCatalogAccountProductId(ctx, scconn)
Expand All @@ -365,7 +366,6 @@ func resourceAWSAccountUpdate(ctx context.Context, d *schema.ResourceData, m int
name := d.Get("name").(string)
email := d.Get("email").(string)
ou := d.Get("organizational_unit").(string)
sso := d.Get("sso").([]interface{})[0].(map[string]interface{})

// Create a new parameters struct.
params := &servicecatalog.UpdateProvisionedProductInput{
Expand Down Expand Up @@ -429,7 +429,6 @@ func resourceAWSAccountUpdate(ctx context.Context, d *schema.ResourceData, m int
}
}

sso := d.Get("sso").([]interface{})[0].(map[string]interface{})
isRemoveAccountAssignmentOnUpdate := sso["remove_account_assignment_on_update"].(bool)

if d.HasChange("sso") && isRemoveAccountAssignmentOnUpdate {
Expand Down

0 comments on commit b9736bf

Please sign in to comment.