-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
continued clean up, removing comments, updating resource and variable…
… names, fmt
- Loading branch information
Showing
17 changed files
with
70 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
locals { | ||
policy = var.lifecycle_policy == "" ? file("${path.module}/ecr-lifecycle-policy.json") : var.lifecycle_policy | ||
tags = { | ||
Automation = "Terraform" | ||
} | ||
policy = file("${path.module}/ecr-lifecycle-policy.json") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,3 @@ | |
output "repository_url" { | ||
value = [for repo in aws_ecr_repository.repo : repo.repository_url] | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
resource "aws_ecr_repository" "repo" { | ||
for_each = var.service_data | ||
name = each.key | ||
for_each = var.service_data | ||
name = each.key | ||
force_delete = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
resource "aws_cloudwatch_log_group" "ecs_cloudwatch_logs" { | ||
name = var.ecs_cloudwatch_group | ||
retention_in_days = var.retention_in_days | ||
retention_in_days = var.cw_retention_in_days | ||
} | ||
|
||
resource "aws_flow_log" "ecs_flow_log" { | ||
vpc_id = var.vpc_id | ||
|
||
# ARN of the IAM role that the flow log will assume to publish logs to CloudWatch Logs | ||
iam_role_arn = var.ecs_task_execution_role_arn | ||
|
||
# The type of traffic to capture. Valid values are ACCEPT, REJECT, or ALL. | ||
traffic_type = "ALL" | ||
|
||
# The ARN of the CloudWatch Logs group where the flow logs will be published | ||
log_destination = aws_cloudwatch_log_group.ecs_cloudwatch_logs.arn | ||
|
||
# IAM policy document for the IAM role assumed by the flow log | ||
# Replace this with your own policy document as needed | ||
vpc_id = var.vpc_id | ||
iam_role_arn = var.ecs_task_execution_role_arn | ||
traffic_type = "ALL" | ||
log_destination = aws_cloudwatch_log_group.ecs_cloudwatch_logs.arn | ||
log_destination_type = "cloud-watch-logs" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters