Skip to content

Commit

Permalink
fix(r_aws_mwaa_environment): Changing the KMS key used by MWAA should…
Browse files Browse the repository at this point in the history
… recreation of the Airflow environment

This is currently an issue when updating the cluster from `aws/airflow` KMS key to a CMK for example. The current implementation will show a diff, apply an update to the cluster but will not be able to change to another KMS key leading to a perpetual diff.

```
Terraform will perform the following actions:

  # module.airflow[0].aws_mwaa_environment.airflow will be updated in-place
  ~ resource "aws_mwaa_environment" "airflow" {
        id                              = "myairflow"
      + kms_key                         = "arn:aws:kms:us-east-1:redacted:key/redacted"
        name                            = "myairflow"
        tags                            = {
            "Name"                 = "myairflow"
        }
        # (21 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
```
  • Loading branch information
jphuynh committed Jun 29, 2021
1 parent fe9b6ad commit f67f2af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aws/resource_aws_mwaa_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func resourceAwsMwaaEnvironment() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ForceNew: true,
},
"last_updated": {
Type: schema.TypeList,
Expand Down

0 comments on commit f67f2af

Please sign in to comment.