Skip to content

Commit

Permalink
* 1.1.0 -- 2026-02-06
Browse files Browse the repository at this point in the history
  - remove data.aws_vpc_endpoint stuff from example
  - force TF 1.x
  • Loading branch information
badra001 committed Feb 6, 2026
1 parent a42afca commit 104eeae
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ logs
common/README.md

OLD/
X
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Versions

* v1.0.0 -- {{ yyyy-mm-dd }}
- initial creation
* 1.0.0 -- 2022-02-23
- initial

* 1.1.0 -- 2026-02-06
- remove data.aws_vpc_endpoint stuff from example
- force TF 1.x
2 changes: 2 additions & 0 deletions examples/fargate-cluster-tf-upgrade/locals.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
locals {
base_tags = {
# "boc:tf_module_name" = local._module_name
"boc:tf_module_version" = local._module_version
"boc:created_by" = "terraform"
}

Expand Down
40 changes: 20 additions & 20 deletions examples/fargate-cluster-tf-upgrade/roles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
#---
locals {
vpc_short_name = var.vpc_short_name
vpc_endpoints = ["ecr.api", "ecr.dkr", "ecs", "logs", "secretsmanager", "ssm", ]
## vpc_endpoints = ["ecr.api", "ecr.dkr", "ecs", "logs", "secretsmanager", "ssm", ]

task_base_format = "%v-ecs-task-execution-%v-%v"
task_base_name = format(local.task_base_format, var.app_name, var.vpc_short_name, local.region)
task_policy_name = format("p-%v", local.task_base_name)
}

data "aws_vpc_endpoint_service" "vpc_endpoints" {
for_each = toset(local.vpc_endpoints)
service = each.key
filter {
name = "service-type"
values = ["Interface"]
}
}

data "aws_vpc_endpoint" "vpc_endpoints" {
for_each = data.aws_vpc_endpoint_service.vpc_endpoints
service_name = each.value.service_name
vpc_id = data.aws_vpc.ecs_vpc.id
}
## data "aws_vpc_endpoint_service" "vpc_endpoints" {
## for_each = toset(local.vpc_endpoints)
## service = each.key
## filter {
## name = "service-type"
## values = ["Interface"]
## }
## }
##
## data "aws_vpc_endpoint" "vpc_endpoints" {
## for_each = data.aws_vpc_endpoint_service.vpc_endpoints
## service_name = each.value.service_name
## vpc_id = data.aws_vpc.ecs_vpc.id
## }

# note you have to create the policy before creating the role module
# tf-apply -target=aws_iam_policy.ecr_policy
Expand Down Expand Up @@ -87,11 +87,11 @@ data "aws_iam_policy_document" "ecr_task_policy" {
"ecr:BatchGetImage",
]
resources = ["*"]
condition {
test = "StringEquals"
variable = "aws:sourceVpce"
values = [for k, v in data.aws_vpc_endpoint.vpc_endpoints : v.id]
}
## condition {
## test = "StringEquals"
## variable = "aws:sourceVpce"
## values = [for k, v in data.aws_vpc_endpoint.vpc_endpoints : v.id]
## }
condition {
test = "StringEquals"
variable = "aws:sourceVpc"
Expand Down
1 change: 1 addition & 0 deletions examples/fargate-cluster-tf-upgrade/version.tf
4 changes: 2 additions & 2 deletions examples/fargate-cluster-tf-upgrade/versions.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
terraform {
required_version = ">= 1.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
version = ">= 6.0"
}
ldap = {
source = "trevex/ldap"
version = ">= 0.5.4"
}
}
required_version = ">= 0.13"
}
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "0.0.0"
_module_version = "1.1.0"
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.66.0"
version = ">= 6.0"
}
}
# required_version = ">= 0.13"
Expand Down

0 comments on commit 104eeae

Please sign in to comment.