From 09123b573bc4b296061b3b7345a9fe6d2c2545c2 Mon Sep 17 00:00:00 2001 From: srashee1 Date: Tue, 24 Aug 2021 15:09:15 -0500 Subject: [PATCH 1/2] Common in MC /urban-os-deploy#103 co-authored-by: Kyle Smith --- parameters.tf | 31 +++++++++++++++++++++++++++++++ variables/sandbox.tfvars | 10 +++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 parameters.tf diff --git a/parameters.tf b/parameters.tf new file mode 100644 index 00000000..464c3be0 --- /dev/null +++ b/parameters.tf @@ -0,0 +1,31 @@ +/* This file contains the logical resources to create and +store parameters needed for UrbanOS deployment. The parameters +are stored in AWS System Manager Parameter Store */ + +resource "aws_ssm_parameter" "certificate" { + name = "${terraform.workspace}_certificate_arn" + description = "Certificate ARN for Ingress" + type = "String" + value = module.tls_certificate.arn +} + +resource "aws_ssm_parameter" "public_subnets" { + name = "${terraform.workspace}_public_subnets" + description = "Certificate ARN for Ingress" + type = "String" + value = join("\\,", module.vpc.public_subnets) +} + +resource "aws_ssm_parameter" "security_groups" { + name = "${terraform.workspace}_security_group_id" + description = "AWS Security Groups ID" + type = "String" + value = aws_security_group.allow_all.id +} + +resource "aws_ssm_parameter" "eks_wafv2_web_acl_arn" { + name = "${terraform.workspace}eks_cluster_arn" + description = "AWS Security Groups ID" + type = "String" + value = aws_wafv2_web_acl.eks_cluster.arn +} \ No newline at end of file diff --git a/variables/sandbox.tfvars b/variables/sandbox.tfvars index aed4e589..fc002662 100644 --- a/variables/sandbox.tfvars +++ b/variables/sandbox.tfvars @@ -50,4 +50,12 @@ alarms_slack_path = "/services/T7LRETX4G/BDE8Y9SQ3/Amboqt9U8R3IYQgxUlBPkSUY" alarms_slack_channel_name = "#pre_prod_alerts" #Elastic Search -elasticsearch_dedicated_master_count = 3 \ No newline at end of file +elasticsearch_dedicated_master_count = 3 + +#min_num_of_workers = 10 + +#max_num_of_workers = 10 + +#min_num_of_kafka_workers = 3 + +#max_num_of_kafka_workers = 3 \ No newline at end of file From 69fc2eebf51b953a08a7d13b9e943e563a779673 Mon Sep 17 00:00:00 2001 From: srashee1 Date: Tue, 24 Aug 2021 15:36:19 -0500 Subject: [PATCH 2/2] parameter store /urban-os-deploy#103 co-authored-by: Kyle Smith --- main.tf | 2 +- variables/sandbox.tfvars | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/main.tf b/main.tf index ced9e28f..dd69e78f 100644 --- a/main.tf +++ b/main.tf @@ -36,7 +36,7 @@ resource "random_pet" "this_exists_to_download_random_plugin_if_terraform_cache_ } resource "aws_key_pair" "cloud_key" { - key_name = var.key_pair_name + key_name = "${terraform.workspace}-${var.key_pair_name}" public_key = var.key_pair_public_key } diff --git a/variables/sandbox.tfvars b/variables/sandbox.tfvars index fc002662..aed4e589 100644 --- a/variables/sandbox.tfvars +++ b/variables/sandbox.tfvars @@ -50,12 +50,4 @@ alarms_slack_path = "/services/T7LRETX4G/BDE8Y9SQ3/Amboqt9U8R3IYQgxUlBPkSUY" alarms_slack_channel_name = "#pre_prod_alerts" #Elastic Search -elasticsearch_dedicated_master_count = 3 - -#min_num_of_workers = 10 - -#max_num_of_workers = 10 - -#min_num_of_kafka_workers = 3 - -#max_num_of_kafka_workers = 3 \ No newline at end of file +elasticsearch_dedicated_master_count = 3 \ No newline at end of file