File tree Expand file tree Collapse file tree 7 files changed +13
-2
lines changed Expand file tree Collapse file tree 7 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -105,3 +105,7 @@ variable "dynamodb_table_name" {
105105 error_message = " The DynamoDB table name must not be empty."
106106 }
107107}
108+ variable "repo_name" {
109+ description = " Name of the repository for resource descriptions and tags"
110+ type = string
111+ }
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ resource "aws_cloudfront_distribution" "api" {
4747 count = var. is_public_api ? 1 : 0
4848 provider = aws. cloudfront_waf
4949 web_acl_id = aws_wafv2_web_acl. cloudfront_acl [0 ]. arn
50- comment = " Distribution for ${ var . app_name } api. "
50+ comment = " Distribution for ${ var . app_name } api, for github repository :: ${ var . repo_name } "
5151
5252 origin {
5353 domain_name = " ${ aws_apigatewayv2_api . app . id } .execute-api.${ var . aws_region } .amazonaws.com"
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ resource "aws_cloudfront_distribution" "s3_distribution" {
113113 depends_on = [aws_s3_bucket_policy . cloudfront_logs_policy ]
114114 enabled = true
115115 is_ipv6_enabled = true
116- comment = " Distribution for ${ var . app_name } site. "
116+ comment = " Distribution for ${ var . app_name } site from github repository :: ${ var . repo_name } "
117117 default_root_object = " index.html"
118118 price_class = " PriceClass_100"
119119 web_acl_id = aws_wafv2_web_acl. waf_cloudfront . arn
Original file line number Diff line number Diff line change @@ -24,4 +24,8 @@ variable "common_tags" {
2424 description = " Common tags to be applied to resources"
2525 type = map (string )
2626 default = {}
27+ }
28+ variable "repo_name" {
29+ description = " Name of the repository for resource descriptions and tags"
30+ type = string
2731}
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ generate "tfvars" {
5151 "RepoName" = "${ local . repo_name } "
5252 "ManagedBy" = "Terraform"
5353 }
54+ repo_name="${ local . repo_name } "
5455EOF
5556}
5657
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ generate "tfvars" {
5050 "RepoName" = "${ local . repo_name } "
5151 "ManagedBy" = "Terraform"
5252 }
53+ repo_name="${ local . repo_name } "
5354EOF
5455}
5556
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ generate "tfvars" {
4343 contents = <<- EOF
4444 app_env="${ local . app_env } "
4545 app_name="${ local . stack_prefix } -frontend-${ local . app_env } "
46+ repo_name="${ local . repo_name } "
4647 common_tags = {
4748 "Environment" = "${ local . target_env } "
4849 "AppEnv" = "${ local . app_env } "
You can’t perform that action at this time.
0 commit comments