-
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.
Merge pull request #166 from devopshobbies/dev
feat(terraform-templates): implementing the routes of terraform-aws modules
- Loading branch information
Showing
9 changed files
with
218 additions
and
6 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,5 +1,7 @@ | ||
create_distribution = true | ||
create_origin_access_identity = true | ||
create_origin_access_control = false | ||
create_monitoring_subscription = false | ||
create_vpc_origin = false | ||
create_db_instance = true | ||
create_db_option_group = true | ||
create_db_parameter_group = true | ||
create_db_subnet_group = true | ||
create_monitoring_role = true | ||
create_cloudwatch_log_group = true | ||
manage_master_user_password_rotation = 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_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 |
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,9 @@ | ||
def IaC_template_generator_key_pair(input) -> str: | ||
|
||
aws_key_pair_create = 'true' if input.key_pair else 'false' | ||
aws_key_pair_create_private_key = 'true' if input.private_key else 'false' | ||
|
||
tfvars_file = f"""create = {aws_key_pair_create} | ||
create_private_key = {aws_key_pair_create_private_key} | ||
""" | ||
return tfvars_file |
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,19 @@ | ||
def IaC_template_generator_rds(input) -> str: | ||
|
||
aws_rds_create_db_instance = 'true' if input.db_instance else 'false' | ||
aws_rds_create_db_option_group = 'true' if input.db_option_group else 'false' | ||
aws_rds_create_db_parameter_group = 'true' if input.db_parameter_group else 'false' | ||
aws_rds_create_db_subnet_group = 'true' if input.db_subnet_group else 'false' | ||
aws_rds_create_monitoring_role = 'true' if input.monitoring_role else 'false' | ||
aws_rds_create_cloudwatch_log_group = 'true' if input.cloudwatch_log_group else 'false' | ||
aws_rds_create_master_user_password_rotation = 'true' if input.master_user_password_rotation else 'false' | ||
|
||
tfvars_file = f"""create_db_instance = {aws_rds_create_db_instance} | ||
create_db_option_group = {aws_rds_create_db_option_group} | ||
create_db_parameter_group = {aws_rds_create_db_parameter_group} | ||
create_db_subnet_group = {aws_rds_create_db_subnet_group} | ||
create_monitoring_role = {aws_rds_create_monitoring_role} | ||
create_cloudwatch_log_group = {aws_rds_create_cloudwatch_log_group} | ||
manage_master_user_password_rotation = {aws_rds_create_master_user_password_rotation} | ||
""" | ||
return tfvars_file |
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,13 @@ | ||
def IaC_template_generator_route53(input) -> str: | ||
|
||
aws_route53_create_zone = 'true' if input.zone else 'false' | ||
aws_route53_create_record = 'true' if input.record else 'false' | ||
aws_route53_create_delegation_set = 'true' if input.delegation_set else 'false' | ||
aws_route53_create_resolver_rule_association = 'true' if input.resolver_rule_association else 'false' | ||
|
||
tfvars_file = f"""create_zone = {aws_route53_create_zone} | ||
create_record = {aws_route53_create_record} | ||
create_delegation_set = {aws_route53_create_delegation_set} | ||
create_resolver_rule_association = {aws_route53_create_resolver_rule_association} | ||
""" | ||
return tfvars_file |
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,11 @@ | ||
def IaC_template_generator_sns(input) -> str: | ||
|
||
aws_sns_create_topic = 'true' if input.sns_topic else 'false' | ||
aws_sns_create_topic_policy = 'true' if input.topic_policy else 'false' | ||
aws_sns_create_subscription = 'true' if input.subscription else 'false' | ||
|
||
tfvars_file = f"""create = {aws_sns_create_topic} | ||
create_topic_policy = {aws_sns_create_topic_policy} | ||
create_subscription = {aws_sns_create_subscription} | ||
""" | ||
return tfvars_file |
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_sqs(input) -> str: | ||
|
||
aws_sqs_create_queue = 'true' if input.sqs_queue else 'false' | ||
aws_sqs_create_queue_policy = 'true' if input.queue_policy else 'false' | ||
aws_sqs_create_dlq = 'true' if input.dlq else 'false' | ||
aws_sqs_create_dlq_redrive_allow_policy = 'true' if input.dlq_redrive_allow_policy else 'false' | ||
aws_sqs_create_dlq_queue_policy = 'true' if input.dlq_queue_policy else 'false' | ||
|
||
tfvars_file = f"""create = {aws_sqs_create_queue} | ||
create_queue_policy = {aws_sqs_create_queue_policy} | ||
create_dlq = {aws_sqs_create_dlq} | ||
create_dlq_redrive_allow_policy = {aws_sqs_create_dlq_redrive_allow_policy} | ||
create_dlq_queue_policy = {aws_sqs_create_dlq_queue_policy} | ||
""" | ||
return tfvars_file |