-
Notifications
You must be signed in to change notification settings - Fork 17
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-autoscaling route
- Loading branch information
1 parent
ab551a1
commit 98e107c
Showing
4 changed files
with
42 additions
and
4 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,4 +1,5 @@ | ||
create = true | ||
fifo_topic = false | ||
create_topic_policy = true | ||
create_subscription = true | ||
create_launch_template = true | ||
create_schedule = true | ||
create_scaling_policy = true | ||
create_iam_instance_profile = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def IaC_template_generator_autoscaling(input) -> str: | ||
|
||
aws_autoscaling_create_group = 'true' if input.autoscaling_group else 'false' | ||
aws_autoscaling_create_launch_template = 'true' if input.launch_template else 'false' | ||
aws_autoscaling_create_schedule = 'true' if input.schedule else 'false' | ||
aws_autoscaling_create_scaling_policy = 'true' if input.scaling_policy else 'false' | ||
aws_autoscaling_create_iam_instance_profile = 'true' if input.iam_instance_profile else 'false' | ||
|
||
tfvars_file = f"""create = {aws_autoscaling_create_group} | ||
create_launch_template = {aws_autoscaling_create_launch_template} | ||
create_schedule = {aws_autoscaling_create_schedule} | ||
create_scaling_policy = {aws_autoscaling_create_scaling_policy} | ||
create_iam_instance_profile = {aws_autoscaling_create_iam_instance_profile} | ||
""" | ||
return tfvars_file |