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" {
105
105
error_message = " The DynamoDB table name must not be empty."
106
106
}
107
107
}
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" {
47
47
count = var. is_public_api ? 1 : 0
48
48
provider = aws. cloudfront_waf
49
49
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 } "
51
51
52
52
origin {
53
53
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" {
113
113
depends_on = [aws_s3_bucket_policy . cloudfront_logs_policy ]
114
114
enabled = true
115
115
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 } "
117
117
default_root_object = " index.html"
118
118
price_class = " PriceClass_100"
119
119
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" {
24
24
description = " Common tags to be applied to resources"
25
25
type = map (string )
26
26
default = {}
27
+ }
28
+ variable "repo_name" {
29
+ description = " Name of the repository for resource descriptions and tags"
30
+ type = string
27
31
}
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ generate "tfvars" {
51
51
"RepoName" = "${ local . repo_name } "
52
52
"ManagedBy" = "Terraform"
53
53
}
54
+ repo_name="${ local . repo_name } "
54
55
EOF
55
56
}
56
57
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ generate "tfvars" {
50
50
"RepoName" = "${ local . repo_name } "
51
51
"ManagedBy" = "Terraform"
52
52
}
53
+ repo_name="${ local . repo_name } "
53
54
EOF
54
55
}
55
56
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ generate "tfvars" {
43
43
contents = <<- EOF
44
44
app_env="${ local . app_env } "
45
45
app_name="${ local . stack_prefix } -frontend-${ local . app_env } "
46
+ repo_name="${ local . repo_name } "
46
47
common_tags = {
47
48
"Environment" = "${ local . target_env } "
48
49
"AppEnv" = "${ local . app_env } "
You can’t perform that action at this time.
0 commit comments