diff --git a/infrastructure/api/vars.tf b/infrastructure/api/vars.tf index 8e03138..60e2bd0 100644 --- a/infrastructure/api/vars.tf +++ b/infrastructure/api/vars.tf @@ -105,3 +105,7 @@ variable "dynamodb_table_name" { error_message = "The DynamoDB table name must not be empty." } } +variable "repo_name" { + description = "Name of the repository for resource descriptions and tags" + type = string +} \ No newline at end of file diff --git a/infrastructure/api/waf.tf b/infrastructure/api/waf.tf index 047fb28..f8720ab 100644 --- a/infrastructure/api/waf.tf +++ b/infrastructure/api/waf.tf @@ -47,7 +47,7 @@ resource "aws_cloudfront_distribution" "api" { count = var.is_public_api ? 1 : 0 provider = aws.cloudfront_waf web_acl_id = aws_wafv2_web_acl.cloudfront_acl[0].arn - comment = "Distribution for ${var.app_name} api." + comment = "Distribution for ${var.app_name} api, for github repository :: ${var.repo_name}" origin { domain_name = "${aws_apigatewayv2_api.app.id}.execute-api.${var.aws_region}.amazonaws.com" diff --git a/infrastructure/frontend/cloudfront.tf b/infrastructure/frontend/cloudfront.tf index b5b616b..f6d728c 100644 --- a/infrastructure/frontend/cloudfront.tf +++ b/infrastructure/frontend/cloudfront.tf @@ -113,7 +113,7 @@ resource "aws_cloudfront_distribution" "s3_distribution" { depends_on = [aws_s3_bucket_policy.cloudfront_logs_policy] enabled = true is_ipv6_enabled = true - comment = "Distribution for ${var.app_name} site." + comment = "Distribution for ${var.app_name} site from github repository :: ${var.repo_name}" default_root_object = "index.html" price_class = "PriceClass_100" web_acl_id = aws_wafv2_web_acl.waf_cloudfront.arn diff --git a/infrastructure/frontend/vars.tf b/infrastructure/frontend/vars.tf index d279a26..dc6ee27 100644 --- a/infrastructure/frontend/vars.tf +++ b/infrastructure/frontend/vars.tf @@ -24,4 +24,8 @@ variable "common_tags" { description = "Common tags to be applied to resources" type = map(string) default = {} +} +variable "repo_name" { + description = "Name of the repository for resource descriptions and tags" + type = string } \ No newline at end of file diff --git a/terraform/api/terragrunt.hcl b/terraform/api/terragrunt.hcl index 6eac09e..eae4684 100644 --- a/terraform/api/terragrunt.hcl +++ b/terraform/api/terragrunt.hcl @@ -51,6 +51,7 @@ generate "tfvars" { "RepoName" = "${local.repo_name}" "ManagedBy" = "Terraform" } + repo_name="${local.repo_name}" EOF } diff --git a/terraform/database/terragrunt.hcl b/terraform/database/terragrunt.hcl index ab8cefd..32b8fbe 100644 --- a/terraform/database/terragrunt.hcl +++ b/terraform/database/terragrunt.hcl @@ -50,6 +50,7 @@ generate "tfvars" { "RepoName" = "${local.repo_name}" "ManagedBy" = "Terraform" } + repo_name="${local.repo_name}" EOF } diff --git a/terraform/frontend/terragrunt.hcl b/terraform/frontend/terragrunt.hcl index 213e11a..26d9b61 100644 --- a/terraform/frontend/terragrunt.hcl +++ b/terraform/frontend/terragrunt.hcl @@ -43,6 +43,7 @@ generate "tfvars" { contents = <<-EOF app_env="${local.app_env}" app_name="${local.stack_prefix}-frontend-${local.app_env}" + repo_name="${local.repo_name}" common_tags = { "Environment" = "${local.target_env}" "AppEnv" = "${local.app_env}"