Skip to content

Documentation update : ECS Cluster Fargate Storage configuration #45545

@NicolasA-arch

Description

@NicolasA-arch

Documentation Link(s)

https://registry.terraform.io/providers/-/aws/6.25.0/docs/resources/ecs_cluster#fargate_ephemeral_storage_kms_key_id-6

Description

Tiny update that will lead to removing un-necessary chatty useless update

When defining an ECS Fargate Cluster, in configuration block there is a managed_storage_configuration sub-block where you can define the fargate_ephemeral_storage_kms_key_id parameter.
It is documented as needing the kms key id but this is the ARN that is needed.
If you submit the key id it does work but terraform Plan always propose an id -> arn update.

Before

resource "aws_ecs_cluster" "some_cluster" {
  name = "some-cluster"

  configuration {
      managed_storage_configuration {
        fargate_ephemeral_storage_kms_key_id = aws_kms_key.fargate_storage.id
      }
    }
  }

Will always lead to terraform plan updating key id to key ARN
And terraform apply actually really trigger an update.

      ~ configuration {
          ~ managed_storage_configuration {
              ~ fargate_ephemeral_storage_kms_key_id = "arn:aws:kms:ap-southeast-2:xxxxxxxxxxxx:key/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -> "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

After

resource "aws_ecs_cluster" "some_cluster" {
  name = "some-cluster"

  configuration {
      managed_storage_configuration {
        fargate_ephemeral_storage_kms_key_id = aws_kms_key.fargate_storage.arn
      }
    }
  }

Terraform plan and update are both clean.

References

No response

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIntroduces or discusses updates to documentation.needs-triageWaiting for first response or review from a maintainer.service/ecsIssues and PRs that pertain to the ecs service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions