-
-
Notifications
You must be signed in to change notification settings - Fork 357
chore: Update to use current upstream modules #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
d0cbbc4
8f906d5
ab0b80f
39bde8e
4f54395
e4f1bec
23b17eb
345f4cf
d48a2d7
7c34027
1aafa48
c5628d8
337bac9
af15df2
67ef71c
b33e105
4f3449b
18bab4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,10 +1,10 @@ | ||||||
terraform { | ||||||
required_version = ">= 1.0" | ||||||
required_version = ">= 1.10" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we are only raising to
Suggested change
|
||||||
|
||||||
required_providers { | ||||||
aws = { | ||||||
source = "hashicorp/aws" | ||||||
version = ">= 5.0" | ||||||
version = ">= 6.4" | ||||||
} | ||||||
|
||||||
github = { | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ locals { | |
|
||
module "alb" { | ||
source = "terraform-aws-modules/alb/aws" | ||
version = "9.1.0" | ||
version = "9.17.0" | ||
|
||
create = var.create && var.create_alb | ||
|
||
|
@@ -168,7 +168,7 @@ module "alb" { | |
|
||
module "acm" { | ||
source = "terraform-aws-modules/acm/aws" | ||
version = "5.0.0" | ||
version = "6.1.0" | ||
|
||
create_certificate = var.create && var.create_certificate && var.create_alb | ||
|
||
|
@@ -199,18 +199,19 @@ locals { | |
|
||
module "ecs_cluster" { | ||
source = "terraform-aws-modules/ecs/aws//modules/cluster" | ||
version = "5.11.0" | ||
version = "6.1.1" | ||
|
||
create = var.create && var.create_cluster | ||
|
||
# Cluster | ||
cluster_name = try(var.cluster.name, var.name) | ||
cluster_configuration = try(var.cluster.configuration, {}) | ||
cluster_settings = try(var.cluster.settings, { | ||
name = "containerInsights" | ||
value = "enabled" | ||
name = try(var.cluster.name, var.name) | ||
configuration = try(var.cluster.configuration, {}) | ||
setting = try(var.cluster.settings, [ | ||
{ | ||
name = "containerInsights" | ||
value = "enabled" | ||
} | ||
) | ||
]) | ||
|
||
# Cloudwatch log group | ||
create_cloudwatch_log_group = try(var.cluster.create_cloudwatch_log_group, true) | ||
|
@@ -219,20 +220,20 @@ module "ecs_cluster" { | |
cloudwatch_log_group_tags = try(var.cluster.cloudwatch_log_group_tags, {}) | ||
|
||
# Capacity providers | ||
fargate_capacity_providers = try(var.cluster.fargate_capacity_providers, {}) | ||
default_capacity_provider_strategy = try(var.cluster.default_capacity_provider_strategy, {}) | ||
|
||
tags = var.tags | ||
} | ||
|
||
module "ecs_service" { | ||
source = "terraform-aws-modules/ecs/aws//modules/service" | ||
version = "5.11.0" | ||
version = "6.1.1" | ||
|
||
create = var.create | ||
|
||
# Service | ||
ignore_task_definition_changes = try(var.service.ignore_task_definition_changes, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with the variable optional attributes, a lot of these |
||
alarms = try(var.service.alarms, {}) | ||
alarms = try(var.service.alarms, { alarm_names = [] }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change? |
||
capacity_provider_strategy = try(var.service.capacity_provider_strategy, {}) | ||
cluster_arn = var.create_cluster && var.create ? module.ecs_cluster.arn : var.cluster_arn | ||
deployment_controller = try(var.service.deployment_controller, {}) | ||
|
@@ -264,7 +265,7 @@ module "ecs_service" { | |
propagate_tags = try(var.service.propagate_tags, null) | ||
scheduling_strategy = try(var.service.scheduling_strategy, null) | ||
service_connect_configuration = lookup(var.service, "service_connect_configuration", {}) | ||
service_registries = lookup(var.service, "service_registries", {}) | ||
service_registries = try(var.service.service_registries, null) | ||
timeouts = try(var.service.timeouts, {}) | ||
triggers = try(var.service.triggers, {}) | ||
wait_for_steady_state = try(var.service.wait_for_steady_state, null) | ||
|
@@ -278,7 +279,7 @@ module "ecs_service" { | |
iam_role_description = try(var.service.iam_role_description, null) | ||
iam_role_permissions_boundary = try(var.service.iam_role_permissions_boundary, null) | ||
iam_role_tags = try(var.service.iam_role_tags, {}) | ||
iam_role_statements = lookup(var.service, "iam_role_statements", {}) | ||
iam_role_statements = lookup(var.service, "iam_role_statements", []) | ||
|
||
# Task definition | ||
create_task_definition = try(var.service.create_task_definition, true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the container definition input values are now |
||
|
@@ -355,17 +356,15 @@ module "ecs_service" { | |
}, | ||
lookup(var.service, "container_definitions", {}) | ||
) | ||
container_definition_defaults = lookup(var.service, "container_definition_defaults", {}) | ||
cpu = try(var.service.cpu, 1024) | ||
ephemeral_storage = try(var.service.ephemeral_storage, {}) | ||
ephemeral_storage = try(var.service.ephemeral_storage, null) | ||
family = try(var.service.family, null) | ||
inference_accelerator = try(var.service.inference_accelerator, {}) | ||
ipc_mode = try(var.service.ipc_mode, null) | ||
memory = try(var.service.memory, 2048) | ||
network_mode = try(var.service.network_mode, "awsvpc") | ||
pid_mode = try(var.service.pid_mode, null) | ||
task_definition_placement_constraints = try(var.service.task_definition_placement_constraints, {}) | ||
proxy_configuration = try(var.service.proxy_configuration, {}) | ||
proxy_configuration = try(var.service.proxy_configuration, null) | ||
requires_compatibilities = try(var.service.requires_compatibilities, ["FARGATE"]) | ||
runtime_platform = try(var.service.runtime_platform, { | ||
operating_system_family = "LINUX" | ||
|
@@ -405,7 +404,7 @@ module "ecs_service" { | |
create_task_exec_policy = try(var.service.create_task_exec_policy, true) | ||
task_exec_ssm_param_arns = try(var.service.task_exec_ssm_param_arns, ["arn:aws:ssm:*:*:parameter/*"]) | ||
task_exec_secret_arns = try(var.service.task_exec_secret_arns, ["arn:aws:secretsmanager:*:*:secret:*"]) | ||
task_exec_iam_statements = lookup(var.service, "task_exec_iam_statements", {}) | ||
task_exec_iam_statements = lookup(var.service, "task_exec_iam_statements", []) | ||
|
||
# Tasks - IAM role | ||
create_tasks_iam_role = try(var.service.create_tasks_iam_role, true) | ||
|
@@ -417,7 +416,7 @@ module "ecs_service" { | |
tasks_iam_role_permissions_boundary = try(var.service.tasks_iam_role_permissions_boundary, null) | ||
tasks_iam_role_tags = try(var.service.tasks_iam_role_tags, {}) | ||
tasks_iam_role_policies = lookup(var.service, "tasks_iam_role_policies", {}) | ||
tasks_iam_role_statements = lookup(var.service, "tasks_iam_role_statements", {}) | ||
tasks_iam_role_statements = lookup(var.service, "tasks_iam_role_statements", []) | ||
|
||
# Task set | ||
external_id = try(var.service.external_id, null) | ||
|
@@ -438,26 +437,32 @@ module "ecs_service" { | |
security_group_name = try(var.service.security_group_name, null) | ||
security_group_use_name_prefix = try(var.service.security_group_use_name_prefix, true) | ||
security_group_description = try(var.service.security_group_description, null) | ||
security_group_rules = merge( | ||
security_group_ingress_rules = merge( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the plan for an upgrade guide for these disruptive/breaking changes? |
||
{ | ||
atlantis = { | ||
type = "ingress" | ||
from_port = local.atlantis_port | ||
to_port = local.atlantis_port | ||
protocol = "tcp" | ||
source_security_group_id = var.create_alb ? module.alb.security_group_id : var.alb_security_group_id | ||
description = "Allow traffic from ALB to Atlantis" | ||
from_port = local.atlantis_port | ||
to_port = local.atlantis_port | ||
ip_protocol = "tcp" | ||
referenced_security_group_id = var.create_alb ? module.alb.security_group_id : var.alb_security_group_id | ||
} | ||
}, | ||
lookup(var.service, "security_group_rules", { | ||
lookup(var.service, "security_group_ingress_rules", {}) | ||
) | ||
|
||
security_group_egress_rules = merge( | ||
{ | ||
egress = { | ||
type = "egress" | ||
description = "Allow all outbound traffic" | ||
from_port = 0 | ||
to_port = 0 | ||
protocol = "-1" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
ip_protocol = "-1" | ||
cidr_ipv4 = "0.0.0.0/0" | ||
} | ||
}) | ||
}, | ||
lookup(var.service, "security_group_egress_rules", {}) | ||
) | ||
|
||
security_group_tags = try(var.service.security_group_tags, {}) | ||
|
||
tags = var.tags | ||
|
@@ -469,7 +474,7 @@ module "ecs_service" { | |
|
||
module "efs" { | ||
source = "terraform-aws-modules/efs/aws" | ||
version = "1.3.1" | ||
version = "1.7.0" | ||
|
||
create = var.create && var.enable_efs | ||
name = try(var.efs.name, var.name) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
terraform { | ||
required_version = ">= 1.0" | ||
required_version = ">= 1.10" | ||
|
||
required_providers { | ||
github = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in examples we don't pin to a specific version, so lets revert changes like this