Skip to content

Commit

Permalink
Merge pull request #177 from USSBA/IA-3231
Browse files Browse the repository at this point in the history
IA-3231: update easy-fargate-service module ~>11.0
  • Loading branch information
jsmigovsky authored Sep 29, 2023
2 parents 835cebc + 8ad50ec commit ce84127
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions terraform/IA-3231.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

WORKSPACE=`terraform workspace show`
SERVICE='hubzone-api'

SGID=`aws ec2 describe-security-groups --query "SecurityGroups[?contains(GroupName, '${WORKSPACE}-${SERVICE}-fg-svc-sg') && starts_with(GroupName, '${WORKSPACE}')].GroupId" --output text`
terraform import \
"module.api.aws_security_group_rule.fargate_egress" \
"${SGID}_egress_all_0_0_0.0.0.0/0"

SGID=`aws ec2 describe-security-groups --query "SecurityGroups[?contains(GroupName, '${WORKSPACE}-${SERVICE}-fg-alb') && starts_with(GroupName, '${WORKSPACE}')].GroupId" --output text`
terraform import \
"module.api.aws_security_group_rule.alb_egress" \
"${SGID}_egress_all_0_0_0.0.0.0/0"

terraform import \
"module.api.aws_security_group_rule.alb_egress_ipv6[0]" \
"${SGID}_egress_all_0_0_::/0"
3 changes: 2 additions & 1 deletion terraform/fargate.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ locals {

module "api" {
source = "USSBA/easy-fargate-service/aws"
version = "~> 10.0"
version = "~> 11.0"

# cloudwatch logging
log_group_name = "/ecs/${terraform.workspace}/${local.env.service_name}"
Expand All @@ -34,6 +34,7 @@ module "api" {
task_cpu = local.env.task_cpu_rails
task_memory = local.env.task_memory_rails
enable_execute_command = true
ipv6 = false
#alb_idle_timeout = 60

## If the ecs task needs to access AWS API for any reason, grant
Expand Down

0 comments on commit ce84127

Please sign in to comment.