From 4547752a6035ef7c9499dbbfdaa45cf36f4fba77 Mon Sep 17 00:00:00 2001 From: Buckingham Date: Tue, 12 Sep 2023 09:13:31 +0100 Subject: [PATCH] Test_Instance_120923 --- terraform/environments/ppud/ad.tf | 4 ++-- terraform/environments/ppud/instances.tf | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/terraform/environments/ppud/ad.tf b/terraform/environments/ppud/ad.tf index 20855053b68..a876c0dd34e 100644 --- a/terraform/environments/ppud/ad.tf +++ b/terraform/environments/ppud/ad.tf @@ -74,10 +74,10 @@ resource "aws_ssm_association" "ad_join_domain_association_preprod" { # Associate Policy to PROD Instance resource "aws_ssm_association" "ad_join_domain_association_prod" { count = local.is-production == true ? 1 : 0 - depends_on = [aws_instance.s618358rgvw019, aws_instance.s618358rgvw020, aws_instance.s618358rgvw021, aws_instance.s618358rgvw022, aws_instance.s618358rgvw027, aws_instance.s618358rgvw204, aws_instance.s618358rgvw205, aws_instance.s618358rgsw025p] + depends_on = [aws_instance.s618358rgvw019, aws_instance.s618358rgvw020, aws_instance.s618358rgvw021, aws_instance.s618358rgvw022, aws_instance.s618358rgvw027, aws_instance.s618358rgvw204, aws_instance.s618358rgvw205, aws_instance.s618358rgsw025p, aws_instance.s618358test] name = aws_ssm_document.api_ad_join_domain.name targets { key = "InstanceIds" - values = [aws_instance.s618358rgvw019[0].id, aws_instance.s618358rgvw020[0].id, aws_instance.s618358rgvw021[0].id, aws_instance.s618358rgvw022[0].id, aws_instance.s618358rgvw027[0].id, aws_instance.s618358rgvw204[0].id, aws_instance.s618358rgvw205[0].id, aws_instance.s618358rgsw025p[0].id] + values = [aws_instance.s618358rgvw019[0].id, aws_instance.s618358rgvw020[0].id, aws_instance.s618358rgvw021[0].id, aws_instance.s618358rgvw022[0].id, aws_instance.s618358rgvw027[0].id, aws_instance.s618358rgvw204[0].id, aws_instance.s618358rgvw205[0].id, aws_instance.s618358rgsw025p[0].id, aws_instance.s618358test[0].id] } } diff --git a/terraform/environments/ppud/instances.tf b/terraform/environments/ppud/instances.tf index 85969faca4b..3784039138b 100644 --- a/terraform/environments/ppud/instances.tf +++ b/terraform/environments/ppud/instances.tf @@ -496,6 +496,28 @@ resource "aws_instance" "s618358rgvw205" { } } +# Test Server + +resource "aws_instance" "s618358test" { + count = local.is-production == true ? 1 : 0 + ami = "ami-09301a37d119fe4c5" + instance_type = "m5.large" + source_dest_check = false + iam_instance_profile = aws_iam_instance_profile.ec2_profile.id + vpc_security_group_ids = [aws_security_group.Bridge-Server[0].id] + subnet_id = data.aws_subnet.private_subnets_a.id + + metadata_options { + http_tokens = "required" + http_endpoint = "enabled" + } + + tags = { + Name = "s618358test" + is-production = true + } +} + resource "aws_instance" "s618358rgsw025p" { count = local.is-production == true ? 1 : 0 ami = "ami-0b8f6843db88aa8a6"