aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/2n_aws_c5n/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.terraform/2n_aws_c5n/deploy')
-rw-r--r--fdio.infra.terraform/2n_aws_c5n/deploy/main.tf18
-rw-r--r--fdio.infra.terraform/2n_aws_c5n/deploy/versions.tf2
2 files changed, 13 insertions, 7 deletions
diff --git a/fdio.infra.terraform/2n_aws_c5n/deploy/main.tf b/fdio.infra.terraform/2n_aws_c5n/deploy/main.tf
index f97d974b38..b9d6f188bb 100644
--- a/fdio.infra.terraform/2n_aws_c5n/deploy/main.tf
+++ b/fdio.infra.terraform/2n_aws_c5n/deploy/main.tf
@@ -134,7 +134,7 @@ resource "aws_network_interface" "dut1_if1" {
private_ip = var.dut1_if1_ip
private_ips = [var.dut1_if1_ip]
security_groups = [aws_security_group.CSITSG.id]
- depends_on = [aws_vpc.CSITVPC, aws_subnet.b]
+ depends_on = [aws_vpc.CSITVPC, aws_subnet.b, aws_instance.dut1]
attachment {
instance = aws_instance.dut1.id
@@ -152,7 +152,7 @@ resource "aws_network_interface" "dut1_if2" {
private_ip = var.dut1_if2_ip
private_ips = [var.dut1_if2_ip]
security_groups = [aws_security_group.CSITSG.id]
- depends_on = [aws_vpc.CSITVPC]
+ depends_on = [aws_vpc.CSITVPC, aws_subnet.d, aws_instance.dut1]
attachment {
instance = aws_instance.dut1.id
@@ -170,7 +170,7 @@ resource "aws_network_interface" "tg_if1" {
private_ip = var.tg_if1_ip
private_ips = [var.tg_if1_ip]
security_groups = [aws_security_group.CSITSG.id]
- depends_on = [aws_vpc.CSITVPC, aws_subnet.b]
+ depends_on = [aws_vpc.CSITVPC, aws_subnet.b, aws_instance.tg]
attachment {
instance = aws_instance.tg.id
@@ -188,7 +188,7 @@ resource "aws_network_interface" "tg_if2" {
private_ip = var.tg_if2_ip
private_ips = [var.tg_if2_ip]
security_groups = [aws_security_group.CSITSG.id]
- depends_on = [aws_vpc.CSITVPC, aws_subnet.d]
+ depends_on = [aws_vpc.CSITVPC, aws_subnet.d, aws_instance.tg]
attachment {
instance = aws_instance.tg.id
@@ -242,7 +242,7 @@ resource "aws_instance" "tg" {
}
resource "aws_instance" "dut1" {
- depends_on = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
+ depends_on = [aws_vpc.CSITVPC, aws_placement_group.CSITPG, aws_instance.tg]
ami = var.ami_image
availability_zone = var.avail_zone
instance_type = var.instance_type
@@ -292,7 +292,10 @@ resource "null_resource" "deploy_tg" {
depends_on = [
aws_instance.tg,
aws_network_interface.tg_if1,
- aws_network_interface.tg_if2
+ aws_network_interface.tg_if2,
+ aws_instance.dut1,
+ aws_network_interface.dut1_if1,
+ aws_network_interface.dut1_if2
]
connection {
@@ -328,6 +331,9 @@ resource "null_resource" "deploy_tg" {
resource "null_resource" "deploy_dut1" {
depends_on = [
+ aws_instance.tg,
+ aws_network_interface.tg_if1,
+ aws_network_interface.tg_if2,
aws_instance.dut1,
aws_network_interface.dut1_if1,
aws_network_interface.dut1_if2
diff --git a/fdio.infra.terraform/2n_aws_c5n/deploy/versions.tf b/fdio.infra.terraform/2n_aws_c5n/deploy/versions.tf
index 8b7b8c5f32..8017bb9dc3 100644
--- a/fdio.infra.terraform/2n_aws_c5n/deploy/versions.tf
+++ b/fdio.infra.terraform/2n_aws_c5n/deploy/versions.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 3.28.0"
+ version = "~> 3.32.0"
}
null = {
source = "hashicorp/null"