Skip to content

Commit 809a176

Browse files
AWS Param store (#524)
* Exporting AWS config values as values in param store Co-authored-by: Kyle Smith <kyle.r.smith@accenture.com>
1 parent 39b2b6d commit 809a176

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resource "random_pet" "this_exists_to_download_random_plugin_if_terraform_cache_
3636
}
3737

3838
resource "aws_key_pair" "cloud_key" {
39-
key_name = var.key_pair_name
39+
key_name = "${terraform.workspace}-${var.key_pair_name}"
4040
public_key = var.key_pair_public_key
4141
}
4242

parameters.tf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* This file contains the logical resources to create and
2+
store parameters needed for UrbanOS deployment. The parameters
3+
are stored in AWS System Manager Parameter Store */
4+
5+
resource "aws_ssm_parameter" "certificate" {
6+
name = "${terraform.workspace}_certificate_arn"
7+
description = "Certificate ARN for Ingress"
8+
type = "String"
9+
value = module.tls_certificate.arn
10+
}
11+
12+
resource "aws_ssm_parameter" "public_subnets" {
13+
name = "${terraform.workspace}_public_subnets"
14+
description = "Certificate ARN for Ingress"
15+
type = "String"
16+
value = join("\\,", module.vpc.public_subnets)
17+
}
18+
19+
resource "aws_ssm_parameter" "security_groups" {
20+
name = "${terraform.workspace}_security_group_id"
21+
description = "AWS Security Groups ID"
22+
type = "String"
23+
value = aws_security_group.allow_all.id
24+
}
25+
26+
resource "aws_ssm_parameter" "eks_wafv2_web_acl_arn" {
27+
name = "${terraform.workspace}eks_cluster_arn"
28+
description = "AWS Security Groups ID"
29+
type = "String"
30+
value = aws_wafv2_web_acl.eks_cluster.arn
31+
}

0 commit comments

Comments
 (0)