Skip to content
Snippets Groups Projects
Commit 0e7303c0 authored by Chris Zhang's avatar Chris Zhang
Browse files

security group change

parent 13db334d
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ resource "aws_network_interface" "bigip-mgmt" { ...@@ -3,7 +3,7 @@ resource "aws_network_interface" "bigip-mgmt" {
subnet_id = (local.vpc_mgmt_subnet_ids)[count.index] subnet_id = (local.vpc_mgmt_subnet_ids)[count.index]
source_dest_check = "false" source_dest_check = "false"
private_ips = [(var.mgmt_private_ip)[count.index]] private_ips = [(var.mgmt_private_ip)[count.index]]
security_groups = [aws_security_group.chzhang-tf-sg-Internet.id] security_groups = [aws_security_group.sg-Internet.id]
tags = { tags = {
Name = format("%s-bigip-mgmt-%s-%s", var.prefix, count.index, random_id.id.hex) Name = format("%s-bigip-mgmt-%s-%s", var.prefix, count.index, random_id.id.hex)
...@@ -15,7 +15,7 @@ resource "aws_network_interface" "bigip-ext" { ...@@ -15,7 +15,7 @@ resource "aws_network_interface" "bigip-ext" {
subnet_id = (local.vpc_public_subnet_ids)[count.index] subnet_id = (local.vpc_public_subnet_ids)[count.index]
source_dest_check = "false" source_dest_check = "false"
private_ips = [(var.ext_selfip)[count.index], (var.app1_vip)[count.index]] private_ips = [(var.ext_selfip)[count.index], (var.app1_vip)[count.index]]
security_groups = [aws_security_group.chzhang-tf-sg-Internet.id] security_groups = [aws_security_group.sg-Internet.id]
tags = { tags = {
Name = format("%s-bigip-ext-%s-%s", var.prefix, count.index, random_id.id.hex) Name = format("%s-bigip-ext-%s-%s", var.prefix, count.index, random_id.id.hex)
...@@ -28,7 +28,7 @@ resource "aws_network_interface" "bigip-int" { ...@@ -28,7 +28,7 @@ resource "aws_network_interface" "bigip-int" {
subnet_id = (local.vpc_private_subnet_ids)[count.index] subnet_id = (local.vpc_private_subnet_ids)[count.index]
source_dest_check = "false" source_dest_check = "false"
private_ips = [(var.int_selfip)[count.index]] private_ips = [(var.int_selfip)[count.index]]
security_groups = [aws_security_group.chzhang-tf-sg-main.id] security_groups = [aws_security_group.sg-main.id]
tags = { tags = {
Name = format("%s-bigip-int-%s-%s", var.prefix, count.index, random_id.id.hex) Name = format("%s-bigip-int-%s-%s", var.prefix, count.index, random_id.id.hex)
......
resource "aws_security_group" "chzhang-tf-sg-Internet" { resource "aws_security_group" "sg-Internet" {
name = format("%s-sg-Internet-%s", var.prefix, random_id.id.hex) name = format("%s-sg-Internet-%s", var.prefix, random_id.id.hex)
description = "Internet facing rules" description = "Internet facing rules"
vpc_id = module.vpc.vpc_id vpc_id = module.vpc.vpc_id
...@@ -47,7 +47,7 @@ resource "aws_security_group" "chzhang-tf-sg-Internet" { ...@@ -47,7 +47,7 @@ resource "aws_security_group" "chzhang-tf-sg-Internet" {
} }
} }
resource "aws_security_group" "chzhang-tf-sg-main" { resource "aws_security_group" "sg-main" {
name = format("%s-sg-main-%s", var.prefix, random_id.id.hex) name = format("%s-sg-main-%s", var.prefix, random_id.id.hex)
description = "main rules" description = "main rules"
vpc_id = module.vpc.vpc_id vpc_id = module.vpc.vpc_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment