Trying to use lifecycle -> ignore_changes -> destination_flow_config, but it is not working as expected

58 Views Asked by At

I am trying to create an aws appflow flow using terraform `Terraform v1.5.7 on darwin_amd64

  • provider registry.terraform.io/hashicorp/aws v5.27.0
  • provider registry.terraform.io/hashicorp/template v2.2.0`

here is my destination flow config

  destination_flow_config {
    connector_type = "S3"
    destination_connector_properties {
      s3 {
        bucket_name = "${var.s3_bucket}"
        bucket_prefix = "appflow/sfdc"
        s3_output_format_config {
          file_type = "PARQUET"
          preserve_source_data_typing = true
          prefix_config {
          }
        }
      }
    }
  }

I am trying to disable the default partitioning appflow does based on execution ID, but terraform doesn't support that yet; https://github.com/hashicorp/terraform-provider-aws/issues/34638

  lifecycle {
    ignore_changes = [
      "destination_flow_config"
    ]
  }

So, the next thing I tried was to manually disable the partition using AWS console Now, I am trying to use the lifecycle block to avoid terraform from overriding manual disable of execution ID

After I did a terraform apply on this, it still changed the flow config and updated the partition value; I am not sure why? Has anyone faced a similar issue before?

terraform apply does update the resource even when I tried to include

  lifecycle {
    ignore_changes = [
      "destination_flow_config"
    ]
  }

Expected: It should keep the Partition Disabled

0

There are 0 best solutions below