-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for nsacls. Every acl has to be a sub resource of the net…
…scaler_nsacls resource. This way whenever there is a change or update, Terraform will know to call apply on the nsacls after all acl objects have been created/updated/deleted
- Loading branch information
Showing
6 changed files
with
681 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
provider "netscaler" { | ||
endpoint = "http://localhost:32771/" | ||
endpoint = "http://localhost:32769/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
|
||
resource "netscaler_nsacl" "acl1" { | ||
aclname = "restrict" | ||
protocol = "TCP" | ||
aclaction = "DENY" | ||
destipval = "192.168.1.20" | ||
srcportval = "49-1024" | ||
} | ||
|
||
resource "netscaler_nsacl" "acl2" { | ||
aclname = "restrictudp" | ||
protocol = "UDP" | ||
aclaction = "DENY" | ||
destipval = "192.168.1.2" | ||
srcportval = "45-10024" | ||
} | ||
|
||
resource "netscaler_nsacl" "acl3" { | ||
aclname = "restricttcp2" | ||
protocol = "TCP" | ||
aclaction = "ALLOW" | ||
destipval = "192.168.1.40" | ||
srcportval = "149-1024" | ||
} | ||
|
||
resource "netscaler_nsacl" "acl4" { | ||
aclname = "restrictudp2" | ||
protocol = "UDP" | ||
aclaction = "ALLOW" | ||
destipval = "192.168.10.2" | ||
srcportval = "490-1024" | ||
} | ||
resource "netscaler_nsacls" "allacls" { | ||
aclsname = "foo" | ||
"acl" { | ||
aclname = "restrict" | ||
protocol = "TCP" | ||
aclaction = "DENY" | ||
destipval = "192.168.1.20" | ||
srcportval = "49-1024" | ||
} | ||
|
||
resource "netscaler_nsacl" "acl5" { | ||
aclname = "restrictvlan" | ||
aclaction = "DENY" | ||
vlan = "2000" | ||
} | ||
"acl" { | ||
aclname = "restrictudp" | ||
protocol = "UDP" | ||
aclaction = "DENY" | ||
destipval = "192.168.1.2" | ||
srcportval = "45-10024" | ||
} | ||
|
||
"acl" { | ||
aclname = "restricttcp2" | ||
protocol = "TCP" | ||
aclaction = "DENY" | ||
destipval = "192.168.199.52" | ||
srcportval = "149-1524" | ||
} | ||
|
||
"acl" { | ||
aclname = "restrictudp2" | ||
protocol = "UDP" | ||
aclaction = "DENY" | ||
destipval = "192.168.45.55" | ||
srcportval = "490-1024" | ||
priority = "100" | ||
} | ||
|
||
"acl" { | ||
aclname = "restrictvlan" | ||
aclaction = "DENY" | ||
vlan = "2000" | ||
} | ||
|
||
resource "netscaler_nsacls" "allacls" { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.