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/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