generated from equinix-labs/terraform-equinix-template
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: onboarding Aviatrix edge 7.1 device #38
Open
schadalawada
wants to merge
3
commits into
main
Choose a base branch
from
aviatrix-edge-7.1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Network Edge Device Aviatrix Edge 7.1 HA Device Example | ||
|
||
This example demonstrates creation of Network Edge Aviatrix Edge 7.1 HA device. It will: | ||
|
||
- Create a ACL template | ||
- Upload Aviatrix bootstrap file | ||
- Provision Aviatrix Edge 7.1 HA device | ||
|
||
## Usage | ||
|
||
To provision this example, you should clone the github repository and run terraform from within this directory: | ||
|
||
```bash | ||
git clone https://github.com/equinix/terraform-equinix-network-edge.git | ||
cd terraform-equinix-network-edge/examples/aviatrix-edge-7.1-ha | ||
terraform init | ||
terraform apply | ||
``` | ||
|
||
Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these resources. | ||
|
||
<!-- BEGIN_TF_DOCS --> | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
| --------------------------------------------------------------------------- | --------- | | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 | | ||
| <a name="requirement_equinix"></a> [equinix](#requirement\_equinix) | >= 1.34 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
| --------------------------------------------------------------- | --------- | | ||
| <a name="provider_equinix"></a> [equinix](#provider\_equinix) | >= 1.34 | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
| ------------------------------------------------------------------------------------------------- | --------------------------------- | --------- | | ||
| <a name="aviatrix-edge-7.1-single_ha"></a> [Aviatrix_Edge_7.1-ha](#aviatrix-edge-7.1-single_ha) | ../../modules/Aviatrix Edge 7.1 | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | | ||
| [equinix_network_acl_template.aviatrix_edge_7_1_ha_wan_acl_template](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_acl_template) | resource | | ||
| [equinix_network_file.aviatrix_edge_7_1_ha_bootstrap_file](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_file) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | --------- | :--------: | | ||
| <a name="input_equinix_client_id"></a> [equinix\_client\_id](#input\_equinix\_client\_id) | API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTID shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_equinix_client_secret"></a> [equinix\_client\_secret](#input\_equinix\_client\_secret) | API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTSECRET shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_metro_code_primary"></a> [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
| ---------------------------------------------------------------------------------- | ------------------------ | | ||
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details | | ||
|
||
<!-- END_TF_DOCS --> |
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,68 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "aviatrix_edge_7_1" { | ||
source = "../../modules/aviatrix-edge-7.1" | ||
name = "terraform-test-aviatrix-edge-7.1-primary" | ||
metro_code = data.equinix_network_account.ny.metro_code | ||
account_number = data.equinix_network_account.ny.number | ||
platform = "small" | ||
software_package = "STD" | ||
vnf_version = 7.1 | ||
project_id = "c9a8e930-5f54-4d8b-8e4d-0fc2c3f034af" | ||
term_length = 1 | ||
notifications = ["[email protected]"] | ||
additional_bandwidth = 50 | ||
cloud_init_file_id = equinix_network_file.aviatrix_edge_7_1_ha_bootstrap_file.uuid | ||
acl_template_id = equinix_network_acl_template.aviatrix_edge_7_1_ha_wan_acl_template.id | ||
|
||
secondary = { | ||
name = "terraform-test-aviatrix-edge-7.1-secondary" | ||
enabled = true | ||
metro_code = var.metro_code_secondary | ||
cloud_init_file_id = equinix_network_file.aviatrix_edge_7_1_ha_bootstrap_file_sec.uuid | ||
acl_template_id = equinix_network_acl_template.aviatrix_edge_7_1_ha_wan_acl_template.id | ||
account_number = data.equinix_network_account.ny.number | ||
} | ||
|
||
} | ||
|
||
|
||
resource "equinix_network_acl_template" "aviatrix_edge_7_1_ha_wan_acl_template" { | ||
name = "tf-aviatrix-edge-7.1-ha-wan-acl" | ||
description = "Primary aviatrix-edge-7.1 wan ACL template" | ||
inbound_rule { | ||
subnet = "0.0.0.0/0" | ||
protocol = "TCP" | ||
src_port = "any" | ||
dst_port = "22" | ||
} | ||
} | ||
|
||
resource "equinix_network_file" "aviatrix_edge_7_1_ha_bootstrap_file" { | ||
file_name = "aviatrix.txt" | ||
content = file("${path.module}/../../files/aviatrix-edge-7.1/aviatrix.txt") | ||
metro_code = var.metro_code_primary | ||
device_type_code = "AVIATRIX_EDGE" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} | ||
|
||
resource "equinix_network_file" "aviatrix_edge_7_1_ha_bootstrap_file_sec" { | ||
file_name = "aviatrix.txt" | ||
content = file("${path.module}/../../files/aviatrix-edge-7.1/aviatrix.txt") | ||
metro_code = var.metro_code_secondary | ||
device_type_code = "AVIATRIX_EDGE" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} | ||
|
||
data "equinix_network_account" "ny" { | ||
name = "test" | ||
metro_code = "NY" | ||
project_id = "c9a8e930-5f54-4d8b-8e4d-0fc2c3f034af" | ||
} |
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,4 @@ | ||
output "device_details" { | ||
description = "Virtual device details" | ||
value = module.aviatrix_edge_7_1 | ||
} |
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 @@ | ||
variable "equinix_client_id" { | ||
type = string | ||
description = "API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTID shell environment variable." | ||
} | ||
|
||
variable "equinix_client_secret" { | ||
type = string | ||
description = "API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTSECRET shell environment variable." | ||
} | ||
variable "metro_code_primary" { | ||
description = "Primary device location metro code" | ||
type = string | ||
} | ||
variable "metro_code_secondary" { | ||
description = "Secondary device location metro code" | ||
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,9 @@ | ||
terraform { | ||
required_version = ">= 1.3" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = "~> 1.34" | ||
} | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
examples/aviatrix-edge-7.1-private-connectivity-ha/README.md
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,61 @@ | ||
# Network Edge Device Aviatrix Edge 7.1 Private connectivity Single Device Example | ||
|
||
This example demonstrates creation of Network Edge Aviatrix Edge 7.1 HA device with private connectivity. It will: | ||
|
||
- Upload Aviatrix bootstrap file | ||
- Provision Aviatrix Edge 7.1 single device with private connectivity | ||
|
||
## Usage | ||
|
||
To provision this example, you should clone the github repository and run terraform from within this directory: | ||
|
||
```bash | ||
git clone https://github.com/equinix/terraform-equinix-network-edge.git | ||
cd terraform-equinix-network-edge/examples/aviatrix-edge-7.1-private-connectivity-ha | ||
``` | ||
|
||
Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these resources. | ||
|
||
<!-- BEGIN_TF_DOCS --> | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
| --------------------------------------------------------------------------- | --------- | | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 | | ||
| <a name="requirement_equinix"></a> [equinix](#requirement\_equinix) | >= 1.34 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
| --------------------------------------------------------------- | --------- | | ||
| <a name="provider_equinix"></a> [equinix](#provider\_equinix) | >= 1.34 | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
| ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | --------- | | ||
| | | | | ||
| [Aviatrix_Edge_7.1aviatrix-edge-7.1-private-connectivity-ha](#aviatrix-edge-7.1-aviatrix-edge-7.1-private-connectivity-ha) | ../../modules/Aviatrix Edge 7.1<br /> | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | | ||
| [equinix_network_file.aviatrix_edge_7_1_bootstrap_file](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_file) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | --------- | :--------: | | ||
| <a name="input_equinix_client_id"></a> [equinix\_client\_id](#input\_equinix\_client\_id) | API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTID shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_equinix_client_secret"></a> [equinix\_client\_secret](#input\_equinix\_client\_secret) | API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTSECRET shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_metro_code_primary"></a> [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
| ---------------------------------------------------------------------------------- | ------------------------ | | ||
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details | | ||
|
||
<!-- END_TF_DOCS --> |
54 changes: 54 additions & 0 deletions
54
examples/aviatrix-edge-7.1-private-connectivity-ha/main.tf
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,54 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "aviatrix_edge_7_1" { | ||
source = "../../modules/aviatrix-edge-7.1" | ||
name = "terraform-test-aviatrix-edge-7.1-primary" | ||
metro_code = data.equinix_network_account.ny.metro_code | ||
account_number = data.equinix_network_account.ny.number | ||
platform = "small" | ||
software_package = "STD" | ||
vnf_version = 7.1 | ||
project_id = "c9a8e930-5f54-4d8b-8e4d-0fc2c3f034af" | ||
term_length = 1 | ||
connectivity = "PRIVATE" | ||
notifications = ["[email protected]"] | ||
additional_bandwidth = 50 | ||
cloud_init_file_id = equinix_network_file.aviatrix_edge_7_1_bootstrap_file.uuid | ||
|
||
secondary = { | ||
enabled = true | ||
name = "terraform-test-aviatrix-edge-7.1-secondary" | ||
metro_code = var.metro_code_secondary | ||
cloud_init_file_id = equinix_network_file.aviatrix_edge_7_1_ha_bootstrap_file_sec.uuid | ||
account_number = data.equinix_network_account.ny.number | ||
} | ||
} | ||
|
||
resource "equinix_network_file" "aviatrix_edge_7_1_bootstrap_file" { | ||
file_name = "aviatrix.txt" | ||
content = file("${path.module}/../../files/aviatrix-edge-7.1/aviatrix.txt") | ||
metro_code = var.metro_code_primary | ||
device_type_code = "AVIATRIX_EDGE" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} | ||
|
||
data "equinix_network_account" "ny" { | ||
name = "test" | ||
metro_code = "NY" | ||
project_id = "c9a8e930-5f54-4d8b-8e4d-0fc2c3f034af" | ||
} | ||
|
||
resource "equinix_network_file" "aviatrix_edge_7_1_ha_bootstrap_file_sec" { | ||
file_name = "aviatrix.txt" | ||
content = file("${path.module}/../../files/aviatrix-edge-7.1/aviatrix.txt") | ||
metro_code = var.metro_code_secondary | ||
device_type_code = "AVIATRIX_EDGE" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/aviatrix-edge-7.1-private-connectivity-ha/outputs.tf
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,4 @@ | ||
output "device_details" { | ||
description = "Virtual device details" | ||
value = module.aviatrix_edge_7_1 | ||
} |
17 changes: 17 additions & 0 deletions
17
examples/aviatrix-edge-7.1-private-connectivity-ha/variables.tf
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 @@ | ||
variable "equinix_client_id" { | ||
type = string | ||
description = "API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTID shell environment variable." | ||
} | ||
|
||
variable "equinix_client_secret" { | ||
type = string | ||
description = "API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTSECRET shell environment variable." | ||
} | ||
variable "metro_code_primary" { | ||
description = "Primary device location metro code" | ||
type = string | ||
} | ||
variable "metro_code_secondary" { | ||
description = "Secondary device location metro code" | ||
type = string | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/aviatrix-edge-7.1-private-connectivity-ha/versions.tf
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,9 @@ | ||
terraform { | ||
required_version = ">= 1.3" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = "~> 1.34" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
} | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
examples/aviatrix-edge-7.1-private-connectivity-single/README.md
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,60 @@ | ||
# Network Edge Device Aviatrix Edge 7.1 Private connectivity Single Device Example | ||
|
||
This example demonstrates creation of Network Edge Aviatrix Edge 7.1 single device with private connectivity. It will: | ||
|
||
- Upload Aviatrix bootstrap file | ||
- Provision Aviatrix Edge 7.1 single device with private connectivity | ||
|
||
## Usage | ||
|
||
To provision this example, you should clone the github repository and run terraform from within this directory: | ||
|
||
```bash | ||
git clone https://github.com/equinix/terraform-equinix-network-edge.git | ||
cd terraform-equinix-network-edge/examples/aviatrix-edge-7.1-private-connectivity-single | ||
``` | ||
|
||
Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these resources. | ||
|
||
<!-- BEGIN_TF_DOCS --> | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
| --------------------------------------------------------------------------- | --------- | | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 | | ||
| <a name="requirement_equinix"></a> [equinix](#requirement\_equinix) | >= 1.34 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
| --------------------------------------------------------------- | --------- | | ||
| <a name="provider_equinix"></a> [equinix](#provider\_equinix) | >= 1.34 | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
| ------------------------------------------------------------------------------------------------- | --------------------------------------- | --------- | | ||
| [Aviatrix_Edge_7.1-private-connectivity-single](#aviatrix-edge-7.1-private-connectivity-single) | ../../modules/Aviatrix Edge 7.1<br /> | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | | ||
| [equinix_network_file.aviatrix_edge_7_1_bootstrap_file](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_file) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | --------- | :--------: | | ||
| <a name="input_equinix_client_id"></a> [equinix\_client\_id](#input\_equinix\_client\_id) | API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTID shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_equinix_client_secret"></a> [equinix\_client\_secret](#input\_equinix\_client\_secret) | API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTSECRET shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_metro_code_primary"></a> [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
| ---------------------------------------------------------------------------------- | ------------------------ | | ||
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details | | ||
|
||
<!-- END_TF_DOCS --> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it >=1.34 to keep it consistent across modules.