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

aws_mwaa_environment gets destroyed and recreated unnecessarily #32

Open
samperetz opened this issue May 24, 2023 · 3 comments
Open

aws_mwaa_environment gets destroyed and recreated unnecessarily #32

samperetz opened this issue May 24, 2023 · 3 comments

Comments

@samperetz
Copy link

I'm seeing a behavior in aws_mwaa_environment that I was not seeing previously. With hashicorp/aws v4.64.0, every time I deploy, it destroys and recreates the aws_mwaa_environment with this message shown in the terraform apply:

  ~ network_configuration {
      ~ security_group_ids = [
          - "sg-xxxxxxxxx",
        ] -> (known after apply)
      ~ subnet_ids         = [ # forces replacement
          - "subnet-xxxxxxxxx",
          - "subnet-yyyyyyyyy",
        ] -> (known after apply)
    }
}

Even though the subnet_ids are exactly the same every single time, it indicates that they have changed and therefore that is forcing replacement.

Originally these 2 subnet_ids were coming from an aws_subnet data block, with filter that resulted in those 2 exact same subnet_ids every time. Just as a test, I simply hardcoded the 2 subnet_ids in the aws_mwaa_environment resource block:

subnet_ids = ["subnet-xxxxxxxxx", "subnet-yyyyyyyyy"]

But even hardcoded, I get the same behavior.

@dlleu
Copy link

dlleu commented Jul 11, 2024

+1 on this issue. Even without any changes at all, whenever I run plan, TF wants to recreate the environment.

@dlleu
Copy link

dlleu commented Aug 15, 2024

Later update on this matter: This is not an issue of this module, I moved to "vanilla" terraform in my project and the same happens. So, I can only conclude that the issue is in the official terraform aws provider.

@TiansuYu
Copy link

I am also seeing the same issue. Though the change I applied is only about tagging.

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

No branches or pull requests

3 participants