Skip to content

Commit

Permalink
Merge pull request #3340 from ministryofjustice/Test_Instance_120923
Browse files Browse the repository at this point in the history
Test_Instance_120923
  • Loading branch information
nbuckingham72 authored Sep 12, 2023
2 parents a1494d0 + 4547752 commit a2f2371
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraform/environments/ppud/ad.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
22 changes: 22 additions & 0 deletions terraform/environments/ppud/instances.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a2f2371

Please sign in to comment.