Skip to content

Commit cbb8758

Browse files
committed
Environment var value changed to dev
1 parent 24caab8 commit cbb8758

File tree

6 files changed

+27
-14
lines changed

6 files changed

+27
-14
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
environment = "non-prod"
1+
environment = "dev"
22
sub_environment = "int"
33
immunisation_account_id = "345594581768"
44
dspp_core_account_id = "603871901111"

terraform/environments/non-prod/internal-dev/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
environment = "non-prod"
1+
environment = "dev"
22
sub_environment = "internal-dev"
33
immunisation_account_id = "345594581768"
44
dspp_core_account_id = "603871901111"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
environment = "non-prod"
1+
environment = "dev"
22
sub_environment = "pr"
33
immunisation_account_id = "345594581768"
44
dspp_core_account_id = "603871901111"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
environment = "non-prod"
1+
environment = "dev"
22
sub_environment = "ref"
33
immunisation_account_id = "345594581768"
44
dspp_core_account_id = "603871901111"

terraform/main.tf

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,37 @@ data "aws_region" "current" {}
4040
data "aws_caller_identity" "current" {}
4141
data "aws_ecr_authorization_token" "token" {}
4242

43-
data "aws_vpc" "default" {
44-
filter {
45-
name = "tag:Name"
46-
values = [local.vpc_name]
43+
check "private_subnets" {
44+
assert {
45+
condition = length(local.private_subnet_ids) > 0
46+
error_message = "No private subnets with internet access found in VPC ${data.aws_vpc.default.id}"
4747
}
4848
}
4949

50-
data "aws_subnets" "default" {
50+
data "aws_vpc" "default" {
51+
default = true
52+
}
53+
54+
data "aws_subnets" "all" {
5155
filter {
5256
name = "vpc-id"
5357
values = [data.aws_vpc.default.id]
5458
}
5559
}
5660

61+
data "aws_route_table" "route_table_by_subnet" {
62+
for_each = toset(data.aws_subnets.all.ids)
63+
64+
subnet_id = each.value
65+
}
66+
67+
data "aws_route" "internet_traffic_route_by_subnet" {
68+
for_each = data.aws_route_table.route_table_by_subnet
69+
70+
route_table_id = each.value.id
71+
destination_cidr_block = "0.0.0.0/0"
72+
}
73+
5774
data "aws_kms_key" "existing_s3_encryption_key" {
5875
key_id = "alias/imms-batch-s3-shared-key"
5976
}
@@ -82,6 +99,5 @@ data "aws_kms_key" "existing_kinesis_encryption_key" {
8299
}
83100

84101
data "aws_kms_key" "mesh_s3_encryption_key" {
85-
count = var.environment == "int" ? 0 : 1
86102
key_id = "alias/local-immunisation-mesh"
87103
}

terraform/splunk.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
locals {
2-
splunk_env = var.environment == "prod" ? "prod" : var.sub_environment == "int" ? "int" : "dev"
3-
}
41
data "aws_secretsmanager_secret" "splunk_token" {
5-
name = "imms/splunk/${local.splunk_env}/hec"
2+
name = "imms/splunk/${var.environment}/hec"
63
}
74
data "aws_secretsmanager_secret_version" "splunk_token_id" {
85
secret_id = data.aws_secretsmanager_secret.splunk_token.id

0 commit comments

Comments
 (0)