Created
March 11, 2020 12:19
-
-
Save AndrewBestbier/997194dd657815c2cf4f20987716df4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "aws_ecs_service" "my_first_service" { | |
| name = "my-first-service" # Naming our first service | |
| cluster = "${aws_ecs_cluster.my_cluster.id}" # Referencing our created Cluster | |
| task_definition = "${aws_ecs_task_definition.my_first_task.arn}" # Referencing the task our service will spin up | |
| launch_type = "FARGATE" | |
| desired_count = 3 # Setting the number of containers we want deployed to 3 | |
| network_configuration { | |
| subnets = ["${aws_default_subnet.default_subnet_a.id}", "${aws_default_subnet.default_subnet_b.id}", "${aws_default_subnet.default_subnet_c.id}"] | |
| assign_public_ip = true # Providing our containers with public IPs | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment