-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(terraform-templates): implementing aws-cloudfront route
- Loading branch information
1 parent
7aa6583
commit 7b0abf6
Showing
4 changed files
with
43 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
alb_create = true | ||
create_security_group = true | ||
create_distribution = true | ||
create_origin_access_identity = true | ||
create_origin_access_control = false | ||
create_monitoring_subscription = false | ||
create_vpc_origin = false |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def IaC_template_generator_cloudfront(input) -> str: | ||
|
||
aws_cloudfront_create_distribution = 'true' if input.distribution else 'false' | ||
aws_cloudfront_create_origin_access_identity = 'true' if input.origin_access_identity else 'false' | ||
aws_cloudfront_create_origin_access_control = 'true' if input.origin_access_control else 'false' | ||
aws_cloudfront_create_monitoring_subscription = 'true' if input.monitoring_subscription else 'false' | ||
aws_cloudfront_create_vpc_origin = 'true' if input.vpc_origin else 'false' | ||
|
||
tfvars_file = f"""create_distribution = {aws_cloudfront_create_distribution} | ||
create_origin_access_identity = {aws_cloudfront_create_origin_access_identity} | ||
create_origin_access_control = {aws_cloudfront_create_origin_access_control} | ||
create_monitoring_subscription = {aws_cloudfront_create_monitoring_subscription} | ||
create_vpc_origin = {aws_cloudfront_create_vpc_origin} | ||
""" | ||
return tfvars_file |