File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ resource "aws_ecs_cluster" "fargate_cluster" {
1717resource "aws_ecs_cluster_capacity_providers" "default" {
1818 cluster_name = join (" " , aws_ecs_cluster. fargate_cluster . * . name )
1919
20- capacity_providers = [ " FARGATE_SPOT " , " FARGATE " ]
20+ capacity_providers = var . capacity_providers
2121
2222 default_capacity_provider_strategy {
2323 capacity_provider = var. default_capacity_provider
2424 weight = 100
25+ base = 1
2526 }
2627}
2728
@@ -30,5 +31,5 @@ resource "aws_service_discovery_private_dns_namespace" "default" {
3031 name = join (" ." , [module . this . namespace , " local" ])
3132 description = module. this . id
3233 vpc = var. vpc_id
33- tags = module. this . tags
34+ tags = module. this . tags
3435}
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ variable "default_capacity_provider" {
1010 default = " FARGATE"
1111}
1212
13+ variable "capacity_providers" {
14+ type = list (string )
15+ description = " List of capacity providers for the ECS cluster. Valid values are FARGATE, FARGATE_SPOT. The default is FARGATE."
16+ default = [" FARGATE" ]
17+ }
18+
1319variable "container_insights_enabled" {
1420 type = bool
1521 description = " Whether to enable Container Insights on the cluster"
Original file line number Diff line number Diff line change 11terraform {
2- required_version = " >= 0.13 .0"
2+ required_version = " >= 1.0 .0"
33
44 required_providers {
5- aws = " >= 3.0 .0"
5+ aws = " >= 5.93 .0"
66 }
77}
You can’t perform that action at this time.
0 commit comments