-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat/1.9.3 (#633) Co-authored-by: Abhishekism9450 <[email protected]> Co-authored-by: Deepak Muley <[email protected]> Co-authored-by: Abhishek <[email protected]> * Feat/1.9.4 (#645) Co-authored-by: Frederic M <[email protected]> Co-authored-by: ArtemProt <[email protected]> Co-authored-by: Abhishekism9450 <[email protected]> * new tf design * import changes * package name change for fc * package name for fc is foundationCentral * package name to foundationcentral * fixes around acctest * examples folder * v4 design * some fixes after merging * datasource for subnets,vpcs, fips * resource for subnets * adding go mod for public repo * lint fixes * lint fix * lint fix for client name * test config as client will be different for sdks * adding crud for fips * test for subnet * docs for subnet * tcs for fips * lint fixes * lint fix in fips * lint fix * docs for fip * docs and tcs for vpc * delete vendor and exclude vendor folder * change the subnets, floating_ip and vpc module name from v4 to v2, add examples * fix acc test cases for resource services * fix acc test cases for datasource services, use internal sdk, create the resources that test cases needed within the test case itself * change package name from networking to networkingv2 * Revert "delete vendor and exclude vendor folder" This reverts commit 34ac198. * Feat/v4 pbrs on v4 networks (#13) * datasource for pbrs * lint fixes. go error (gomnd, gosimple, golint) * go checks, magic numbers(gomnd) * fix config testcase as base client will differ in sdks * tests and docs for pbrs * change module name from v4 to v2 * change package name to networkingv2 * add pbr_v2 example * fix import --------- Co-authored-by: Abhishek <[email protected]> * Feat/v4 static routes on v4 networks (#14) * datasource for pbrs * lint fixes. go error (gomnd, gosimple, golint) * go checks, magic numbers(gomnd) * fix config testcase as base client will differ in sdks * datasourc for route tables * resource for static route * tests and docs for pbrs * docs for route table * docs for static route * lint fixes * remove other services * change module name from v4 to v2 * change package name to networkingv2 * change package name to networkingv2 * remove other services --------- Co-authored-by: Abhishek <[email protected]> * Feat/v4 network security rules on v4 networks (#15) * datasource for pbrs * lint fixes. go error (gomnd, gosimple, golint) * go checks, magic numbers(gomnd) * fix config testcase as base client will differ in sdks * datasourc for route tables * resource for static route * address groups v4 * service groups * resource for service groups * crud for service groups * CRUD for address groups * data source for network security * CRUD for network security * tests and docs for pbrs * docs for route table * docs for static route * lint fixes * testcases for address groups * fixing lint issues * lint fix * docs for address groups * test and docs for service groups * docs and tcs for NSP * resource tests for NSP * tcs for NSP * remove other services * change module name from v4 to v2 * change package name to networkingv2 --------- Co-authored-by: Abhishek <[email protected]> * Feat/v4 address group on v4 networks (#16) * datasource for pbrs * lint fixes. go error (gomnd, gosimple, golint) * go checks, magic numbers(gomnd) * fix config testcase as base client will differ in sdks * datasourc for route tables * resource for static route * address groups v4 * service groups * resource for service groups * crud for service groups * CRUD for address groups * tests and docs for pbrs * docs for route table * docs for static route * lint fixes * testcases for address groups * fixing lint issues * lint fix * docs for address groups * test and docs for service groups * add examples for address group and service group * add examples for address group and service group * add examples for address group and service group * Revert "add examples for address group and service group" This reverts commit 4c1cc92f031ae60a97604a17a374fd2930b21acb. * remove other modules * change module name from v4 to v2 * change package name from v2 --------- Co-authored-by: Abhishek <[email protected]> --------- Co-authored-by: Abhishek Chaudhary <[email protected]> Co-authored-by: Abhishekism9450 <[email protected]> Co-authored-by: Deepak Muley <[email protected]> Co-authored-by: Abhishek <[email protected]> Co-authored-by: Frederic M <[email protected]> Co-authored-by: ArtemProt <[email protected]>
- Loading branch information
1 parent
40a3c7b
commit 91afc14
Showing
112 changed files
with
18,171 additions
and
21 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
terraform{ | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "1.7.0" | ||
} | ||
} | ||
} | ||
|
||
#definig nutanix configuration | ||
provider "nutanix"{ | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
# Add Address group. | ||
resource "nutanix_address_groups_v2" "example_1" { | ||
name = "address_group" | ||
description = "address group description" | ||
ipv4_addresses{ | ||
value = "10.0.0.0" | ||
prefix_length = 24 | ||
} | ||
} | ||
|
||
# Add Address group. with ip range | ||
resource "nutanix_address_groups_v2" "example_2" { | ||
name = "address_group" | ||
description = "address group description" | ||
ip_ranges{ | ||
start_ip = "10.0.0.1" | ||
end_ip = "10.0.0.10" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} |
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
terraform{ | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "1.6.0" | ||
} | ||
} | ||
} | ||
|
||
#definig nutanix configuration | ||
provider "nutanix"{ | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
|
||
# create Floating IP with External Subnet UUID | ||
resource "nutanix_floating_ip_v2" "fip1" { | ||
name = "example-fip" | ||
description = "example fip description" | ||
external_subnet_reference = "{{ext_sub_uuid}}" | ||
} | ||
|
||
|
||
# create Floating IP with vpc UUID with external subnet uuid | ||
|
||
resource "nutanix_floating_ip_v2" "fip2" { | ||
name = "example-fip" | ||
description = "example fip description" | ||
external_subnet_reference_uuid = "{{ext_sub_uuid}}" | ||
vpc_reference_uuid= "{{vpc_uuid}}" | ||
association{ | ||
private_ip_association{ | ||
vpc_reference = "{{vpc_uuid}}" | ||
private_ip{ | ||
ipv4{ | ||
value = "10.44.44.7" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
# create Floating IP with External Subnet with vm | ||
|
||
resource "nutanix_floating_ip" "fip3" { | ||
name = "example-fip" | ||
description = "example fip description" | ||
external_subnet_reference_uuid = "{{ext_sub_uuid}}" | ||
association{ | ||
vm_nic_association{ | ||
vm_nic_reference = "{{vm_nic_uuid}}" | ||
} | ||
} | ||
} | ||
|
||
# data source floating IP | ||
|
||
data "nutanix_floating_ip_v2" "fip4"{ | ||
floating_ip_uuid = "{{floating_ip_uuid}}" | ||
} | ||
|
||
# list of floating IPs | ||
|
||
data "nutanix_floating_ips_v2" "fip5"{ } | ||
|
||
output "csf1" { | ||
value = data.nutanix_floating_ips_v2.fip5 | ||
} | ||
|
||
|
||
|
||
data "nutanix_floating_ips_v2" "fip6"{ | ||
metadata{ | ||
filter = "name eq 'example-fip'" | ||
} | ||
} | ||
|
||
output "csf2" { | ||
value = data.nutanix_floating_ips_v2.fip6 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,118 @@ | ||
terraform{ | ||
required_providers { | ||
nutanix = { | ||
source = "nutanix/nutanix" | ||
version = "1.6.0" | ||
} | ||
} | ||
} | ||
|
||
#defining nutanix configuration | ||
provider "nutanix"{ | ||
username = var.nutanix_username | ||
password = var.nutanix_password | ||
endpoint = var.nutanix_endpoint | ||
port = 9440 | ||
insecure = true | ||
} | ||
|
||
# create PBR with vpc name with any source or destination or protocol with permit action | ||
|
||
resource "nutanix_pbr_v2" "pbr1" { | ||
name = "%[1]s" | ||
description = "%[2]s" | ||
vpc_ext_id = var.vpc_reference_uuid | ||
priority = 14 | ||
policies{ | ||
policy_match{ | ||
source{ | ||
address_type = "ANY" | ||
} | ||
destination{ | ||
address_type = "ANY" | ||
} | ||
protocol_type = "UDP" | ||
} | ||
policy_action{ | ||
action_type = "PERMIT" | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
# create PBR with vpc uuid with source external | ||
|
||
resource "nutanix_pbr_v2" "pbr2" { | ||
name = "%[1]s" | ||
description = "%[2]s" | ||
vpc_ext_id = var.vpc_reference_uuid | ||
priority = 11 | ||
policies{ | ||
policy_match{ | ||
source{ | ||
address_type = "EXTERNAL" | ||
} | ||
destination{ | ||
address_type = "SUBNET" | ||
subnet_prefix{ | ||
ipv4{ | ||
ip{ | ||
value= "10.10.10.0" | ||
prefix_length = 24 | ||
} | ||
} | ||
} | ||
} | ||
protocol_type = "ANY" | ||
} | ||
policy_action{ | ||
action_type = "FORWARD" | ||
nexthop_ip_address{ | ||
ipv4{ | ||
value = "10.10.10.10" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
#create PBR with vpc name with source Any and destination external | ||
resource "nutanix_pbr_v2" "pbr3" { | ||
name = "%[1]s" | ||
description = "%[2]s" | ||
vpc_ext_id = var.vpc_reference_uuid | ||
priority = 14 | ||
policies{ | ||
policy_match{ | ||
source{ | ||
address_type = "ALL" | ||
} | ||
destination{ | ||
address_type = "INTERNET" | ||
} | ||
protocol_type = "UDP" | ||
} | ||
policy_action{ | ||
action_type = "PERMIT" | ||
} | ||
} | ||
} | ||
|
||
# list pbr | ||
|
||
data "nutanix_pbrs_v2" "pbr4" { | ||
} | ||
|
||
|
||
|
||
# get an entity with pbr uuid | ||
|
||
data "nutanix_pbr_v2" "pbr5" { | ||
ext_id = resource.nutanix_pbr_v2.rtest.ext_id | ||
depends_on = [ | ||
resource.nutanix_pbr_v2.rtest | ||
] | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#define values to the variables to be used in terraform file | ||
nutanix_username = "admin" | ||
nutanix_password = "password" | ||
nutanix_endpoint = "10.xx.xx.xx" | ||
nutanix_port = 9440 | ||
vpc_reference_uuid = "<vpc_uuid>" |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#define the type of variables to be used in terraform file | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
variable "nutanix_password" { | ||
type = string | ||
} | ||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
variable "nutanix_port" { | ||
type = string | ||
} | ||
|
||
variable "vpc_reference_uuid" { | ||
type = string | ||
} |
Oops, something went wrong.