hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

[Enhancement]: add ecs_service support for tag_specifications in volume_configuration with managed_ebs_volume #38486

Open HannesVDM98 opened 1 month ago

HannesVDM98 commented 1 month ago

Description

Add support for the ecs_service → volume_configuration → managed_ebs_volume → tag_specifications variable as is provided by AWS, see documentation at: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/configure-ebs-volume.html#ebs-volume-tagging on tagging EBS volumes managed by the ECS runtime.

{
   "cluster": "mycluster",
   "taskDefinition": "mytaskdef",
   "serviceName": "mysvc",
   "desiredCount": 2,
   "enableECSManagedTags": true,
   "volumeConfigurations": [
        {
            "name": "datadir",
            "managedEBSVolume": {
                "volumeType": "gp3",
                "sizeInGiB": 100,

Include:

                "tagSpecifications": [
                    {
                        "resourceType": "volume", 
                        "tags": [
                            {
                                "key": "key1", 
                                "value": "value1"
                            }
                        ], 
                        "propagateTags": "NONE"
                    }
                ]
                "roleArn":"arn:aws:iam:1111222333:role/ecsInfrastructureRole",
                "encrypted": true,
                "kmsKeyId": "arn:aws:kms:region:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
            }
        }
   ]
}

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

managed_ebs_volume {
        role_arn = string
        encrypted = bool
        file_system_type = string
        iops = number
        kms_key_id = string
        size_in_gb = number
        snapshot_id = string
        throughput = number
        volume_type = string
        tag_specifications = list(string)
      }

References

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/configure-ebs-volume.html#ebs-volume-tagging

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

trutled3 commented 1 month ago

I am interested in working on this issue.