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.85k stars 9.19k forks source link

[Enhancement]: Add support for VPC Lattice Configurations to AWS ECS Service #40176

Open s3cube opened 4 hours ago

s3cube commented 4 hours ago

Description

AWS ECS Service now supports VPC Lattice Configurations

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

Potential Terraform Configuration

resource "aws_ecs_service" "test_cluster" {
    name = "vpcLatticeService"
    task_definition = "vpclattice:1"
    network_configuration {
        assign_public_ip = true
        subnets = [ aws_subnet.public_vpcl_subnet.id ]
        security_groups = [ aws_security_group.vpcl_sg.id ]
    }
    vpc_lattice_configurations = {
        role_arn = aws_iam_role.test_infrastructure_role.arn
        target_group_arn = aws_vpclattice_target_group.test_tg.arn
        port_name="vpcl"
    }

    vpc_lattice_configurations = {
        role_arn = aws_iam_role.test_infrastructure_role1.arn
        target_group_arn = aws_vpclattice_target_group.test_tg1.arn
        port_name="vpcl1"
    }
    desired_count = 1
    launch_type = "FARGATE"
}

References

[1] Developer Guide: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-vpc-lattice.html [2] API Documentation: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_VpcLatticeConfiguration.html [3] CFN Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-vpclatticeconfiguration.html [4] Blog: https://aws.amazon.com/blogs/aws/streamline-container-application-networking-with-native-amazon-ecs-support-in-amazon-vpc-lattice/

Would you like to implement a fix?

Yes

github-actions[bot] commented 4 hours ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue