Skip to content

Commit

Permalink
- "vcd_nsxt_firewall" Module Release 1.3.1
Browse files Browse the repository at this point in the history
- Added the "org" Argument to the "vcd_vdc_group" Data Source

- Added the "org" Argument to the "vcd_nsxt_edgegateway" Data Source

- Added the "org" Argument to the "vcd_nsxt_firewall" Data Source

- Added the "org" Argument to the "vcd_nsxt_app_port_profile" Data Source

- Added the "org" Argument to the "vcd_nsxt_ip_set" Data Source

- Added the "org" Argument to the "vcd_nsxt_dynamic_security_group" Data Source

- Added the "org" Argument to the "vcd_nsxt_security_group" Data Source

- Added the "org" Argument to the "vcd_nsxt_firewall" Resource

- Updated the source URL Reference in the "vcd_nsxt_firewall" Module Code Snippet to Version 1.3.1 in the Example Usage Section of the README
  • Loading branch information
scafeman committed Dec 11, 2023
1 parent b0f8bad commit ba4bc10
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*.tfstate.*
secrets.tfvars
secrets.auto.tfvars
terraform.tfvars
terraform.auto.tfvars
providers.tf

# Crash log files
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This Terraform module deploys NSX-T Edge Gateway Firewall Rules into an existing

```terraform
module "vcd_nsxt_firewall" {
source = "github.com/global-vmware/vcd_nsxt_firewall.git?ref=v1.3.0"
source = "github.com/global-vmware/vcd_nsxt_firewall.git?ref=v1.3.1"
vdc_org_name = "<VDC-ORG-NAME>"
vdc_group_name = "<VDC-GRP-NAME>"
Expand Down
21 changes: 14 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,46 @@ terraform {

# Create the Datacenter Group data source
data "vcd_vdc_group" "dcgroup" {
name = var.vdc_group_name
org = var.vdc_org_name
name = var.vdc_group_name
}

# Create the NSX-T Edge Gateway data source
data "vcd_nsxt_edgegateway" "edge_gateway" {
org = var.vdc_org_name
owner_id = data.vcd_vdc_group.dcgroup.id
name = var.vdc_edge_name
org = var.vdc_org_name
owner_id = data.vcd_vdc_group.dcgroup.id
name = var.vdc_edge_name
}

# Create the NSX-T Data Center Edge Gateway Firewall data source
data "vcd_nsxt_firewall" "edge_fw" {
org = var.vdc_org_name
edge_gateway_id = data.vcd_nsxt_edgegateway.edge_gateway.id
}

data "vcd_nsxt_app_port_profile" "app_port_profiles" {
for_each = var.app_port_profiles
name = each.key
scope = each.value
org = var.vdc_org_name
for_each = var.app_port_profiles
name = each.key
scope = each.value
}

data "vcd_nsxt_ip_set" "ip_sets" {
org = var.vdc_org_name
for_each = toset(var.ip_set_names)
edge_gateway_id = data.vcd_nsxt_edgegateway.edge_gateway.id
name = each.value
}

data "vcd_nsxt_dynamic_security_group" "dynamic_security_groups" {
org = var.vdc_org_name
for_each = toset(var.dynamic_security_group_names)
vdc_group_id = data.vcd_vdc_group.dcgroup.id
name = each.value
}

data "vcd_nsxt_security_group" "security_groups" {
org = var.vdc_org_name
for_each = toset(var.security_group_names)
edge_gateway_id = data.vcd_nsxt_edgegateway.edge_gateway.id
name = each.value
Expand All @@ -60,6 +66,7 @@ locals {
}

resource "vcd_nsxt_firewall" "edge_firewall" {
org = var.vdc_org_name
edge_gateway_id = data.vcd_nsxt_edgegateway.edge_gateway.id

dynamic "rule" {
Expand Down

0 comments on commit ba4bc10

Please sign in to comment.