Infra: AWS deployment - minor fixes 55/31355/1
authorTomas Alexy <tomas.alexy@pantheon.tech>
Fri, 19 Feb 2021 09:10:18 +0000 (10:10 +0100)
committerTomas Alexy <tomas.alexy@pantheon.tech>
Fri, 19 Feb 2021 09:10:18 +0000 (10:10 +0100)
Bump aws provider to 3.28
Code readability improvements

Signed-off-by: Tomas Alexy <tomas.alexy@pantheon.tech>
Change-Id: Iaa966f2795f228e31e90acf27ca9999a730a87f0

terraform-ci-infra/2n_aws_c5n/deploy/main.tf
terraform-ci-infra/2n_aws_c5n/deploy/versions.tf
terraform-ci-infra/3n_aws_c5n/deploy/main.tf
terraform-ci-infra/3n_aws_c5n/deploy/versions.tf

index 7fe8151..8595f9f 100644 (file)
@@ -218,6 +218,7 @@ data "aws_network_interface" "tg_if2" {
 
 # Instances
 resource "aws_instance" "tg" {
+  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   ami                         = var.ami_image
   availability_zone           = var.avail_zone
   instance_type               = var.instance_type
@@ -228,7 +229,6 @@ resource "aws_instance" "tg" {
   vpc_security_group_ids      = [aws_security_group.CSITSG.id]
   placement_group             = aws_placement_group.CSITPG.id
   source_dest_check           = false
-  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   # host_id                   = "1"
 
   root_block_device {
@@ -242,6 +242,7 @@ resource "aws_instance" "tg" {
 }
 
 resource "aws_instance" "dut1" {
+  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   ami                         = var.ami_image
   availability_zone           = var.avail_zone
   instance_type               = var.instance_type
@@ -252,7 +253,6 @@ resource "aws_instance" "dut1" {
   vpc_security_group_ids      = [aws_security_group.CSITSG.id]
   placement_group             = aws_placement_group.CSITPG.id
   source_dest_check           = false
-  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   # host_id                   = "2"
 
   root_block_device {
index 2d09eb6..8b7b8c5 100644 (file)
@@ -2,7 +2,7 @@ terraform {
   required_providers {
     aws = {
       source  = "hashicorp/aws"
-      version = "~> 3.26.0"
+      version = "~> 3.28.0"
     }
     null = {
       source  = "hashicorp/null"
index 703be0c..6559bbf 100644 (file)
@@ -262,6 +262,7 @@ data "aws_network_interface" "tg_if2" {
 
 # Instances
 resource "aws_instance" "tg" {
+  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   ami                         = var.ami_image
   availability_zone           = var.avail_zone
   instance_type               = var.instance_type
@@ -272,7 +273,6 @@ resource "aws_instance" "tg" {
   vpc_security_group_ids      = [aws_security_group.CSITSG.id]
   placement_group             = aws_placement_group.CSITPG.id
   source_dest_check           = false
-  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   # host_id                   = "1"
 
   root_block_device {
@@ -286,6 +286,7 @@ resource "aws_instance" "tg" {
 }
 
 resource "aws_instance" "dut1" {
+  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   ami                         = var.ami_image
   availability_zone           = var.avail_zone
   instance_type               = var.instance_type
@@ -296,7 +297,6 @@ resource "aws_instance" "dut1" {
   vpc_security_group_ids      = [aws_security_group.CSITSG.id]
   placement_group             = aws_placement_group.CSITPG.id
   source_dest_check           = false
-  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   # host_id                   = "2"
 
   root_block_device {
@@ -310,6 +310,7 @@ resource "aws_instance" "dut1" {
 }
 
 resource "aws_instance" "dut2" {
+  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   ami                         = var.ami_image
   availability_zone           = var.avail_zone
   instance_type               = var.instance_type
@@ -320,7 +321,6 @@ resource "aws_instance" "dut2" {
   vpc_security_group_ids      = [aws_security_group.CSITSG.id]
   placement_group             = aws_placement_group.CSITPG.id
   source_dest_check           = false
-  depends_on                  = [aws_vpc.CSITVPC, aws_placement_group.CSITPG]
   # host_id                   = "3"
 
   root_block_device {
index 2d09eb6..8b7b8c5 100644 (file)
@@ -2,7 +2,7 @@ terraform {
   required_providers {
     aws = {
       source  = "hashicorp/aws"
-      version = "~> 3.26.0"
+      version = "~> 3.28.0"
     }
     null = {
       source  = "hashicorp/null"