aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-04-04 16:48:59 +0200
committerPeter Mikus <pmikus@cisco.com>2022-04-05 07:31:01 +0000
commit6a6ee512cbbcda3295114a478bcb9e3ac3d464c1 (patch)
tree0df993453eeb26c9957f2084ba6b01ccf33996f2
parent29a928c376a5695a12f58bc0fb400e53b2676e54 (diff)
fix(terraform): AWS alignments
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Iba8742a755011515f7a455402b4b283c34fd78b2
-rw-r--r--fdio.infra.terraform/terraform-aws-2n-aws-c5n/main.tf4
-rw-r--r--fdio.infra.terraform/terraform-aws-subnet/variables.tf2
-rw-r--r--fdio.infra.terraform/terraform-aws-vpc/main.tf8
-rw-r--r--fdio.infra.terraform/terraform-aws-vpc/variables.tf8
4 files changed, 13 insertions, 9 deletions
diff --git a/fdio.infra.terraform/terraform-aws-2n-aws-c5n/main.tf b/fdio.infra.terraform/terraform-aws-2n-aws-c5n/main.tf
index a2ea1389bc..699992db98 100644
--- a/fdio.infra.terraform/terraform-aws-2n-aws-c5n/main.tf
+++ b/fdio.infra.terraform/terraform-aws-2n-aws-c5n/main.tf
@@ -24,6 +24,7 @@ module "vpc" {
subnet_availability_zone = local.availability_zone
tags_name = local.name
tags_environment = local.environment
+ vpc_enable_dns_hostnames = false
}
# Create Subnet
@@ -126,6 +127,7 @@ resource "aws_network_interface" "tg_if2" {
module.subnet_d,
aws_instance.tg
]
+ private_ip = var.tg_if2_private_ip
private_ips = [var.tg_if2_private_ip]
security_groups = [module.vpc.vpc_security_group_id]
source_dest_check = var.tg_source_dest_check
@@ -202,6 +204,7 @@ resource "aws_network_interface" "sut1_if1" {
module.subnet_b,
aws_instance.sut1
]
+ private_ip = var.sut1_if1_private_ip
private_ips = [var.sut1_if1_private_ip]
security_groups = [module.vpc.vpc_security_group_id]
source_dest_check = var.sut1_source_dest_check
@@ -223,6 +226,7 @@ resource "aws_network_interface" "sut1_if2" {
module.subnet_d,
aws_instance.sut1
]
+ private_ip = var.sut1_if2_private_ip
private_ips = [var.sut1_if2_private_ip]
security_groups = [module.vpc.vpc_security_group_id]
source_dest_check = var.sut1_source_dest_check
diff --git a/fdio.infra.terraform/terraform-aws-subnet/variables.tf b/fdio.infra.terraform/terraform-aws-subnet/variables.tf
index cae74bae78..c0e1fad157 100644
--- a/fdio.infra.terraform/terraform-aws-subnet/variables.tf
+++ b/fdio.infra.terraform/terraform-aws-subnet/variables.tf
@@ -14,7 +14,7 @@ variable "tags_environment" {
variable "subnet_assign_ipv6_address_on_creation" {
description = "Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address."
type = bool
- default = false
+ default = true
}
variable "subnet_availability_zone" {
diff --git a/fdio.infra.terraform/terraform-aws-vpc/main.tf b/fdio.infra.terraform/terraform-aws-vpc/main.tf
index fb51a7b385..1b84f8e351 100644
--- a/fdio.infra.terraform/terraform-aws-vpc/main.tf
+++ b/fdio.infra.terraform/terraform-aws-vpc/main.tf
@@ -26,6 +26,14 @@ resource "aws_security_group" "security_group" {
tags = local.tags
vpc_id = aws_vpc.vpc.id
+ ingress {
+ from_port = 0
+ to_port = 0
+ protocol = -1
+ self = true
+ ipv6_cidr_blocks = ["::/0"]
+ }
+
dynamic "ingress" {
for_each = var.security_group_ingress
content {
diff --git a/fdio.infra.terraform/terraform-aws-vpc/variables.tf b/fdio.infra.terraform/terraform-aws-vpc/variables.tf
index 5c7c8dc79a..a501356063 100644
--- a/fdio.infra.terraform/terraform-aws-vpc/variables.tf
+++ b/fdio.infra.terraform/terraform-aws-vpc/variables.tf
@@ -71,14 +71,6 @@ variable "security_group_ingress" {
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
},
- {
- from_port = 0
- to_port = 0
- protocol = -1
- self = true
- cidr_blocks = ["0.0.0.0/0"]
- ipv6_cidr_blocks = ["::/0"]
- },
]
}