Skip to content

Commit 05991dc

Browse files
author
James Crowley
authored
Merge pull request #23 from sourcefuse/chore/additional-cleanup
chore/additional-cleanup
2 parents 3005be3 + fa0648d commit 05991dc

File tree

4 files changed

+27
-33
lines changed

4 files changed

+27
-33
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.4
1+
1.2.5

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ module "ecs" {
8686
| Name | Type |
8787
|------|------|
8888
| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
89-
| [aws_iam_policy.secrets_manager_read_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
9089
| [aws_iam_policy_attachment.execution](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment) | resource |
91-
| [aws_iam_policy_attachment.secrets_manager_read](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment) | resource |
9290
| [aws_iam_role.execution](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
9391
| [aws_lb_listener.http](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener) | resource |
9492
| [aws_lb_listener.https](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener) | resource |

iam.tf

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,3 @@ resource "aws_iam_policy_attachment" "execution" {
2828
policy_arn = each.value
2929
roles = [aws_iam_role.execution.name]
3030
}
31-
32-
################################################################################
33-
## secrets manager
34-
################################################################################
35-
resource "aws_iam_policy" "secrets_manager_read_policy" {
36-
name_prefix = "${local.cluster_name}-secrets-manager-ro-"
37-
38-
policy = jsonencode({
39-
Version = "2012-10-17",
40-
Statement = [
41-
{
42-
Effect = "Allow",
43-
Resource = "*"
44-
Action = [
45-
"secretsmanager:GetSecretValue"
46-
],
47-
}
48-
]
49-
})
50-
51-
tags = merge(var.tags, tomap({
52-
NamePrefix = "${local.cluster_name}-secrets-manager-ro-"
53-
}))
54-
}
55-
56-
resource "aws_iam_policy_attachment" "secrets_manager_read" {
57-
name = "${local.cluster_name}-secrets-manager-ro"
58-
roles = [aws_iam_role.execution.name]
59-
policy_arn = aws_iam_policy.secrets_manager_read_policy.arn
60-
}

locals.tf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,34 @@ locals {
1717
description = "ALB ARN"
1818
type = "String"
1919
},
20+
{
21+
name = "/${var.namespace}/${var.environment}/alb/${module.alb.alb_name}/dns_zone_id"
22+
value = module.alb.alb_zone_id
23+
description = "ALB Zone ID"
24+
type = "String"
25+
},
26+
{
27+
name = "/${var.namespace}/${var.environment}/alb/${module.alb.alb_name}/health_check_fqdn"
28+
value = module.health_check.route_53_fqdn
29+
description = "ALB Health Check FQDN."
30+
type = "String"
31+
},
32+
33+
## acm
34+
{
35+
name = "/${var.namespace}/${var.environment}/alb/${module.alb.alb_name}/certificate_arn"
36+
value = try(module.acm.arn, "Not Assigned")
37+
description = "ACM Certificate ARN."
38+
type = "String"
39+
},
2040

2141
## ecs
42+
{
43+
name = "/${var.namespace}/${var.environment}/ecs/${module.ecs.cluster_name}/cluster_name"
44+
value = module.ecs.cluster_name
45+
description = "ECS Cluster Name"
46+
type = "String"
47+
},
2248
{
2349
name = "/${var.namespace}/${var.environment}/ecs/${module.ecs.cluster_name}/id"
2450
value = module.ecs.cluster_id

0 commit comments

Comments
 (0)