Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alks_iamrole does not get recreated when include_default_policies is changed from true to false #133

Open
apottere opened this issue May 24, 2021 · 0 comments
Labels

Comments

@apottere
Copy link

apottere commented May 24, 2021

Plan

  # alks_iamrole.ec2-role must be replaced
+/- resource "alks_iamrole" "ec2-role" {
      ~ arn                      = "arn:aws:iam::247721768464:role/acct-managed/ec2-widget-tunnel-us-east-1" -> (known after apply)
      ~ id                       = "ec2-widget-tunnel-us-east-1" -> (known after apply)
      ~ include_default_policies = true -> false # forces replacement
      ~ ip_arn                   = "arn:aws:iam::247721768464:instance-profile/acct-managed/ec2-widget-tunnel-us-east-1" -> (known after apply)
        name                     = "ec2-widget-tunnel-us-east-1"
      ~ role_added_to_ip         = true -> (known after apply)
        # (2 unchanged attributes hidden)
    }

Expected Behavior

Role is recreated.

Actual Behavior

╷
│ Error: Error creating role: [zmdd8yjb] Role already exists with the same name: ec2-widget-tunnel-us-east-1
│ 
│   with alks_iamrole.ec2-role,
│   on iam.tf line 3, in resource "alks_iamrole" "ec2-role":
│    3: resource "alks_iamrole" "ec2-role" {

This can be bypassed by manually deleting the role through ALKS and reapplying terraform.

Terraform 0.15.x
ALKS Terraform Provider 1.5.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants