diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b4a40243..b8b81f53a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,9 +6,28 @@ on: branches: - main - jobs: + validate_docs: + name: Validate docs + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: './go.mod' + id: go + + - name: Get dependencies + run: go mod download + + - name: Check that all docs changes are committed + run: | + make docs-check + test: name: Test runs-on: ubuntu-latest diff --git a/CODEOWNERS b/CODEOWNERS index e6821c65c..6562974b1 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,9 +3,10 @@ * @equinix/governor-devrel-engineering /cmd/migration-tool @equinix/governor-metal-client-interfaces *metal* @equinix/governor-metal-client-interfaces +docs/guides/network_types.md @equinix/governor-metal-client-interfaces *fabric* @equinix/governor-digin-fabric *connection_e2e* @equinix/governor-digin-fabric *resource_network_* @equinix/governor-ne-network-edge-engineering -*equinix_network_* @equinix/governor-ne-network-edge-engineering +docs/**/network_* @equinix/governor-ne-network-edge-engineering *data_source_network_* @equinix/governor-ne-network-edge-engineering **/edge-networking @equinix/governor-ne-network-edge-engineering diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5512601b9..022e27671 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,8 @@ Available via [https://github.com/equinix/terraform-provider-equinix/blob/main/. Please submit change requests and / or features via [Issues](https://github.com/equinix/terraform-provider-equinix/issues). There's no guarantee it'll be changed, but you never know until you try. We'll try to add comments as soon as possible, though. +All resource and data source changes must be reflected in the documentation, including new attributes and changes to existing attributes. The documentation is generated via `make docs`. For more detailed instructions for updating docs, see ["Documenting the provider" in the development guide](./DEVELOPMENT.md#documenting-the-provider). + ## How to Report a Bug -Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues/(https://github.com/equinix/terraform-provider-equinix/issues) as well. +Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/equinix/terraform-provider-equinix/issues) as well. diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5c94ec207..9e073e68a 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -6,6 +6,19 @@ * [Go](https://golang.org/doc/install) 1.18 (to build the provider plugin) * [GNU Make](https://www.gnu.org/software/make) (to build and test easier) +## Documenting the provider + +This project uses HashiCorp's [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) tool to generate docs. In particular, keep the [terraform-plugin-docs conventional paths](https://github.com/hashicorp/terraform-plugin-docs?tab=readme-ov-file#conventional-paths) in mind when adding or updating docs for a resource or data source. The conventional paths will tell you where to put examples if you are using the default templates. + +Templates for documentation are stored in the `templates` directory. The following default templates exist; try using them first and only add a resource- or data-source-specific template when needed: + +- Resource default template: templates/resources.md.tmpl +- Datasource default template: templates/data-sources.md.tmpl + +The documentation can be generated from the `templates` and `examples` directories using the `make docs` task. The `make check-docs` task is run in CI for every PR to ensure that all necessary docs changes have been committed and pushed to GitHub. + +**NOTE**: `terraform-plugin-docs` is focused on provider, resource, and datasource documentation. Guides must be created in the `templates` directory, but they cannot use templating functions; the `templates/guides` directory is copied to the `docs` directory as-is. + ## Building the provider *Note:* This project uses [Go Modules](https://blog.golang.org/using-go-modules) diff --git a/GNUmakefile b/GNUmakefile index d63275d43..94a07e8db 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -73,6 +73,17 @@ test-compile: fi go test -c $(TEST) $(TESTARGS) +.PHONY: docs docs-check + +docs: + go generate ./... + +docs-check: docs + if git status --porcelain | grep docs; then \ + echo "Uncommitted changes detected. Run 'make docs' and commit changes."; \ + exit 1; \ + fi + docs-lint: @echo "==> Checking docs against linters..." @misspell -error -source=text docs/ || (echo; \ diff --git a/docs/data-sources/equinix_metal_device.md b/docs/data-sources/equinix_metal_device.md deleted file mode 100644 index 3711d1ce3..000000000 --- a/docs/data-sources/equinix_metal_device.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -subcategory: "Metal" ---- - -# equinix_metal_device (Data Source) - -The datasource can be used to fetch a single device. - -If you need to fetch a list of devices which meet filter criteria, you can use the [equinix_metal_devices](equinix_metal_devices.md) datasource. - -~> **Note:** All arguments including the `root_password` and `user_data` will be stored in - the raw state as plain-text. -[Read more about sensitive data in state](https://developer.hashicorp.com/terraform/language/state/sensitive-data). - -## Example Usage - -```hcl -# Fetch a device data by hostname and show it's ID - -data "equinix_metal_device" "test" { - project_id = local.project_id - hostname = "mydevice" -} - -output "id" { - value = data.equinix_metal_device.test.id -} -``` - -```hcl -# Fetch a device data by ID and show its public IPv4 -data "equinix_metal_device" "test" { - device_id = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40" -} - -output "ipv4" { - value = data.equinix_metal_device.test.access_public_ipv4 -} -``` - -## Argument Reference - -The following arguments are supported: - -* `hostname` - (Optional) The device name. -* `project_id` - (Optional) The id of the project in which the devices exists. -* `device_id` - (Optional) Device ID. - --> **NOTE:** You should pass either `device_id`, or both `project_id` and `hostname`. - -## Attributes Reference - -In addition to all arguments above, the following attributes are exported: - -* `access_private_ipv4` - The ipv4 private IP assigned to the device. -* `access_public_ipv4` - The ipv4 management IP assigned to the device. -* `access_public_ipv6` - The ipv6 management IP assigned to the device. -* `billing_cycle` - The billing cycle of the device (monthly or hourly). -* `facility` - (**Deprecated**) The facility where the device is deployed. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) -* `description` - Description string for the device. -* `hardware_reservation_id` - The id of hardware reservation which this device occupies. -* `id` - The ID of the device. -* `metro` - The metro where the device is deployed -* `network` - The device's private and public IP (v4 and v6) network details. See -[Network Attribute](#network-attribute) below for more details. -* `network_type` - L2 network type of the device, one of `layer3`, `layer2-bonded`, -`layer2-individual`, `hybrid`. -* `operating_system` - The operating system running on the device. -* `plan` - The hardware config of the device. -* `ports` - List of ports assigned to the device. See [Ports Attribute](#ports-attribute) below for -more details. -* `root_password` - Root password to the server (if still available). -* `sos_hostname` - The hostname to use for [Serial over SSH](https://deploy.equinix.com/developers/docs/metal/resilience-recovery/serial-over-ssh/) access to the device -* `ssh_key_ids` - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys. -* `state` - The state of the device. -* `tags` - Tags attached to the device. - -### Network Attribute - -When a device is run without any special network, it will have 3 networks: - -* Public IPv4 at `equinix_metal_device.name.network.0`. -* IPv6 at `equinix_metal_device.name.network.1`. -* Private IPv4 at `equinix_metal_device.name.network.2`. - --> **NOTE:** Elastic addresses stack by type. An assigned public IPv4 will go after the management -public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned -private IPv4 will go after the management private IPv4 (to the end of the network list). - -Each element in the `network` list exports: - -* `address` - IPv4 or IPv6 address string. -* `cidr` - Bit length of the network mask of the address. -* `gateway` - Address of router. -* `public` - Whether the address is routable from the Internet. -* `family` - IP version. One of `4`, `6`. - -### Ports Attribute - -Each element in the `ports` list exports: - -* `name` - Name of the port (e.g. `eth0`, or `bond0`). -* `id` - ID of the port. -* `type` - Type of the port (e.g. `NetworkPort` or `NetworkBondPort`). -* `mac` - MAC address assigned to the port. -* `bonded` - Whether this port is part of a bond in bonded network setup. diff --git a/docs/data-sources/equinix_fabric_cloud_router.md b/docs/data-sources/fabric_cloud_router.md similarity index 95% rename from docs/data-sources/equinix_fabric_cloud_router.md rename to docs/data-sources/fabric_cloud_router.md index 61402c613..cefa161bd 100644 --- a/docs/data-sources/equinix_fabric_cloud_router.md +++ b/docs/data-sources/fabric_cloud_router.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch Fabric Cloud Router for a given UUID Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers ## Example Usage -```hcl +```terraform data "equinix_fabric_cloud_router" "cloud_router_data_name" { uuid = "" } @@ -63,6 +63,7 @@ output "type" { ``` + ## Schema ### Required @@ -92,14 +93,15 @@ output "type" { - `type` (String) Defines the FCR type like; XF_ROUTER + ### Nested Schema for `account` Read-Only: - `account_number` (Number) - + ### Nested Schema for `change_log` Read-Only: @@ -117,8 +119,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `location` Read-Only: @@ -128,8 +130,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `notifications` Read-Only: @@ -138,8 +140,8 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `order` Read-Only: @@ -149,20 +151,19 @@ Read-Only: - `order_number` (String) - `purchase_order_number` (String) - + ### Nested Schema for `package` Read-Only: - `code` (String) - + ### Nested Schema for `project` Read-Only: - `href` (String) - `project_id` (String) - diff --git a/docs/data-sources/equinix_fabric_cloud_routers.md b/docs/data-sources/fabric_cloud_routers.md similarity index 96% rename from docs/data-sources/equinix_fabric_cloud_routers.md rename to docs/data-sources/fabric_cloud_routers.md index de63ddecc..a00bc47ab 100644 --- a/docs/data-sources/equinix_fabric_cloud_routers.md +++ b/docs/data-sources/fabric_cloud_routers.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch Fabric Cloud Routers matching custom search criteria Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers ## Example Usage -```hcl +```terraform data "equinix_fabric_cloud_routers" "test" { filter { property = "/name" @@ -100,6 +100,7 @@ output "first_fcr_account_number" { ``` + ## Schema ### Required @@ -117,6 +118,7 @@ output "first_fcr_account_number" { - `id` (String) The ID of this resource. + ### Nested Schema for `filter` Required: @@ -129,8 +131,8 @@ Optional: - `or` (Boolean) Boolean flag indicating whether this filter is included in the OR group. There can only be one OR group and it can have a maximum of 3 filters. The OR group only counts as 1 of the 8 possible filters - + ### Nested Schema for `pagination` Optional: @@ -138,8 +140,8 @@ Optional: - `limit` (Number) Number of elements to be requested per page. Number must be between 1 and 100. Default is 20 - `offset` (Number) The page offset for the pagination request. Index of the first element. Default is 0. - + ### Nested Schema for `sort` Optional: @@ -147,8 +149,8 @@ Optional: - `direction` (String) The sorting direction. Can be one of: [DESC, ASC], Defaults to DESC - `property` (String) The property name to use in sorting. Can be one of the following: [/name, /uuid, /state, /location/metroCode, /location/metroName, /package/code, /changeLog/createdDateTime, /changeLog/updatedDateTime], Defaults to /changeLog/updatedDateTime - + ### Nested Schema for `data` Read-Only: @@ -174,14 +176,15 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.account` Read-Only: - `account_number` (Number) - + ### Nested Schema for `data.change_log` Read-Only: @@ -199,8 +202,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `data.location` Read-Only: @@ -210,8 +213,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `data.notifications` Read-Only: @@ -220,8 +223,8 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `data.order` Read-Only: @@ -231,16 +234,16 @@ Read-Only: - `order_number` (String) - `purchase_order_number` (String) - + ### Nested Schema for `data.package` Read-Only: - `code` (String) - + ### Nested Schema for `data.project` Read-Only: diff --git a/docs/data-sources/equinix_fabric_connection.md b/docs/data-sources/fabric_connection.md similarity index 98% rename from docs/data-sources/equinix_fabric_connection.md rename to docs/data-sources/fabric_connection.md index 9112dc2fc..55f3305fd 100644 --- a/docs/data-sources/equinix_fabric_connection.md +++ b/docs/data-sources/fabric_connection.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch connection for a given UUID Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections ## Example Usage -```hcl +```terraform data "equinix_fabric_connection" "connection_data_name" { uuid = "" } @@ -86,10 +86,10 @@ output "access_point_link_protocol_vlan_s_tag" { output "access_point_provider_connection_id" { value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.provider_connection_id } - ``` + ## Schema ### Required @@ -119,6 +119,7 @@ output "access_point_provider_connection_id" { - `z_side` (Set of Object) Destination or Provider side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedatt--z_side)) + ### Nested Schema for `a_side` Read-Only: @@ -128,6 +129,7 @@ Read-Only: - `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--service_token)) + ### Nested Schema for `a_side.access_point` Read-Only: @@ -149,6 +151,7 @@ Read-Only: - `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--virtual_device)) + ### Nested Schema for `a_side.access_point.account` Read-Only: @@ -162,8 +165,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `a_side.access_point.gateway` Read-Only: @@ -171,8 +174,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `a_side.access_point.interface` Read-Only: @@ -181,8 +184,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `a_side.access_point.link_protocol` Read-Only: @@ -192,8 +195,8 @@ Read-Only: - `vlan_s_tag` (Number) - `vlan_tag` (Number) - + ### Nested Schema for `a_side.access_point.location` Read-Only: @@ -203,8 +206,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `a_side.access_point.network` Read-Only: @@ -212,8 +215,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `a_side.access_point.port` Read-Only: @@ -224,6 +227,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `a_side.access_point.port.uuid` Read-Only: @@ -232,9 +236,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `a_side.access_point.profile` Read-Only: @@ -247,6 +250,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `a_side.access_point.profile.uuid` Read-Only: @@ -254,9 +258,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `a_side.access_point.router` Read-Only: @@ -264,8 +267,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `a_side.access_point.virtual_device` Read-Only: @@ -275,9 +278,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `a_side.additional_info` Read-Only: @@ -285,8 +287,8 @@ Read-Only: - `key` (String) - `value` (String) - + ### Nested Schema for `a_side.service_token` Read-Only: @@ -296,9 +298,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `account` Read-Only: @@ -312,8 +313,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -331,8 +332,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `notifications` Read-Only: @@ -341,8 +342,8 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `operation` Read-Only: @@ -352,6 +353,7 @@ Read-Only: - `provider_status` (String) + ### Nested Schema for `operation.errors` Read-Only: @@ -364,6 +366,7 @@ Read-Only: - `help` (String) + ### Nested Schema for `operation.errors.additional_info` Read-Only: @@ -371,10 +374,8 @@ Read-Only: - `property` (String) - `reason` (String) - - - + ### Nested Schema for `order` Read-Only: @@ -384,8 +385,8 @@ Read-Only: - `order_number` (String) - `purchase_order_number` (String) - + ### Nested Schema for `project` Read-Only: @@ -393,8 +394,8 @@ Read-Only: - `href` (String) - `project_id` (String) - + ### Nested Schema for `redundancy` Read-Only: @@ -402,8 +403,8 @@ Read-Only: - `group` (String) - `priority` (String) - + ### Nested Schema for `z_side` Read-Only: @@ -413,6 +414,7 @@ Read-Only: - `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--service_token)) + ### Nested Schema for `z_side.access_point` Read-Only: @@ -434,6 +436,7 @@ Read-Only: - `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--virtual_device)) + ### Nested Schema for `z_side.access_point.account` Read-Only: @@ -447,8 +450,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `z_side.access_point.gateway` Read-Only: @@ -456,8 +459,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `z_side.access_point.interface` Read-Only: @@ -466,8 +469,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `z_side.access_point.link_protocol` Read-Only: @@ -477,8 +480,8 @@ Read-Only: - `vlan_s_tag` (Number) - `vlan_tag` (Number) - + ### Nested Schema for `z_side.access_point.location` Read-Only: @@ -488,8 +491,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `z_side.access_point.network` Read-Only: @@ -497,8 +500,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `z_side.access_point.port` Read-Only: @@ -509,6 +512,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `z_side.access_point.port.uuid` Read-Only: @@ -517,9 +521,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `z_side.access_point.profile` Read-Only: @@ -532,6 +535,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `z_side.access_point.profile.uuid` Read-Only: @@ -539,9 +543,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `z_side.access_point.router` Read-Only: @@ -549,8 +552,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `z_side.access_point.virtual_device` Read-Only: @@ -560,9 +563,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `z_side.additional_info` Read-Only: @@ -570,8 +572,8 @@ Read-Only: - `key` (String) - `value` (String) - + ### Nested Schema for `z_side.service_token` Read-Only: diff --git a/docs/data-sources/fabric_connections.md b/docs/data-sources/fabric_connections.md index de9a0b5ee..8d31084e5 100644 --- a/docs/data-sources/fabric_connections.md +++ b/docs/data-sources/fabric_connections.md @@ -11,11 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch connection for a given UUID Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections # Example Usage -```hcl + +```terraform data "equinix_fabric_connections" "test" { outer_operator = "AND" filter { @@ -112,6 +113,7 @@ output "first_connection_zSide_location_metro_code" { ``` + ## Schema ### Required @@ -130,6 +132,7 @@ output "first_connection_zSide_location_metro_code" { - `id` (String) The ID of this resource. + ### Nested Schema for `filter` Required: @@ -142,8 +145,8 @@ Optional: - `group` (String) Optional custom id parameter to assign this filter to an inner AND or OR group. Group id must be prefixed with AND_ or OR_. Ensure intended grouped elements have the same given id. Ungrouped filters will be placed in the filter list group by themselves. - + ### Nested Schema for `pagination` Optional: @@ -151,8 +154,8 @@ Optional: - `limit` (Number) Number of elements to be requested per page. Number must be between 1 and 100. Default is 20 - `offset` (Number) The page offset for the pagination request. Index of the first element. Default is 0. - + ### Nested Schema for `sort` Optional: @@ -160,8 +163,8 @@ Optional: - `direction` (String) The sorting direction. Can be one of: [DESC, ASC], Defaults to DESC - `property` (String) The property name to use in sorting. One of [/name /direction /aSide/accessPoint/name /aSide/accessPoint/type /aSide/accessPoint/account/accountName /aSide/accessPoint/location/metroName /aSide/accessPoint/location/metroCode /aSide/accessPoint/linkProtocol/vlanCTag /aSide/accessPoint/linkProtocol/vlanSTag /zSide/accessPoint/name /zSide/accessPoint/type /zSide/accessPoint/account/accountName /zSide/accessPoint/location/metroName /zSide/accessPoint/location/metroCode /zSide/accessPoint/linkProtocol/vlanCTag /zSide/accessPoint/linkProtocol/vlanSTag /zSide/accessPoint/authenticationKey /bandwidth /geoScope /uuid /changeLog/createdDateTime /changeLog/updatedDateTime /operation/equinixStatus /operation/providerStatus /redundancy/priority]. Defaults to /changeLog/updatedDateTime - + ### Nested Schema for `data` Read-Only: @@ -187,6 +190,7 @@ Read-Only: - `z_side` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side)) + ### Nested Schema for `data.a_side` Read-Only: @@ -196,6 +200,7 @@ Read-Only: - `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--service_token)) + ### Nested Schema for `data.a_side.access_point` Read-Only: @@ -217,6 +222,7 @@ Read-Only: - `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--virtual_device)) + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -230,8 +236,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -239,8 +245,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -249,8 +255,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -260,8 +266,8 @@ Read-Only: - `vlan_s_tag` (Number) - `vlan_tag` (Number) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -271,8 +277,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -280,8 +286,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -292,6 +298,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.a_side.access_point.virtual_device.redundancy` Read-Only: @@ -300,9 +307,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -315,6 +321,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.a_side.access_point.virtual_device.access_point_type_configs` Read-Only: @@ -322,9 +329,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -332,8 +338,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `data.a_side.access_point.virtual_device` Read-Only: @@ -343,9 +349,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `data.a_side.additional_info` Read-Only: @@ -353,8 +358,8 @@ Read-Only: - `key` (String) - `value` (String) - + ### Nested Schema for `data.a_side.service_token` Read-Only: @@ -364,9 +369,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `data.account` Read-Only: @@ -380,8 +384,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `data.change_log` Read-Only: @@ -399,8 +403,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `data.notifications` Read-Only: @@ -409,8 +413,8 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `data.operation` Read-Only: @@ -420,6 +424,7 @@ Read-Only: - `provider_status` (String) + ### Nested Schema for `data.operation.errors` Read-Only: @@ -432,6 +437,7 @@ Read-Only: - `help` (String) + ### Nested Schema for `data.operation.errors.help` Read-Only: @@ -439,10 +445,8 @@ Read-Only: - `property` (String) - `reason` (String) - - - + ### Nested Schema for `data.order` Read-Only: @@ -452,8 +456,8 @@ Read-Only: - `order_number` (String) - `purchase_order_number` (String) - + ### Nested Schema for `data.project` Read-Only: @@ -461,8 +465,8 @@ Read-Only: - `href` (String) - `project_id` (String) - + ### Nested Schema for `data.redundancy` Read-Only: @@ -470,8 +474,8 @@ Read-Only: - `group` (String) - `priority` (String) - + ### Nested Schema for `data.z_side` Read-Only: @@ -481,6 +485,7 @@ Read-Only: - `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--service_token)) + ### Nested Schema for `data.z_side.access_point` Read-Only: @@ -502,6 +507,7 @@ Read-Only: - `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--virtual_device)) + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -515,8 +521,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -524,8 +530,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -534,8 +540,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -545,8 +551,8 @@ Read-Only: - `vlan_s_tag` (Number) - `vlan_tag` (Number) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -556,8 +562,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -565,8 +571,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -577,6 +583,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.z_side.access_point.virtual_device.redundancy` Read-Only: @@ -585,9 +592,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -600,6 +606,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.z_side.access_point.virtual_device.access_point_type_configs` Read-Only: @@ -607,9 +614,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -617,8 +623,8 @@ Read-Only: - `href` (String) - `uuid` (String) - + ### Nested Schema for `data.z_side.access_point.virtual_device` Read-Only: @@ -628,9 +634,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `data.z_side.additional_info` Read-Only: @@ -638,8 +643,8 @@ Read-Only: - `key` (String) - `value` (String) - + ### Nested Schema for `data.z_side.service_token` Read-Only: diff --git a/docs/data-sources/equinix_fabric_network.md b/docs/data-sources/fabric_network.md similarity index 93% rename from docs/data-sources/equinix_fabric_network.md rename to docs/data-sources/fabric_network.md index d3f9c11d8..19e0f21cb 100644 --- a/docs/data-sources/equinix_fabric_network.md +++ b/docs/data-sources/fabric_network.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch Fabric Network for a given UUID Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks ## Example Usage -```hcl +```terraform data "equinix_fabric_network" "network_data_name" { uuid = "" } @@ -43,6 +43,7 @@ output "region" { ``` + ## Schema ### Required @@ -66,6 +67,7 @@ output "region" { - `type` (String) Supported Network types - EVPLAN, EPLAN, IPWAN + ### Nested Schema for `change` Read-Only: @@ -74,8 +76,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -93,8 +95,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `location` Read-Only: @@ -104,8 +106,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `notifications` Read-Only: @@ -114,19 +116,18 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `operation` Read-Only: - `equinix_status` (String) - + ### Nested Schema for `project` Read-Only: - `project_id` (String) - diff --git a/docs/data-sources/fabric_networks.md b/docs/data-sources/fabric_networks.md index 6bff4ca45..b229d2a84 100644 --- a/docs/data-sources/fabric_networks.md +++ b/docs/data-sources/fabric_networks.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch Fabric Network for a given UUID Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks ## Example Usage -```hcl +```terraform data "equinix_fabric_networks" "test" { outer_operator = "AND" filter { @@ -81,6 +81,7 @@ output "first_network_project_id" { ``` + ## Schema ### Required @@ -99,6 +100,7 @@ output "first_network_project_id" { - `id` (String) The ID of this resource. + ### Nested Schema for `filter` Required: @@ -111,8 +113,8 @@ Optional: - `group` (String) Optional custom id parameter to assign this filter to an inner AND or OR group. Group id must be prefixed with AND_ or OR_. Ensure intended grouped elements have the same given id. Ungrouped filters will be placed in the filter list group by themselves. - + ### Nested Schema for `pagination` Optional: @@ -120,8 +122,8 @@ Optional: - `limit` (Number) Number of elements to be requested per page. Number must be between 1 and 100. Default is 20 - `offset` (Number) The page offset for the pagination request. Index of the first element. Default is 0. - + ### Nested Schema for `sort` Optional: @@ -129,8 +131,8 @@ Optional: - `direction` (String) The sorting direction. Can be one of: [DESC, ASC], Defaults to DESC - `property` (String) The property name to use in sorting. One of [/name /uuid /scope /operation/equinixStatus /location/region /changeLog/createdDateTime /changeLog/updatedDateTime]. Defaults to /changeLog/updatedDateTime - + ### Nested Schema for `data` Read-Only: @@ -150,6 +152,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.change` Read-Only: @@ -158,8 +161,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `data.change_log` Read-Only: @@ -177,8 +180,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `data.location` Read-Only: @@ -188,8 +191,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `data.notifications` Read-Only: @@ -198,16 +201,16 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `data.operation` Read-Only: - `equinix_status` (String) - + ### Nested Schema for `data.project` Read-Only: diff --git a/docs/data-sources/equinix_fabric_port.md b/docs/data-sources/fabric_port.md similarity index 95% rename from docs/data-sources/equinix_fabric_port.md rename to docs/data-sources/fabric_port.md index 556e93ee3..e373eefe6 100644 --- a/docs/data-sources/equinix_fabric_port.md +++ b/docs/data-sources/fabric_port.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch port by uuid Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-ports-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#ports ## Example Usage -```hcl +```terraform data "equinix_fabric_port" "port_data_name" { uuid = "" } @@ -79,6 +79,7 @@ output "device_redundancy_priority" { ``` + ## Schema ### Required @@ -107,6 +108,7 @@ output "device_redundancy_priority" { - `used_bandwidth` (Number) Port used bandwidth in Mbps + ### Nested Schema for `account` Read-Only: @@ -119,8 +121,8 @@ Read-Only: - `org_id` (Number) - `organization_name` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -138,8 +140,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `device` Read-Only: @@ -148,6 +150,7 @@ Read-Only: - `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--device--redundancy)) + ### Nested Schema for `device.redundancy` Read-Only: @@ -156,9 +159,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `encapsulation` Read-Only: @@ -166,8 +168,8 @@ Read-Only: - `tag_protocol_id` (String) - `type` (String) - + ### Nested Schema for `location` Read-Only: @@ -177,8 +179,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `operation` Read-Only: @@ -187,8 +189,8 @@ Read-Only: - `op_status_changed_at` (String) - `operational_status` (String) - + ### Nested Schema for `redundancy` Read-Only: diff --git a/docs/data-sources/equinix_fabric_ports.md b/docs/data-sources/fabric_ports.md similarity index 95% rename from docs/data-sources/equinix_fabric_ports.md rename to docs/data-sources/fabric_ports.md index 9006326a7..ed6facbee 100644 --- a/docs/data-sources/equinix_fabric_ports.md +++ b/docs/data-sources/fabric_ports.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch port by name Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-ports-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#ports ## Example Usage -```hcl +```terraform data "equinix_fabric_ports" "ports_data_name" { filters { name = "" @@ -82,6 +82,7 @@ output "device_redundancy_priority" { ``` + ## Schema ### Required @@ -94,14 +95,15 @@ output "device_redundancy_priority" { - `id` (String) The ID of this resource. + ### Nested Schema for `filters` Required: - `name` (String) Query Parameter to Get Ports By Name - + ### Nested Schema for `data` Read-Only: @@ -126,6 +128,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.account` Read-Only: @@ -138,8 +141,8 @@ Read-Only: - `org_id` (Number) - `organization_name` (String) - + ### Nested Schema for `data.change_log` Read-Only: @@ -157,8 +160,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `data.device` Read-Only: @@ -167,6 +170,7 @@ Read-Only: - `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--data--device--redundancy)) + ### Nested Schema for `data.device.redundancy` Read-Only: @@ -175,9 +179,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `data.encapsulation` Read-Only: @@ -185,8 +188,8 @@ Read-Only: - `tag_protocol_id` (String) - `type` (String) - + ### Nested Schema for `data.location` Read-Only: @@ -196,8 +199,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - + ### Nested Schema for `data.operation` Read-Only: @@ -206,8 +209,8 @@ Read-Only: - `op_status_changed_at` (String) - `operational_status` (String) - + ### Nested Schema for `data.redundancy` Read-Only: diff --git a/docs/data-sources/equinix_fabric_routing_protocol.md b/docs/data-sources/fabric_routing_protocol.md similarity index 95% rename from docs/data-sources/equinix_fabric_routing_protocol.md rename to docs/data-sources/fabric_routing_protocol.md index 51c1afeb6..9a09fc0c3 100644 --- a/docs/data-sources/equinix_fabric_routing_protocol.md +++ b/docs/data-sources/fabric_routing_protocol.md @@ -13,12 +13,12 @@ Fabric V4 API compatible data resource that allow user to fetch routing protocol API documentation can be found here - https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols ## Example Usage -```hcl +```terraform data "equinix_fabric_routing_protocol" "routing_protocol_data_name" { connection_uuid = "" uuid = "" @@ -74,6 +74,7 @@ output "customer_asn" { ``` + ## Schema ### Required @@ -102,6 +103,7 @@ output "customer_asn" { - `type` (String) Defines the routing protocol type like BGP or DIRECT + ### Nested Schema for `bfd` Read-Only: @@ -109,8 +111,8 @@ Read-Only: - `enabled` (Boolean) - `interval` (String) - + ### Nested Schema for `bgp_ipv4` Read-Only: @@ -119,8 +121,8 @@ Read-Only: - `enabled` (Boolean) - `equinix_peer_ip` (String) - + ### Nested Schema for `bgp_ipv6` Read-Only: @@ -129,8 +131,8 @@ Read-Only: - `enabled` (Boolean) - `equinix_peer_ip` (String) - + ### Nested Schema for `change` Read-Only: @@ -139,8 +141,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -158,24 +160,24 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `direct_ipv4` Read-Only: - `equinix_iface_ip` (String) - + ### Nested Schema for `direct_ipv6` Read-Only: - `equinix_iface_ip` (String) - + ### Nested Schema for `operation` Read-Only: @@ -183,6 +185,7 @@ Read-Only: - `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) + ### Nested Schema for `operation.errors` Read-Only: @@ -195,6 +198,7 @@ Read-Only: - `help` (String) + ### Nested Schema for `operation.errors.additional_info` Read-Only: diff --git a/docs/data-sources/equinix_fabric_service_profile.md b/docs/data-sources/fabric_service_profile.md similarity index 96% rename from docs/data-sources/equinix_fabric_service_profile.md rename to docs/data-sources/fabric_service_profile.md index 87a6578a9..3a46ea32a 100644 --- a/docs/data-sources/equinix_fabric_service_profile.md +++ b/docs/data-sources/fabric_service_profile.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch Service Profile by UUID filter criteria Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles ## Example Usage -```hcl +```terraform data "equinix_fabric_service_profile" "service_profile_data_name" { uuid = "" } @@ -67,6 +67,7 @@ output "allow_over_subscription" { ``` + ## Schema ### Required @@ -89,7 +90,7 @@ output "allow_over_subscription" { - `notifications` (List of Object) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedatt--notifications)) - `ports` (List of Object) Ports (see [below for nested schema](#nestedatt--ports)) - `project` (Set of Object) Project information (see [below for nested schema](#nestedatt--project)) -- `self_profile` (Boolean) Self Profile indicating if the profile is created for customer's self use +- `self_profile` (Boolean) Self Profile indicating if the profile is created for customer's self use - `state` (String) Service profile state - ACTIVE, PENDING_APPROVAL, DELETED, REJECTED - `tags` (List of String) Tags attached to the connection - `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE @@ -97,6 +98,7 @@ output "allow_over_subscription" { - `visibility` (String) Service profile visibility - PUBLIC, PRIVATE + ### Nested Schema for `access_point_type_configs` Read-Only: @@ -117,6 +119,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `access_point_type_configs.api_config` Read-Only: @@ -129,8 +132,8 @@ Read-Only: - `integration_id` (String) - `over_subscription_limit` (Number) - + ### Nested Schema for `access_point_type_configs.authentication_key` Read-Only: @@ -139,8 +142,8 @@ Read-Only: - `label` (String) - `required` (Boolean) - + ### Nested Schema for `access_point_type_configs.link_protocol_config` Read-Only: @@ -149,9 +152,8 @@ Read-Only: - `encapsulation_strategy` (String) - `reuse_vlan_s_tag` (Boolean) - - + ### Nested Schema for `account` Read-Only: @@ -165,8 +167,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -184,8 +186,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `custom_fields` Read-Only: @@ -197,8 +199,8 @@ Read-Only: - `options` (List of String) - `required` (Boolean) - + ### Nested Schema for `marketing_info` Read-Only: @@ -208,6 +210,7 @@ Read-Only: - `promotion` (Boolean) + ### Nested Schema for `marketing_info.process_step` Read-Only: @@ -216,9 +219,8 @@ Read-Only: - `sub_title` (String) - `title` (String) - - + ### Nested Schema for `metros` Read-Only: @@ -230,8 +232,8 @@ Read-Only: - `name` (String) - `seller_regions` (Map of String) - + ### Nested Schema for `notifications` Read-Only: @@ -240,8 +242,8 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `ports` Read-Only: @@ -254,6 +256,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `ports.location` Read-Only: @@ -263,9 +266,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - - + ### Nested Schema for `project` Read-Only: @@ -273,8 +275,8 @@ Read-Only: - `href` (String) - `project_id` (String) - + ### Nested Schema for `virtual_devices` Read-Only: @@ -285,6 +287,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `virtual_devices.location` Read-Only: diff --git a/docs/data-sources/equinix_fabric_service_profiles.md b/docs/data-sources/fabric_service_profiles.md similarity index 97% rename from docs/data-sources/equinix_fabric_service_profiles.md rename to docs/data-sources/fabric_service_profiles.md index 347ddd63f..47d0ad9bb 100644 --- a/docs/data-sources/equinix_fabric_service_profiles.md +++ b/docs/data-sources/fabric_service_profiles.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible data resource that allow user to fetch Service Profile by name filter criteria Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles ## Example Usage -```hcl +```terraform data "equinix_fabric_service_profiles" "service_profiles_data_name" { filter { property = "/name" @@ -71,6 +71,7 @@ output "allow_over_subscription" { ``` + ## Schema ### Optional @@ -85,6 +86,7 @@ output "allow_over_subscription" { - `id` (String) The ID of this resource. + ### Nested Schema for `filter` Optional: @@ -93,8 +95,8 @@ Optional: - `property` (String) Search Criteria for Service Profile - /name, /uuid, /state, /metros/code, /visibility, /type - `values` (List of String) Values - + ### Nested Schema for `sort` Optional: @@ -102,8 +104,8 @@ Optional: - `direction` (String) Priority type- DESC, ASC - `property` (String) Search operation sort criteria /name /state /changeLog/createdDateTime /changeLog/updatedDateTime - + ### Nested Schema for `data` Read-Only: @@ -130,6 +132,7 @@ Read-Only: - `visibility` (String) + ### Nested Schema for `data.access_point_type_configs` Read-Only: @@ -150,6 +153,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.access_point_type_configs.api_config` Read-Only: @@ -162,8 +166,8 @@ Read-Only: - `integration_id` (String) - `over_subscription_limit` (Number) - + ### Nested Schema for `data.access_point_type_configs.authentication_key` Read-Only: @@ -172,8 +176,8 @@ Read-Only: - `label` (String) - `required` (Boolean) - + ### Nested Schema for `data.access_point_type_configs.link_protocol_config` Read-Only: @@ -182,9 +186,8 @@ Read-Only: - `encapsulation_strategy` (String) - `reuse_vlan_s_tag` (Boolean) - - + ### Nested Schema for `data.account` Read-Only: @@ -198,8 +201,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `data.change_log` Read-Only: @@ -217,8 +220,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `data.custom_fields` Read-Only: @@ -230,8 +233,8 @@ Read-Only: - `options` (List of String) - `required` (Boolean) - + ### Nested Schema for `data.marketing_info` Read-Only: @@ -241,6 +244,7 @@ Read-Only: - `promotion` (Boolean) + ### Nested Schema for `data.marketing_info.process_step` Read-Only: @@ -249,9 +253,8 @@ Read-Only: - `sub_title` (String) - `title` (String) - - + ### Nested Schema for `data.metros` Read-Only: @@ -263,8 +266,8 @@ Read-Only: - `name` (String) - `seller_regions` (Map of String) - + ### Nested Schema for `data.notifications` Read-Only: @@ -273,8 +276,8 @@ Read-Only: - `send_interval` (String) - `type` (String) - + ### Nested Schema for `data.ports` Read-Only: @@ -287,6 +290,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.ports.location` Read-Only: @@ -296,9 +300,8 @@ Read-Only: - `metro_name` (String) - `region` (String) - - + ### Nested Schema for `data.project` Read-Only: @@ -306,8 +309,8 @@ Read-Only: - `href` (String) - `project_id` (String) - + ### Nested Schema for `data.virtual_devices` Read-Only: @@ -318,6 +321,7 @@ Read-Only: - `uuid` (String) + ### Nested Schema for `data.virtual_devices.location` Read-Only: diff --git a/docs/data-sources/equinix_metal_connection.md b/docs/data-sources/metal_connection.md similarity index 99% rename from docs/data-sources/equinix_metal_connection.md rename to docs/data-sources/metal_connection.md index afa69b043..02aff21b1 100644 --- a/docs/data-sources/equinix_metal_connection.md +++ b/docs/data-sources/metal_connection.md @@ -10,7 +10,7 @@ Use this data source to retrieve a [connection resource](https://metal.equinix.c ## Example Usage -```hcl +```terraform data "equinix_metal_connection" "example" { connection_id = "4347e805-eb46-4699-9eb9-5c116e6a017d" } diff --git a/docs/data-sources/metal_device.md b/docs/data-sources/metal_device.md new file mode 100644 index 000000000..01887a9ec --- /dev/null +++ b/docs/data-sources/metal_device.md @@ -0,0 +1,94 @@ +--- +subcategory: "Metal" +--- + +# equinix_metal_device (Data Source) + +The datasource can be used to fetch a single device. + +If you need to fetch a list of devices which meet filter criteria, you can use the [equinix_metal_devices](equinix_metal_devices.md) datasource. + +~> **Note:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://developer.hashicorp.com/terraform/language/state/sensitive-data). + +## Example Usage + +```terraform +# Fetch a device data by hostname and show it's ID + +data "equinix_metal_device" "test" { + project_id = local.project_id + hostname = "mydevice" +} + +output "id" { + value = data.equinix_metal_device.test.id +} +``` + +```terraform +# Fetch a device data by ID and show its public IPv4 +data "equinix_metal_device" "test" { + device_id = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40" +} + +output "ipv4" { + value = data.equinix_metal_device.test.access_public_ipv4 +} +``` + + +## Schema + +### Optional + +- `device_id` (String) Device ID +- `hostname` (String) The device name +- `project_id` (String) The id of the project in which the devices exists + +### Read-Only + +- `access_private_ipv4` (String) The ipv4 private IP assigned to the device +- `access_public_ipv4` (String) The ipv4 management IP assigned to the device +- `access_public_ipv6` (String) The ipv6 management IP assigned to the device +- `always_pxe` (Boolean) +- `billing_cycle` (String) The billing cycle of the device (monthly or hourly) +- `description` (String) Description string for the device +- `facility` (String, Deprecated) The facility where the device is deployed +- `hardware_reservation_id` (String) The id of hardware reservation which this device occupies +- `id` (String) The ID of this resource. +- `ipxe_script_url` (String) +- `metro` (String) The metro where the device is deployed +- `network` (List of Object) The device's private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: ublic IPv4 at equinix_metal_device.name.network.0, IPv6 at equinix_metal_device.name.network.1 and private IPv4 at equinix_metal_device.name.network.2. Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). (see [below for nested schema](#nestedatt--network)) +- `network_type` (String) L2 network type of the device, one oflayer3, hybrid, layer2-individual, layer2-bonded +- `operating_system` (String) The operating system running on the device +- `plan` (String) The hardware config of the device +- `ports` (List of Object) Ports assigned to the device (see [below for nested schema](#nestedatt--ports)) +- `root_password` (String, Sensitive) Root password to the server (if still available) +- `sos_hostname` (String) The hostname to use for [Serial over SSH](https://deploy.equinix.com/developers/docs/metal/resilience-recovery/serial-over-ssh/) access to the device +- `ssh_key_ids` (List of String) List of IDs of SSH keys deployed in the device, can be both user or project SSH keys +- `state` (String) The state of the device +- `storage` (String) +- `tags` (List of String) Tags attached to the device + + +### Nested Schema for `network` + +Read-Only: + +- `address` (String) +- `cidr` (Number) +- `family` (Number) +- `gateway` (String) +- `public` (Boolean) + + + +### Nested Schema for `ports` + +Read-Only: + +- `bonded` (Boolean) +- `id` (String) +- `mac` (String) +- `name` (String) +- `type` (String) diff --git a/docs/data-sources/equinix_metal_device_bgp_neighbors.md b/docs/data-sources/metal_device_bgp_neighbors.md similarity index 86% rename from docs/data-sources/equinix_metal_device_bgp_neighbors.md rename to docs/data-sources/metal_device_bgp_neighbors.md index f6a79fe85..cb593c277 100644 --- a/docs/data-sources/equinix_metal_device_bgp_neighbors.md +++ b/docs/data-sources/metal_device_bgp_neighbors.md @@ -6,15 +6,13 @@ subcategory: "Metal" Use this datasource to retrieve list of BGP neighbors of a device in the Equinix Metal host. -To have any BGP neighbors listed, the device must be in [BGP-enabled project](../r/project.html) -and have a [BGP session](../r/bgp_session.html) assigned. +To have any BGP neighbors listed, the device must be in [BGP-enabled project](../r/project.html) and have a [BGP session](../r/bgp_session.html) assigned. -To learn more about using BGP in Equinix Metal, see the -[equinix_metal_bgp_session](../r/bgp_session.html) resource documentation. +To learn more about using BGP in Equinix Metal, see the [equinix_metal_bgp_session](../r/bgp_session.html) resource documentation. ## Example Usage -```hcl +```terraform # Get Project by name and print UUIDs of its users data "equinix_metal_device_bgp_neighbors" "test" { @@ -49,4 +47,3 @@ In addition to all arguments above, the following attributes are exported: * `route` - CIDR expression of route (IP/mask). * `exact` - (bool) Whether the route is exact. * `routes_out` - Array of outgoing routes in the same format. - \ No newline at end of file diff --git a/docs/data-sources/equinix_metal_devices.md b/docs/data-sources/metal_devices.md similarity index 99% rename from docs/data-sources/equinix_metal_devices.md rename to docs/data-sources/metal_devices.md index b6570c394..aeeaa8b31 100644 --- a/docs/data-sources/equinix_metal_devices.md +++ b/docs/data-sources/metal_devices.md @@ -10,7 +10,7 @@ If you need to fetch a single device by ID or by project ID and hostname, use th ## Example Usage -```hcl +```terraform # Following example will select c3.small.x86 devices which are deplyed in metro 'da' (Dallas) # OR 'sv' (Sillicon Valley). data "equinix_metal_devices" "example" { @@ -31,7 +31,7 @@ output "devices" { } ``` -```hcl +```terraform # Following example takes advantage of the `search` field in the API request, and will select devices with # string "database" in one of the searched attributes. See `search` in argument reference. data "equinix_metal_devices" "example" { diff --git a/docs/data-sources/equinix_metal_facility.md b/docs/data-sources/metal_facility.md similarity index 75% rename from docs/data-sources/equinix_metal_facility.md rename to docs/data-sources/metal_facility.md index 5afc39dda..80f55b0b8 100644 --- a/docs/data-sources/equinix_metal_facility.md +++ b/docs/data-sources/metal_facility.md @@ -4,13 +4,13 @@ subcategory: "Metal" # equinix_metal_facility (Data Source) -> **Deprecated** Use `equinix_metal_metro` instead. For more information, refer to the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices). +> **Deprecated** Use `equinix_metal_metro` instead. For more information, refer to the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices). Provides an Equinix Metal facility datasource. ## Example Usage -```hcl +```terraform # Fetch a facility by code and show its ID data "equinix_metal_facility" "ny5" { @@ -22,7 +22,7 @@ output "id" { } ``` -```hcl +```terraform # Verify that facility "dc13" has capacity for provisioning 2 c3.small.x86 devices and 1 c3.medium.x86 device and has specified features @@ -48,12 +48,10 @@ data "equinix_metal_facility" "test" { The following arguments are supported: * `code` - (Required) The facility code to search for facilities. -* `features_required` - (Optional) Set of feature strings that the facility must have. Some -possible values are `baremetal`, `ibx`, `storage`, `global_ipv4`, `backend_transfer`, `layer_2`. +* `features_required` - (Optional) Set of feature strings that the facility must have. Some possible values are `baremetal`, `ibx`, `storage`, `global_ipv4`, `backend_transfer`, `layer_2`. * `capacity` - (Optional) One or more device plans for which the facility must have capacity. * `plan` - (Required) Device plan that must be available in selected location. - * `quantity` - (Optional) Minimun number of devices that must be available in selected location. - Default is `1`. + * `quantity` - (Optional) Minimun number of devices that must be available in selected location. Default is `1`. ## Attributes Reference diff --git a/docs/data-sources/equinix_metal_gateway.md b/docs/data-sources/metal_gateway.md similarity index 94% rename from docs/data-sources/equinix_metal_gateway.md rename to docs/data-sources/metal_gateway.md index e289fbe25..1facc2ee4 100644 --- a/docs/data-sources/equinix_metal_gateway.md +++ b/docs/data-sources/metal_gateway.md @@ -10,7 +10,7 @@ See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.co ## Example Usage -```hcl +```terraform # Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses resource "equinix_metal_vlan" "test" { @@ -38,6 +38,5 @@ In addition to all arguments above, the following attributes are exported: * `vlan_id` - UUID of the VLAN where the gateway is scoped to. * `vrf_id` - UUID of the VRF associated with the IP Reservation. * `ip_reservation_id` - UUID of IP reservation block bound to the gateway. -* `private_ipv4_subnet_size` - Size of the private IPv4 subnet bound to this metal gateway. One of -`8`, `16`, `32`, `64`, `128`. +* `private_ipv4_subnet_size` - Size of the private IPv4 subnet bound to this metal gateway. One of `8`, `16`, `32`, `64`, `128`. * `state` - Status of the gateway resource. diff --git a/docs/data-sources/equinix_metal_hardware_reservation.md b/docs/data-sources/metal_hardware_reservation.md similarity index 85% rename from docs/data-sources/equinix_metal_hardware_reservation.md rename to docs/data-sources/metal_hardware_reservation.md index 4f1b2af0d..2f28607b2 100644 --- a/docs/data-sources/equinix_metal_hardware_reservation.md +++ b/docs/data-sources/metal_hardware_reservation.md @@ -10,7 +10,7 @@ You can look up hardware reservation by its ID or by ID of device which occupies ## Example Usage -```hcl +```terraform // lookup by ID data "equinix_metal_hardware_reservation" "example" { id = "4347e805-eb46-4699-9eb9-5c116e6a0172" @@ -39,9 +39,6 @@ In addition to all arguments above, the following attributes are exported: * `device_id` - UUID of device occupying the reservation. * `plan` - Plan type for the reservation. * `facility` - (**Deprecated**) Facility for the reservation. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) -* `provisionable` - Flag indicating whether the reserved server is provisionable or not. Spare -devices can't be provisioned unless they are activated first. -* `spare` - Flag indicating whether the Hardware Reservation is a spare. Spare Hardware -Reservations are used when a Hardware Reservations requires service from Metal Equinix. -* `switch_uuid` - Switch short ID, can be used to determine if two devices are connected to the -same switch. +* `provisionable` - Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first. +* `spare` - Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix. +* `switch_uuid` - Switch short ID, can be used to determine if two devices are connected to the same switch. diff --git a/docs/data-sources/equinix_metal_ip_block_ranges.md b/docs/data-sources/metal_ip_block_ranges.md similarity index 80% rename from docs/data-sources/equinix_metal_ip_block_ranges.md rename to docs/data-sources/metal_ip_block_ranges.md index c110d5dfb..9092806ce 100644 --- a/docs/data-sources/equinix_metal_ip_block_ranges.md +++ b/docs/data-sources/metal_ip_block_ranges.md @@ -12,7 +12,7 @@ The datasource has 4 list attributes: `global_ipv4`, `public_ipv4`, `private_ipv ## Example Usage -```hcl +```terraform # List CIDR expressions of all the allocated IP block in you project. # Declare your project ID @@ -34,10 +34,8 @@ output "out" { The following arguments are supported: * `project_id` - (Required) ID of the project from which to list the blocks. -* `facility` - (**Deprecated**) Facility code filtering the IP blocks. Global IPv4 blocks will be listed -anyway. If you omit this and metro, all the block from the project will be listed. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) -* `metro` - (Optional) Metro code filtering the IP blocks. Global IPv4 blocks will be listed -anyway. If you omit this and facility, all the block from the project will be listed. +* `facility` - (**Deprecated**) Facility code filtering the IP blocks. Global IPv4 blocks will be listed anyway. If you omit this and metro, all the block from the project will be listed. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Metro code filtering the IP blocks. Global IPv4 blocks will be listed anyway. If you omit this and facility, all the block from the project will be listed. ## Attributes Reference diff --git a/docs/data-sources/equinix_metal_metro.md b/docs/data-sources/metal_metro.md similarity index 93% rename from docs/data-sources/equinix_metal_metro.md rename to docs/data-sources/metal_metro.md index 654f17848..74274bfcb 100644 --- a/docs/data-sources/equinix_metal_metro.md +++ b/docs/data-sources/metal_metro.md @@ -8,7 +8,7 @@ Provides an Equinix Metal metro datasource. ## Example Usage -```hcl +```terraform # Fetch a metro by code and show its ID data "equinix_metal_metro" "sv" { @@ -20,7 +20,7 @@ output "id" { } ``` -```hcl +```terraform # Verify that metro "sv" has capacity for provisioning 2 c3.small.x86 devices and 1 c3.medium.x86 device @@ -46,8 +46,7 @@ The following arguments are supported: * `code` - (Required) The metro code to search for. * `capacity` - (Optional) One or more device plans for which the metro must have capacity. * `plan` - (Required) Device plan that must be available in selected location. - * `quantity` - (Optional) Minimum number of devices that must be available in selected location. - Default is `1`. + * `quantity` - (Optional) Minimum number of devices that must be available in selected location. Default is `1`. ## Attributes Reference diff --git a/docs/data-sources/equinix_metal_operating_system.md b/docs/data-sources/metal_operating_system.md similarity index 98% rename from docs/data-sources/equinix_metal_operating_system.md rename to docs/data-sources/metal_operating_system.md index 0283e09c9..a6e60ef2e 100644 --- a/docs/data-sources/equinix_metal_operating_system.md +++ b/docs/data-sources/metal_operating_system.md @@ -8,7 +8,7 @@ Use this data source to get Equinix Metal Operating System image. ## Example Usage -```hcl +```terraform data "equinix_metal_operating_system" "example" { distro = "ubuntu" version = "20.04" diff --git a/docs/data-sources/equinix_metal_organization.md b/docs/data-sources/metal_organization.md similarity index 98% rename from docs/data-sources/equinix_metal_organization.md rename to docs/data-sources/metal_organization.md index e5400dc63..3040ecd57 100644 --- a/docs/data-sources/equinix_metal_organization.md +++ b/docs/data-sources/metal_organization.md @@ -8,7 +8,7 @@ Provides an Equinix Metal organization datasource. ## Example Usage -```hcl +```terraform # Fetch a organization data and show projects which belong to it data "equinix_metal_organization" "test" { organization_id = local.org_id diff --git a/docs/data-sources/equinix_metal_plans.md b/docs/data-sources/metal_plans.md similarity index 97% rename from docs/data-sources/equinix_metal_plans.md rename to docs/data-sources/metal_plans.md index 09459a7cd..686569f9b 100644 --- a/docs/data-sources/equinix_metal_plans.md +++ b/docs/data-sources/metal_plans.md @@ -8,7 +8,7 @@ Provides an Equinix Metal plans datasource. This can be used to find plans that ## Example Usage -```hcl +```terraform # Following example will select device plans which are under 2.5$ per hour, are available in metro 'da' (Dallas) # OR 'sv' (Sillicon Valley) and sort it by the hourly price ascending. data "equinix_metal_plans" "example" { @@ -32,7 +32,7 @@ output "plans" { } ``` -```hcl +```terraform # Following example will select device plans with class containing string 'large', are available in metro 'da' (Dallas) # AND 'sv' (Sillicon Valley), are elegible for spot_market deployments. data "equinix_metal_plans" "example" { @@ -67,7 +67,7 @@ For `equinix_metal_plans`, it may happen that a device plan is no longer availab To prevent that you can take advantage of the Terraform [`lifecycle ignore_changes`](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changes) feature as shown in the example below. -```hcl +```terraform # Following example will use equinix_metal_plans to select the cheapest plan available in metro 'sv' (Sillicon Valley) data "equinix_metal_plans" "example" { sort { @@ -105,7 +105,7 @@ resource "equinix_metal_device" "example" { If your use case requires dynamic changes of a device plan or metro you can define the lifecycle with a condition. -```hcl +```terraform # Following example uses a boolean variable that may eventually be set to you false when you update your equinix_metal_plans filter criteria because you need a device plan with a new feature. variable "ignore_plans_metros_changes" { type = bool @@ -133,8 +133,7 @@ resource "equinix_metal_device" "example" { The following arguments are supported: -* `sort` - (Optional) One or more attribute/direction pairs on which to sort results. If multiple -sorts are provided, they will be applied in order +* `sort` - (Optional) One or more attribute/direction pairs on which to sort results. If multiple sorts are provided, they will be applied in order - `attribute` - (Required) The attribute used to sort the results. Sort attributes are case-sensitive - `direction` - (Optional) Sort results in ascending or descending order. Strings are sorted in alphabetical order. One of: asc, desc * `filter` - (Optional) One or more attribute/values pairs to filter off of diff --git a/docs/data-sources/equinix_metal_port.md b/docs/data-sources/metal_port.md similarity index 95% rename from docs/data-sources/equinix_metal_port.md rename to docs/data-sources/metal_port.md index 4ab2cfb4a..361c186fc 100644 --- a/docs/data-sources/equinix_metal_port.md +++ b/docs/data-sources/metal_port.md @@ -4,14 +4,13 @@ subcategory: "Metal" # equinix_metal_port (Data Source) -Use this data source to read ports of existing devices. You can read port by either its UUID, -or by a device UUID and port name. +Use this data source to read ports of existing devices. You can read port by either its UUID, or by a device UUID and port name. ## Example Usage Create a device and read it's eth0 port to the datasource. -```hcl +```terraform locals { project_id = "" } diff --git a/docs/data-sources/equinix_metal_precreated_ip_block.md b/docs/data-sources/metal_precreated_ip_block.md similarity index 94% rename from docs/data-sources/equinix_metal_precreated_ip_block.md rename to docs/data-sources/metal_precreated_ip_block.md index 55b3a73f5..4fb5a0152 100644 --- a/docs/data-sources/equinix_metal_precreated_ip_block.md +++ b/docs/data-sources/metal_precreated_ip_block.md @@ -4,8 +4,7 @@ subcategory: "Metal" # equinix_metal_precreated_ip_block (Data Source) -Use this data source to get CIDR expression for precreated (management) IPv6 and IPv4 blocks in Equinix Metal. -You can then use the cidrsubnet TF builtin function to derive subnets. +Use this data source to get CIDR expression for precreated (management) IPv6 and IPv4 blocks in Equinix Metal. You can then use the cidrsubnet TF builtin function to derive subnets. ~> For backward compatibility, this data source will also return reserved (elastic) IP blocks. @@ -15,7 +14,7 @@ You can then use the cidrsubnet TF builtin function to derive subnets. ## Example Usage -```hcl +```terraform # Create device in your project and then assign /64 subnet from precreated block # to the new device diff --git a/docs/data-sources/equinix_metal_project.md b/docs/data-sources/metal_project.md similarity index 99% rename from docs/data-sources/equinix_metal_project.md rename to docs/data-sources/metal_project.md index 56fb99454..c9aeb54d4 100644 --- a/docs/data-sources/equinix_metal_project.md +++ b/docs/data-sources/metal_project.md @@ -8,7 +8,7 @@ Use this datasource to retrieve attributes of the Project API resource. ## Example Usage -```hcl +```terraform # Get Project by name and print UUIDs of its users data "equinix_metal_project" "tf_project_1" { name = "Terraform Fun" diff --git a/docs/data-sources/equinix_metal_project_ssh_key.md b/docs/data-sources/metal_project_ssh_key.md similarity index 94% rename from docs/data-sources/equinix_metal_project_ssh_key.md rename to docs/data-sources/metal_project_ssh_key.md index 75cb8138a..f2dfe86ff 100644 --- a/docs/data-sources/equinix_metal_project_ssh_key.md +++ b/docs/data-sources/metal_project_ssh_key.md @@ -8,7 +8,7 @@ Use this datasource to retrieve attributes of a Project SSH Key API resource. ## Example Usage -```hcl +```terraform # Get Project SSH Key by name data "equinix_metal_project_ssh_key" "my_key" { search = "username@hostname" @@ -20,8 +20,7 @@ data "equinix_metal_project_ssh_key" "my_key" { The following arguments are supported: -* `search` - (Optional) The name, fingerprint, or public_key of the SSH Key to search for - in the Equinix Metal project. +* `search` - (Optional) The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project. * `id` - (Optional) The id of the SSH Key to search for in the Equinix Metal project. * `project_id` - (Optional) The Equinix Metal project id of the Equinix Metal SSH Key. diff --git a/docs/data-sources/equinix_metal_reserved_ip_block.md b/docs/data-sources/metal_reserved_ip_block.md similarity index 81% rename from docs/data-sources/equinix_metal_reserved_ip_block.md rename to docs/data-sources/metal_reserved_ip_block.md index 24c8bc736..99d9829a7 100644 --- a/docs/data-sources/equinix_metal_reserved_ip_block.md +++ b/docs/data-sources/metal_reserved_ip_block.md @@ -4,8 +4,7 @@ subcategory: "Metal" # equinix_metal_reserved_ip_block (Data Source) -Use this data source to find IP address blocks in Equinix Metal. You can use IP address or a block -ID for lookup. +Use this data source to find IP address blocks in Equinix Metal. You can use IP address or a block ID for lookup. ~> For backward compatibility, this data source can be also used for precreated (management) IP blocks. @@ -13,10 +12,9 @@ See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.co ## Example Usage -Look up an IP address for a domain name, then use the IP to look up the containing IP block and -run a device with IP address from the block: +Look up an IP address for a domain name, then use the IP to look up the containing IP block and run a device with IP address from the block: -```hcl +```terraform data "dns_a_record_set" "www" { host = "www.example.com" } @@ -48,7 +46,6 @@ The following arguments are supported: ## Attributes Reference -This datasource exposes the same attributes as the -[equinix_metal_reserved_ip_block](../resources/equinix_metal_reserved_ip_block.md) resource, with the following differences: +This datasource exposes the same attributes as the [equinix_metal_reserved_ip_block](../resources/equinix_metal_reserved_ip_block.md) resource, with the following differences: * `type` - One of `global_ipv4`, `public_ipv4`, `private_ipv4`, `public_ipv6`,or `vrf` diff --git a/docs/data-sources/equinix_metal_spot_market_price.md b/docs/data-sources/metal_spot_market_price.md similarity index 98% rename from docs/data-sources/equinix_metal_spot_market_price.md rename to docs/data-sources/metal_spot_market_price.md index b16fa72d4..cc0bd5b28 100644 --- a/docs/data-sources/equinix_metal_spot_market_price.md +++ b/docs/data-sources/metal_spot_market_price.md @@ -10,7 +10,7 @@ Use this data source to get Equinix Metal Spot Market Price for a plan. Lookup by metro: -```hcl +```terraform data "equinix_metal_spot_market_price" "example" { metro = "sv" plan = "c3.small.x86" diff --git a/docs/data-sources/equinix_metal_spot_market_request.md b/docs/data-sources/metal_spot_market_request.md similarity index 96% rename from docs/data-sources/equinix_metal_spot_market_request.md rename to docs/data-sources/metal_spot_market_request.md index bd9cd331f..b0a0d7ba6 100644 --- a/docs/data-sources/equinix_metal_spot_market_request.md +++ b/docs/data-sources/metal_spot_market_request.md @@ -4,12 +4,11 @@ subcategory: "Metal" # equinix_metal_spot_market_request (Data Source) -Provides an Equinix Metal spot_market_request datasource. The datasource will contain list of -device IDs created by referenced Spot Market Request. +Provides an Equinix Metal spot_market_request datasource. The datasource will contain list of device IDs created by referenced Spot Market Request. ## Example Usage -```hcl +```terraform # Create a Spot Market Request, and print public IPv4 of the created devices, if any. resource "equinix_metal_spot_market_request" "req" { diff --git a/docs/data-sources/equinix_metal_virtual_circuit.md b/docs/data-sources/metal_virtual_circuit.md similarity index 79% rename from docs/data-sources/equinix_metal_virtual_circuit.md rename to docs/data-sources/metal_virtual_circuit.md index 4f275c4cb..b925852bd 100644 --- a/docs/data-sources/equinix_metal_virtual_circuit.md +++ b/docs/data-sources/metal_virtual_circuit.md @@ -4,14 +4,13 @@ subcategory: "Metal" # equinix_metal_virtual_circuit (Data Source) -Use this data source to retrieve a virtual circuit resource from -[Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/) +Use this data source to retrieve a virtual circuit resource from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/) See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. ## Example Usage -```hcl +```terraform data "equinix_metal_connection" "example_connection" { connection_id = "4347e805-eb46-4699-9eb9-5c116e6a017d" } @@ -19,7 +18,6 @@ data "equinix_metal_connection" "example_connection" { data "equinix_metal_virtual_circuit" "example_vc" { virtual_circuit_id = data.equinix_metal_connection.example_connection.ports[1].virtual_circuit_ids[0] } - ``` ## Argument Reference @@ -37,17 +35,14 @@ In addition to all arguments above, the following attributes are exported: * `status` - Status of the virtal circuit. * `port_id` - UUID of the Connection Port where the VC is scoped to. * `project_id` - ID of project to which the VC belongs. -* `vnid`, `nni_vlan`, `nni_nvid` - VLAN parameters, see the -[documentation for Equinix Fabric](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/). +* `vnid`, `nni_vlan`, `nni_nvid` - VLAN parameters, see the [documentation for Equinix Fabric](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/). * `description` - Description for the Virtual Circuit resource. * `tags` - Tags for the Virtual Circuit resource. * `speed` - Speed of the Virtual Circuit resource. * `vrf_id` - UUID of the VLAN to associate. * `peer_asn` - The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF. -* `subnet` - A subnet from one of the IP - blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. - * For a /31 block, it will only have two IP addresses, which will be used for - the metal_ip and customer_ip. +* `subnet` - A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. + * For a /31 block, it will only have two IP addresses, which will be used for the metal_ip and customer_ip. * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. * `metal_ip` - The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. * `customer_ip` - The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. diff --git a/docs/data-sources/equinix_metal_vlan.md b/docs/data-sources/metal_vlan.md similarity index 93% rename from docs/data-sources/equinix_metal_vlan.md rename to docs/data-sources/metal_vlan.md index 8fc8be24f..ce6557a79 100644 --- a/docs/data-sources/equinix_metal_vlan.md +++ b/docs/data-sources/metal_vlan.md @@ -4,14 +4,13 @@ subcategory: "Metal" # equinix_metal_vlan (Data Source) -Provides an Equinix Metal Virtual Network datasource. VLANs data sources can be -searched by VLAN UUID, or project UUID and vxlan number. +Provides an Equinix Metal Virtual Network datasource. VLANs data sources can be searched by VLAN UUID, or project UUID and vxlan number. ## Example Usage Fetch a vlan by ID: -```hcl +```terraform resource "equinix_metal_vlan" "foovlan" { project_id = local.project_id metro = "sv" @@ -25,7 +24,7 @@ data "equinix_metal_vlan" "dsvlan" { Fetch a vlan by project ID, vxlan and metro -```hcl +```terraform data "equinix_metal_vlan" "dsvlan" { project_id = local.project_id vxlan = 5 diff --git a/docs/data-sources/equinix_metal_vrf.md b/docs/data-sources/metal_vrf.md similarity index 98% rename from docs/data-sources/equinix_metal_vrf.md rename to docs/data-sources/metal_vrf.md index ee081587b..193dab719 100644 --- a/docs/data-sources/equinix_metal_vrf.md +++ b/docs/data-sources/metal_vrf.md @@ -10,7 +10,7 @@ See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.co ## Example Usage -```hcl +```terraform data "equinix_metal_vrf" "example_vrf" { vrf_id = "48630899-9ff2-4ce6-a93f-50ff4ebcdf6e" } diff --git a/docs/data-sources/equinix_network_account.md b/docs/data-sources/network_account.md similarity index 73% rename from docs/data-sources/equinix_network_account.md rename to docs/data-sources/network_account.md index f23f35647..86ed55723 100644 --- a/docs/data-sources/equinix_network_account.md +++ b/docs/data-sources/network_account.md @@ -4,15 +4,13 @@ subcategory: "Network Edge" # equinix_network_account (Data Source) -Use this data source to get number and identifier of Equinix Network Edge -billing account in a given metro location. +Use this data source to get number and identifier of Equinix Network Edge billing account in a given metro location. -Billing account reference is required to create Network Edge virtual device -in corresponding metro location. +Billing account reference is required to create Network Edge virtual device in corresponding metro location. ## Example Usage -```hcl +```terraform # Retrieve details of an account in Active status in DC metro data "equinix_network_account" "dc" { metro_code = "DC" @@ -31,10 +29,8 @@ The following arguments are supported: * `metro_code` - (Required) Account location metro code. * `name` - (Optional) Account name for filtering. -* `status` - (Optional) Account status for filtering. Possible values are: `Active`, `Processing`, -`Submitted`, `Staged`. -* `project_id` - (Optional) Unique Identifier for the project resource where the account is scoped to.If you -leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account. +* `status` - (Optional) Account status for filtering. Possible values are: `Active`, `Processing`, `Submitted`, `Staged`. +* `project_id` - (Optional) Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account. ## Attributes Reference diff --git a/docs/data-sources/equinix_network_device.md b/docs/data-sources/network_device.md similarity index 88% rename from docs/data-sources/equinix_network_device.md rename to docs/data-sources/network_device.md index 27a6c9d35..0bb9e3a87 100644 --- a/docs/data-sources/equinix_network_device.md +++ b/docs/data-sources/network_device.md @@ -8,7 +8,7 @@ Use this data source to get Equinix Network Edge device details. ## Example Usage -```hcl +```terraform # Retrieve data for an existing Equinix Network Edge device with UUID "f0b5c553-cdeb-4bc3-95b8-23db9ccfd5ee" data "equinix_network_device" "by_uuid" { uuid = "f0b5c553-cdeb-4bc3-95b8-23db9ccfd5ee" @@ -34,17 +34,17 @@ NOTE: Exactly one of either `uuid` or `name` must be specified. * `status` - Device provisioning status * INITIALIZING * PROVISIONING - * PROVISIONED (**NOTE: By default data source will only return devices in this state. To include other states see `valid_state_list`**) + * PROVISIONED (**NOTE: By default data source will only return devices in this state. To include other states see `valid_state_list`**) * WAITING_FOR_PRIMARY * WAITING_FOR_SECONDARY - * WAITING_FOR_REPLICA_CLUSTER_NODES - * CLUSTER_SETUP_IN_PROGRESS + * WAITING_FOR_REPLICA_CLUSTER_NODES + * CLUSTER_SETUP_IN_PROGRESS * FAILED * DEPROVISIONING * DEPROVISIONED * RESOURCE_UPGRADE_IN_PROGRESS * RESOURCE_UPGRADE_FAILED -* `valid_status_list` - Comma separated list of device states (from see `status` for full list) to be considered valid. Default is 'PROVISIONED'. Case insensitive. +* `valid_status_list` - Comma separated list of device states (from see `status` for full list) to be considered valid. Default is 'PROVISIONED'. Case insensitive. * `license_status` - Device license registration status * APPLYING_LICENSE * REGISTERED @@ -58,13 +58,12 @@ NOTE: Exactly one of either `uuid` or `name` must be specified. * `acl_template_id` - Unique identifier of applied ACL template * `ssh_ip_address` - IP address of SSH enabled interface on the device * `ssh_ip_fqdn` - FQDN of SSH enabled interface on the device -* `redundancy_type` - Device redundancy type applicable for HA devices, either -primary or secondary +* `redundancy_type` - Device redundancy type applicable for HA devices, either primary or secondary * `redundant_id` - Unique identifier for a redundant device applicable for HA devices * `interface` - List of device interfaces * `interface.#.id` - interface identifier * `interface.#.name` - interface name - * `interface.#.status` - interface status (AVAILABLE, RESERVED, ASSIGNED) + * `interface.#.status` - interface status (AVAILABLE, RESERVED, ASSIGNED) * `interface.#.operational_status` - interface operational status (up or down) * `interface.#.mac_address` - interface MAC address * `interface.#.ip_address` - interface IP address diff --git a/docs/data-sources/equinix_network_device_platform.md b/docs/data-sources/network_device_platform.md similarity index 67% rename from docs/data-sources/equinix_network_device_platform.md rename to docs/data-sources/network_device_platform.md index b1274a000..394fcbec5 100644 --- a/docs/data-sources/equinix_network_device_platform.md +++ b/docs/data-sources/network_device_platform.md @@ -4,13 +4,11 @@ subcategory: "Network Edge" # equinix_network_device_platform (Data Source) -Use this data source to get Equinix Network Edge device platform configuration details -for a given device type. For further details, check supported -[Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). +Use this data source to get Equinix Network Edge device platform configuration details for a given device type. For further details, check supported [Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). ## Example Usage -```hcl +```terraform # Retrieve platform configuration of a large flavor for a CSR100V device type # Platform has to support IPBASE software package data "equinix_network_device_platform" "csrLarge" { @@ -25,14 +23,11 @@ data "equinix_network_device_platform" "csrLarge" { The following arguments are supported: * `device_type` - (Required) Device type code -* `flavor` - (Optional) Device platform flavor that determines number of CPU cores and memory. -Supported values are: `small`, `medium`, `large`, `xlarge`. +* `flavor` - (Optional) Device platform flavor that determines number of CPU cores and memory. Supported values are: `small`, `medium`, `large`, `xlarge`. * `core_count` - (Optional) Number of CPU cores used to limit platform search results. * `packages` - (Optional) List of software package codes to limit platform search results. -* `management_types` - (Optional) List of device management types to limit platform search results. -Supported values are: `EQUINIX-CONFIGURED`, `SELF-CONFIGURED`. -* `license_options` - (Optional) List of device licensing options to limit platform search result. -Supported values are: `BYOL` (for Bring Your Own License), `Sub` (for license subscription). +* `management_types` - (Optional) List of device management types to limit platform search results. Supported values are: `EQUINIX-CONFIGURED`, `SELF-CONFIGURED`. +* `license_options` - (Optional) List of device licensing options to limit platform search result. Supported values are: `BYOL` (for Bring Your Own License), `Sub` (for license subscription). ## Attributes Reference diff --git a/docs/data-sources/equinix_network_device_software.md b/docs/data-sources/network_device_software.md similarity index 74% rename from docs/data-sources/equinix_network_device_software.md rename to docs/data-sources/network_device_software.md index 3b612c4b2..d957da14f 100644 --- a/docs/data-sources/equinix_network_device_software.md +++ b/docs/data-sources/network_device_software.md @@ -4,13 +4,11 @@ subcategory: "Network Edge" # equinix_network_device_software (Data Source) -Use this data source to get Equinix Network Edge device software details for a given -device type. For further details, check supported -[Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). +Use this data source to get Equinix Network Edge device software details for a given device type. For further details, check supported [Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). ## Example Usage -```hcl +```terraform # Retrieve details for CSR1000V device software with latest path of 16.09 version # that supports IPBASE package data "equinix_network_device_software" "csrLatest1609" { @@ -26,13 +24,10 @@ data "equinix_network_device_software" "csrLatest1609" { The following arguments are supported: * `device_type` - (Required) Code of a device type. -* `version_regex` - (Optional) A regex string to apply on returned versions and filter search -results. +* `version_regex` - (Optional) A regex string to apply on returned versions and filter search results. * `stable` - (Optional) Boolean value to limit query results to stable versions only. -* `packages` - (Optional) Limits returned versions to those that are supported by given software -package codes. -* `most_recent` - (Optional) Boolean value to indicate that most recent version should be used *(in -case when more than one result is returned)*. +* `packages` - (Optional) Limits returned versions to those that are supported by given software package codes. +* `most_recent` - (Optional) Boolean value to indicate that most recent version should be used *(in case when more than one result is returned)*. ## Attributes Reference diff --git a/docs/data-sources/equinix_network_device_type.md b/docs/data-sources/network_device_type.md similarity index 84% rename from docs/data-sources/equinix_network_device_type.md rename to docs/data-sources/network_device_type.md index 6a1c911e5..c733607d2 100644 --- a/docs/data-sources/equinix_network_device_type.md +++ b/docs/data-sources/network_device_type.md @@ -4,12 +4,11 @@ subcategory: "Network Edge" # equinix_network_device_type (Data Source) -Use this data source to get Equinix Network Edge device type details. For further details, check supported -[Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). +Use this data source to get Equinix Network Edge device type details. For further details, check supported [Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). ## Example Usage -```hcl +```terraform # Retrieve device type details of a Cisco router # Device type has to be available in DC and SV metros data "equinix_network_device_type" "ciscoRouter" { diff --git a/docs/index.md b/docs/index.md index 740b688d4..fad52e4f9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,15 +1,12 @@ --- -page_title: "Provider: Equinix" +page_title: "Equinix Provider" --- # Equinix Provider -The Equinix provider is used to interact with the resources provided by Equinix Platform. The provider needs to be configured with the proper credentials before -it can be used. +The Equinix provider is used to interact with the resources provided by Equinix Platform. The provider needs to be configured with the proper credentials before it can be used. -For information about obtaining API key and secret required for Equinix Fabric and Network Edge refer to -[Generating Client ID and Client Secret key](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#generating-client-id-and-client-secret) -from [Equinix Developer Platform portal](https://developer.equinix.com). +For information about obtaining API key and secret required for Equinix Fabric and Network Edge refer to [Generating Client ID and Client Secret key](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#generating-client-id-and-client-secret) from [Equinix Developer Platform portal](https://developer.equinix.com). Interacting with Equinix Metal requires an API auth token that can be generated at [Project-level](https://metal.equinix.com/developers/docs/accounts/projects/#api-keys) or [User-level](https://metal.equinix.com/developers/docs/accounts/users/#api-keys) tokens can be used. @@ -19,10 +16,9 @@ Use the navigation to the left to read about the available resources. ## Example Usage -Example HCL with [provider configuration](https://www.terraform.io/docs/configuration/providers.html) -and a [required providers definition](https://www.terraform.io/language/settings#specifying-a-required-terraform-version): +Example HCL with [provider configuration](https://www.terraform.io/docs/configuration/providers.html) and a [required providers definition](https://www.terraform.io/language/settings#specifying-a-required-terraform-version): -```hcl +```terraform terraform { required_providers { equinix = { @@ -39,10 +35,9 @@ provider "equinix" { } ``` -Client ID and Client Secret can be omitted when the only Equinix resources -consumed are Equinix Metal resources. +Client ID and Client Secret can be omitted when the only Equinix resources consumed are Equinix Metal resources. -```hcl +```terraform # Credentials for only Equinix Metal resources provider "equinix" { auth_token = "someEquinixMetalToken" @@ -59,15 +54,13 @@ export METAL_AUTH_TOKEN=someEquinixMetalToken ### Token Authentication -Token's can be generated for the API Client using the OAuth2 Token features described in the -[OAuth2 API](https://developer.equinix.com/catalog/accesstokenv1#operation/GetOAuth2AccessToken) documentation. +Token's can be generated for the API Client using the OAuth2 Token features described in the [OAuth2 API](https://developer.equinix.com/catalog/accesstokenv1#operation/GetOAuth2AccessToken) documentation. -API tokens can be provided using the `token` provider argument, or the `EQUINIX_API_TOKEN` evironment variable. -The `client_id` and `client_secret` arguments will be ignored in the presence of a `token` argument. +API tokens can be provided using the `token` provider argument, or the `EQUINIX_API_TOKEN` evironment variable. The `client_id` and `client_secret` arguments will be ignored in the presence of a `token` argument. When testing against the [Equinix Sandbox API](https://developer.equinix.com/environment/sandbox), tokens must be used. -```hcl +```terraform provider "equinix" { token = "someToken" } @@ -75,45 +68,21 @@ provider "equinix" { ## Argument Reference -The Equinix provider requires a few basic parameters. While the authentication arguments are -individually optionally, either `token` or `client_id` and `client_secret` must be defined -through arguments or environment settings to interact with Equinix Fabric and Network Edge -services, and `auth_token` to interact with Equinix Metal. +The Equinix provider requires a few basic parameters. While the authentication arguments are individually optionally, either `token` or `client_id` and `client_secret` must be defined through arguments or environment settings to interact with Equinix Fabric and Network Edge services, and `auth_token` to interact with Equinix Metal. -* `client_id` - (Optional) API Consumer Key available under "My Apps" in - developer portal. This argument can also be specified with the - `EQUINIX_API_CLIENTID` shell environment variable. +These parameters can be provided in [Terraform variable files](https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files) or as environment variables. Nevertheless, please note that it is [not recommended to keep sensitive data in plain text files](https://www.terraform.io/docs/state/sensitive-data.html). -* `client_secret` (Optional) API Consumer secret available under "My Apps" in - developer portal. This argument can also be specified with the - `EQUINIX_API_CLIENTSECRET` shell environment variable. + +## Schema -* `token` (Optional) API tokens are generated from API Consumer clients using - the [OAuth2 - API](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#request-access-and-refresh-tokens). - This argument can also be specified with the `EQUINIX_API_TOKEN` shell - environment variable. +### Optional -* `auth_token` - (Optional) This is your Equinix Metal API Auth token. This can - also be specified with the `METAL_AUTH_TOKEN` environment variable. - -* `endpoint` (Optional) The Equinix API base URL to point out desired environment. - This argument can also be specified with the `EQUINIX_API_ENDPOINT` - shell environment variable. (Defaults to `https://api.equinix.com`) - -* `request_timeout` (Optional) The duration of time, in seconds, that the - Equinix Platform API Client should wait before canceling an API request. - Canceled requests may still result in provisioned resources. (Defaults to `30`) - -* `response_max_page_size` (Optional) The maximum number of records in a single response - for REST queries that produce paginated responses. (Default is client specific) - -* `max_retries` (Optional) Maximum number of retries in case of network failure. - -* `max_retry_wait_seconds` (Optional) Maximum time to wait in case of network failure. - -These parameters can be provided in [Terraform variable -files](https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files) -or as environment variables. Nevertheless, please note that it is [not -recommended to keep sensitive data in plain text -files](https://www.terraform.io/docs/state/sensitive-data.html). +- `auth_token` (String) The Equinix Metal API auth key for API operations +- `client_id` (String) API Consumer Key available under "My Apps" in developer portal. This argument can also be specified with the `EQUINIX_API_CLIENTID` shell environment variable. +- `client_secret` (String) API Consumer secret available under "My Apps" in developer portal. This argument can also be specified with the `EQUINIX_API_CLIENTSECRET` shell environment variable. +- `endpoint` (String) The Equinix API base URL to point out desired environment. This argument can also be specified with the `EQUINIX_API_ENDPOINT` shell environment variable. (Defaults to `https://api.equinix.com`) +- `max_retries` (Number) Maximum number of retries in case of network failure. +- `max_retry_wait_seconds` (Number) Maximum number of seconds to wait before retrying a request. +- `request_timeout` (Number) The duration of time, in seconds, that the Equinix Platform API Client should wait before canceling an API request. Canceled requests may still result in provisioned resources. (Defaults to `30`) +- `response_max_page_size` (Number) The maximum number of records in a single response for REST queries that produce paginated responses. (Default is client specific) +- `token` (String) API tokens are generated from API Consumer clients using the [OAuth2 API](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#request-access-and-refresh-tokens). This argument can also be specified with the `EQUINIX_API_TOKEN` shell environment variable. diff --git a/docs/resources/equinix_metal_device.md b/docs/resources/equinix_metal_device.md deleted file mode 100644 index f09419810..000000000 --- a/docs/resources/equinix_metal_device.md +++ /dev/null @@ -1,329 +0,0 @@ ---- -subcategory: "Metal" ---- - -# equinix_metal_device (Resource) - -Provides an Equinix Metal device resource. This can be used to create, -modify, and delete devices. - -~> **NOTE:** All arguments including the `root_password` and `user_data` will be stored in - the raw state as plain-text. -[Read more about sensitive data in state](https://developer.hashicorp.com/terraform/language/state/sensitive-data). - -## Example Usage - -Create a device and add it to cool_project - -```hcl -resource "equinix_metal_device" "web1" { - hostname = "tf.coreos2" - plan = "c3.small.x86" - metro = "sv" - operating_system = "ubuntu_20_04" - billing_cycle = "hourly" - project_id = local.project_id -} -``` - -Same as above, but boot via iPXE initially, using the Ignition Provider for provisioning - -```hcl -resource "equinix_metal_device" "pxe1" { - hostname = "tf.coreos2-pxe" - plan = "c3.small.x86" - metro = "sv" - operating_system = "custom_ipxe" - billing_cycle = "hourly" - project_id = local.project_id - ipxe_script_url = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe" - always_pxe = "false" - user_data = data.ignition_config.example.rendered -} -``` - -Create a device without a public IP address in metro ny, with only a /30 private IPv4 subnet (4 IP addresses) - -```hcl -resource "equinix_metal_device" "web1" { - hostname = "tf.coreos2" - plan = "c3.small.x86" - metro = "ny" - operating_system = "ubuntu_20_04" - billing_cycle = "hourly" - project_id = local.project_id - ip_address { - type = "private_ipv4" - cidr = 30 - } -} -``` - -Deploy device on next-available reserved hardware and do custom partitioning. - -```hcl -resource "equinix_metal_device" "web1" { - hostname = "tftest" - plan = "c3.small.x86" - metro = "ny" - operating_system = "ubuntu_20_04" - billing_cycle = "hourly" - project_id = local.project_id - hardware_reservation_id = "next-available" - storage = < **NOTE:** Elastic addresses stack by type. An assigned public IPv4 will go after the management -public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned -private IPv4 will go after the management private IPv4 (to the end of the network list). - -Each element in the `network` list exports: - -* `address` - IPv4 or IPv6 address string. -* `cidr` - Bit length of the network mask of the address. -* `gateway` - Address of router. -* `public` - Whether the address is routable from the Internet. -* `family` - IP version. One of `4`, `6`. - -### Ports Attribute - -Each element in the `ports` list exports: - -* `name` - Name of the port (e.g. `eth0`, or `bond0`). -* `id` - ID of the port. -* `type` - Type of the port (e.g. `NetworkPort` or `NetworkBondPort`). -* `mac` - MAC address assigned to the port. -* `bonded` - Whether this port is part of a bond in bonded network setup. - -## Import - -This resource can be imported using an existing device ID: - -```sh -terraform import equinix_metal_device {existing_device_id} -``` diff --git a/docs/resources/equinix_fabric_cloud_router.md b/docs/resources/fabric_cloud_router.md similarity index 95% rename from docs/resources/equinix_fabric_cloud_router.md rename to docs/resources/fabric_cloud_router.md index 717de29c5..e94a9bfa0 100644 --- a/docs/resources/equinix_fabric_cloud_router.md +++ b/docs/resources/fabric_cloud_router.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks). Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers ## Example Usage -```hcl +```terraform resource "equinix_fabric_cloud_router" "new_cloud_router"{ name = "Router-SV" type = "XF_ROUTER" @@ -43,6 +43,7 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ ``` + ## Schema ### Required @@ -76,14 +77,15 @@ resource "equinix_fabric_cloud_router" "new_cloud_router"{ - `state` (String) Fabric Cloud Router overall state + ### Nested Schema for `account` Optional: - `account_number` (Number) Account Number - + ### Nested Schema for `location` Optional: @@ -93,8 +95,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - + ### Nested Schema for `notifications` Required: @@ -106,8 +108,8 @@ Optional: - `send_interval` (String) Send interval - + ### Nested Schema for `order` Optional: @@ -120,16 +122,16 @@ Read-Only: - `order_id` (String) Order Identification - `order_number` (String) Order Reference Number - + ### Nested Schema for `package` Required: - `code` (String) Fabric Cloud Router package code - + ### Nested Schema for `project` Optional: @@ -137,8 +139,8 @@ Optional: - `href` (String) Unique Resource URL - `project_id` (String) Project Id - + ### Nested Schema for `timeouts` Optional: @@ -148,8 +150,8 @@ Optional: - `read` (String) - `update` (String) - + ### Nested Schema for `change_log` Read-Only: diff --git a/docs/resources/equinix_fabric_connection.md b/docs/resources/fabric_connection.md similarity index 97% rename from docs/resources/equinix_fabric_connection.md rename to docs/resources/fabric_connection.md index 9f2a12043..7b2841fd0 100644 --- a/docs/resources/equinix_fabric_connection.md +++ b/docs/resources/fabric_connection.md @@ -11,21 +11,20 @@ description: |- Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections ## Supporting Modules -The direct usage of the resources is given in the next section "Example Usage". We also have supporting -Terraform Modules that can be used to assist you with common Fabric Connection use cases. +The direct usage of the resources is given in the next section "Example Usage". We also have supporting Terraform Modules that can be used to assist you with common Fabric Connection use cases. -You can find those modules along with their usage examples on the -[Terraform Registry: (Fabric Terraform Modules)](https://registry.terraform.io/modules/equinix/fabric/equinix/latest) +You can find those modules along with their usage examples on the [Terraform Registry: (Fabric Terraform Modules)](https://registry.terraform.io/modules/equinix/fabric/equinix/latest) ## Example Usage Port to Port EVPL_VC Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "port2port" { name = "ConnectionName" type = "EVPL_VC" @@ -69,7 +68,8 @@ resource "equinix_fabric_connection" "port2port" { ``` Port to AWS EVPL_VC Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "port2aws" { name = "ConnectionName" type = "EVPL_VC" @@ -118,7 +118,8 @@ resource "equinix_fabric_connection" "port2aws" { ``` Port to Port EPL Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "epl" { name = "ConnectionName" type = "EPL_VC" @@ -153,7 +154,8 @@ resource "equinix_fabric_connection" "epl" { ``` Port to Port ACCESS_EPL_VC Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "access_epl_vc" { name = "ConnectionName" type = "ACCESS_EPL_VC" @@ -192,7 +194,8 @@ resource "equinix_fabric_connection" "access_epl_vc" { ``` Virtual Device to Port Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "vd2port" { name = "ConnectionName" type = "EVPL_VC" @@ -236,7 +239,8 @@ resource "equinix_fabric_connection" "vd2port" { ``` Virtual Device to Service Token Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "vd2token" { name = "ConnectionName" type = "EVPL_VC" @@ -270,7 +274,8 @@ resource "equinix_fabric_connection" "vd2token" { ``` Service Token to AWS Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "token2aws" { name = "ConnectionName" type = "EVPL_VC" @@ -305,7 +310,8 @@ resource "equinix_fabric_connection" "token2aws" { ``` Cloud Router to Port Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "fcr2port"{ name = "ConnectionName" type = "IP_VC" @@ -344,7 +350,8 @@ resource "equinix_fabric_connection" "fcr2port"{ ``` Cloud Router to Azure Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "fcr2azure"{ name = "ConnectionName" type = "IP_VC" @@ -382,7 +389,8 @@ resource "equinix_fabric_connection" "fcr2azure"{ ``` Virtual Device to Azure Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "vd2azure" { name = "ConnectionName" type = "EVPL_VC" @@ -425,7 +433,8 @@ resource "equinix_fabric_connection" "vd2azure" { ``` Virtual Device to Azure Redundant Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "vd2azure_primary" { name = "ConnectionName" type = "EVPL_VC" @@ -513,7 +522,8 @@ resource "equinix_fabric_connection" "vd2azure_secondary" { ``` Cloud Router to Network Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "fcr2network"{ name = "ConnectionName" type = "IPWAN_VC" @@ -545,7 +555,8 @@ resource "equinix_fabric_connection" "fcr2network"{ ``` Virtual Device to Network Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "vd2token" { name = "ConnectionName" type = "EVPLAN_VC" @@ -582,7 +593,8 @@ resource "equinix_fabric_connection" "vd2token" { ``` EPLAN Port to Network Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "epl" { name = "ConnectionName" type = "EPLAN_VC" @@ -614,7 +626,8 @@ resource "equinix_fabric_connection" "epl" { ``` EVPLAN Port to Network Connection: -```hcl + +```terraform resource "equinix_fabric_connection" "epl" { name = "ConnectionName" type = "EVPLAN_VC" @@ -658,15 +671,13 @@ Port to IBM Connections could be modified from IBM Service Provider Side by usin * `{"key": "BGP_IBM_CIDR", "value": "172.16.0.18/30"}` * `{"key": "BGP_CER_CIDR", "value": "172.16.0.19/30"}` -To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_gateway_action' resource, you must update the following attribute: -For Connection Approval: -- Use action = "create_gateway_approve" -For Bandwidth Upgrade/Downgrade: -- Use action = "update_attributes_approve" -For Connection Deletion: +To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_gateway_action' resource, you must update the following attribute: For Connection Approval: +- Use action = "create_gateway_approve" For Bandwidth Upgrade/Downgrade: +- Use action = "update_attributes_approve" For Connection Deletion: - Use action = "delete_gateway_approve" + ## Schema ### Required @@ -700,6 +711,7 @@ For Connection Deletion: - `uuid` (String) Equinix-assigned connection identifier + ### Nested Schema for `a_side` Optional: @@ -709,6 +721,7 @@ Optional: - `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--a_side--service_token)) + ### Nested Schema for `a_side.access_point` Optional: @@ -733,6 +746,7 @@ Read-Only: - `account` (Block Set) Account (see [below for nested schema](#nestedblock--a_side--access_point--account)) + ### Nested Schema for `a_side.access_point.gateway` Optional: @@ -743,8 +757,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.interface` Optional: @@ -753,8 +767,8 @@ Optional: - `type` (String) Interface type - `uuid` (String) Equinix-assigned interface identifier - + ### Nested Schema for `a_side.access_point.link_protocol` Optional: @@ -764,8 +778,8 @@ Optional: - `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections - `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections - + ### Nested Schema for `a_side.access_point.location` Optional: @@ -775,8 +789,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - + ### Nested Schema for `a_side.access_point.network` Optional: @@ -787,8 +801,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.port` Optional: @@ -802,6 +816,7 @@ Read-Only: - `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--a_side--access_point--port--redundancy)) + ### Nested Schema for `a_side.access_point.port.redundancy` Read-Only: @@ -810,9 +825,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `a_side.access_point.profile` Required: @@ -828,6 +842,7 @@ Read-Only: - `name` (String) Customer-assigned service profile name + ### Nested Schema for `a_side.access_point.profile.access_point_type_configs` Read-Only: @@ -835,9 +850,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `a_side.access_point.router` Optional: @@ -848,8 +862,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.virtual_device` Optional: @@ -862,8 +876,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `a_side.access_point.account` Read-Only: @@ -877,9 +891,8 @@ Read-Only: - `organization_name` (String) Equinix-assigned name of the subscriber's organization. - `ucm_id` (String) Enterprise datastore id - - + ### Nested Schema for `a_side.additional_info` Optional: @@ -887,8 +900,8 @@ Optional: - `key` (String) Additional information key - `value` (String) Additional information value - + ### Nested Schema for `a_side.service_token` Optional: @@ -901,9 +914,8 @@ Read-Only: - `description` (String) Service token description - `href` (String) An absolute URL that is the subject of the link's context - - + ### Nested Schema for `notifications` Required: @@ -915,8 +927,8 @@ Optional: - `send_interval` (String) Send interval - + ### Nested Schema for `order` Optional: @@ -929,8 +941,8 @@ Read-Only: - `order_id` (String) Order Identification - `order_number` (String) Order Reference Number - + ### Nested Schema for `z_side` Optional: @@ -940,6 +952,7 @@ Optional: - `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--z_side--service_token)) + ### Nested Schema for `z_side.access_point` Optional: @@ -964,6 +977,7 @@ Read-Only: - `account` (Block Set) Account (see [below for nested schema](#nestedblock--z_side--access_point--account)) + ### Nested Schema for `z_side.access_point.gateway` Optional: @@ -974,8 +988,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.interface` Optional: @@ -984,8 +998,8 @@ Optional: - `type` (String) Interface type - `uuid` (String) Equinix-assigned interface identifier - + ### Nested Schema for `z_side.access_point.link_protocol` Optional: @@ -995,8 +1009,8 @@ Optional: - `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections - `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections - + ### Nested Schema for `z_side.access_point.location` Optional: @@ -1006,8 +1020,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - + ### Nested Schema for `z_side.access_point.network` Optional: @@ -1018,8 +1032,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.port` Optional: @@ -1033,6 +1047,7 @@ Read-Only: - `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--z_side--access_point--port--redundancy)) + ### Nested Schema for `z_side.access_point.port.redundancy` Read-Only: @@ -1041,9 +1056,8 @@ Read-Only: - `group` (String) - `priority` (String) - - + ### Nested Schema for `z_side.access_point.profile` Required: @@ -1059,6 +1073,7 @@ Read-Only: - `name` (String) Customer-assigned service profile name + ### Nested Schema for `z_side.access_point.profile.access_point_type_configs` Read-Only: @@ -1066,9 +1081,8 @@ Read-Only: - `type` (String) - `uuid` (String) - - + ### Nested Schema for `z_side.access_point.router` Optional: @@ -1079,8 +1093,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.virtual_device` Optional: @@ -1093,8 +1107,8 @@ Read-Only: - `href` (String) Unique Resource Identifier - + ### Nested Schema for `z_side.access_point.account` Read-Only: @@ -1108,9 +1122,8 @@ Read-Only: - `organization_name` (String) Equinix-assigned name of the subscriber's organization. - `ucm_id` (String) Enterprise datastore id - - + ### Nested Schema for `z_side.additional_info` Optional: @@ -1118,8 +1131,8 @@ Optional: - `key` (String) Additional information key - `value` (String) Additional information value - + ### Nested Schema for `z_side.service_token` Optional: @@ -1132,9 +1145,8 @@ Read-Only: - `description` (String) Service token description - `href` (String) An absolute URL that is the subject of the link's context - - + ### Nested Schema for `project` Optional: @@ -1145,8 +1157,8 @@ Read-Only: - `href` (String) Unique Resource URL - + ### Nested Schema for `redundancy` Optional: @@ -1154,8 +1166,8 @@ Optional: - `group` (String) Redundancy group identifier (Use the redundancy.0.group UUID of primary connection; e.g. one(equinix_fabric_connection.primary_port_connection.redundancy).group or equinix_fabric_connection.primary_port_connection.redundancy.0.group) - `priority` (String) Connection priority in redundancy group - PRIMARY, SECONDARY - + ### Nested Schema for `timeouts` Optional: @@ -1165,8 +1177,8 @@ Optional: - `read` (String) - `update` (String) - + ### Nested Schema for `account` Read-Only: @@ -1180,8 +1192,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -1199,8 +1211,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `operation` Read-Only: @@ -1210,6 +1222,7 @@ Read-Only: - `provider_status` (String) + ### Nested Schema for `operation.errors` Read-Only: @@ -1222,6 +1235,7 @@ Read-Only: - `help` (String) + ### Nested Schema for `operation.errors.additional_info` Read-Only: diff --git a/docs/resources/equinix_fabric_network.md b/docs/resources/fabric_network.md similarity index 94% rename from docs/resources/equinix_fabric_network.md rename to docs/resources/fabric_network.md index 7f4a02739..d8cd92389 100644 --- a/docs/resources/equinix_fabric_network.md +++ b/docs/resources/fabric_network.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible resource allows creation and management of Equinix Fabric Network Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks ## Example Usage -```hcl +```terraform resource "equinix_fabric_network" "new_network" { name = "Network-SV" type = "EVPLAN" @@ -32,6 +32,7 @@ resource "equinix_fabric_network" "new_network" { ``` + ## Schema ### Required @@ -59,6 +60,7 @@ resource "equinix_fabric_network" "new_network" { - `uuid` (String) Equinix-assigned network identifier + ### Nested Schema for `notifications` Required: @@ -70,16 +72,16 @@ Optional: - `send_interval` (String) Send interval - + ### Nested Schema for `project` Required: - `project_id` (String) Customer project identifier - + ### Nested Schema for `location` Optional: @@ -89,8 +91,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - + ### Nested Schema for `timeouts` Optional: @@ -100,8 +102,8 @@ Optional: - `read` (String) - `update` (String) - + ### Nested Schema for `change` Read-Only: @@ -110,8 +112,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -129,8 +131,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `operation` Read-Only: diff --git a/docs/resources/equinix_fabric_routing_protocol.md b/docs/resources/fabric_routing_protocol.md similarity index 95% rename from docs/resources/equinix_fabric_routing_protocol.md rename to docs/resources/fabric_routing_protocol.md index d1ed4f54d..74d054a6f 100644 --- a/docs/resources/equinix_fabric_routing_protocol.md +++ b/docs/resources/fabric_routing_protocol.md @@ -11,13 +11,14 @@ description: |- Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols ## Example Usage Direct Routing Protocol -```hcl + +```terraform resource "equinix_fabric_routing_protocol" "direct"{ connection_uuid = type = "DIRECT" @@ -32,7 +33,8 @@ resource "equinix_fabric_routing_protocol" "direct"{ ``` BGP Routing Protocol (Requires Direct Routing Protocol Created First): -```hcl + +```terraform resource "equinix_fabric_routing_protocol" "bgp" { connection_uuid = type = "BGP" @@ -50,7 +52,8 @@ resource "equinix_fabric_routing_protocol" "bgp" { ``` Direct and BGP Routing Protocol (Requires Depends On to Handle Synchronization): -```hcl + +```terraform resource "equinix_fabric_routing_protocol" "direct"{ connection_uuid = type = "DIRECT" @@ -83,6 +86,7 @@ resource "equinix_fabric_routing_protocol" "bgp" { ``` + ## Schema ### Required @@ -115,6 +119,7 @@ resource "equinix_fabric_routing_protocol" "bgp" { - `state` (String) Routing Protocol overall state + ### Nested Schema for `bfd` Required: @@ -125,8 +130,8 @@ Optional: - `interval` (String) Interval range between the received BFD control packets - + ### Nested Schema for `bgp_ipv4` Required: @@ -141,8 +146,8 @@ Read-Only: - `equinix_peer_ip` (String) Equinix side peering ip - + ### Nested Schema for `bgp_ipv6` Required: @@ -157,24 +162,24 @@ Read-Only: - `equinix_peer_ip` (String) Equinix side peering ip - + ### Nested Schema for `direct_ipv4` Required: - `equinix_iface_ip` (String) Equinix side Interface IP address - + ### Nested Schema for `direct_ipv6` Optional: - `equinix_iface_ip` (String) Equinix side Interface IP address - + ### Nested Schema for `timeouts` Optional: @@ -184,8 +189,8 @@ Optional: - `read` (String) - `update` (String) - + ### Nested Schema for `change` Read-Only: @@ -194,8 +199,8 @@ Read-Only: - `type` (String) - `uuid` (String) - + ### Nested Schema for `change_log` Read-Only: @@ -213,8 +218,8 @@ Read-Only: - `updated_by_full_name` (String) - `updated_date_time` (String) - + ### Nested Schema for `operation` Read-Only: @@ -222,6 +227,7 @@ Read-Only: - `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) + ### Nested Schema for `operation.errors` Read-Only: @@ -234,6 +240,7 @@ Read-Only: - `help` (String) + ### Nested Schema for `operation.errors.additional_info` Read-Only: diff --git a/docs/resources/equinix_fabric_service_profile.md b/docs/resources/fabric_service_profile.md similarity index 97% rename from docs/resources/equinix_fabric_service_profile.md rename to docs/resources/fabric_service_profile.md index 671577ff6..9e6047865 100644 --- a/docs/resources/equinix_fabric_service_profile.md +++ b/docs/resources/fabric_service_profile.md @@ -11,12 +11,12 @@ description: |- Fabric V4 API compatible resource allows creation and management of Equinix Fabric Service Profile Additional documentation: -* Getting Started: -* API: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles ## Example Usage -```hcl +```terraform resource "equinix_fabric_service_profile" "new_service_profile" { description = "Service Profile for Receiving Connections" name = "Name Of Business + Use Case Tag" @@ -50,6 +50,7 @@ resource "equinix_fabric_service_profile" "new_service_profile" { ``` + ## Schema ### Required @@ -68,7 +69,7 @@ resource "equinix_fabric_service_profile" "new_service_profile" { - `notifications` (Block List) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedblock--notifications)) - `ports` (Block List) Ports (see [below for nested schema](#nestedblock--ports)) - `project` (Block Set, Max: 1) Project information (see [below for nested schema](#nestedblock--project)) -- `self_profile` (Boolean) Self Profile indicating if the profile is created for customer's self use +- `self_profile` (Boolean) Self Profile indicating if the profile is created for customer's self use - `state` (String) Service profile state - ACTIVE, PENDING_APPROVAL, DELETED, REJECTED - `tags` (List of String) Tags attached to the connection - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) @@ -84,6 +85,7 @@ resource "equinix_fabric_service_profile" "new_service_profile" { - `uuid` (String) Equinix assigned service profile identifier + ### Nested Schema for `access_point_type_configs` Required: @@ -110,6 +112,7 @@ Read-Only: - `uuid` (String) Colo/Port Uuid + ### Nested Schema for `access_point_type_configs.api_config` Optional: @@ -122,8 +125,8 @@ Optional: - `integration_id` (String) A unique identifier issued during onboarding and used to integrate the customer's service profile with the Equinix Fabric API. - `over_subscription_limit` (Number) Port bandwidth multiplier that determines the total bandwidth that can be allocated to users creating connections to your services. For example, a 10 Gbps port combined with an overSubscriptionLimit parameter value of 10 allows your subscribers to create connections with a total bandwidth of 100 Gbps. - + ### Nested Schema for `access_point_type_configs.authentication_key` Optional: @@ -132,8 +135,8 @@ Optional: - `label` (String) Name of the parameter that must be provided to authorize the connection. - `required` (Boolean) Requirement to configure an authentication key. - + ### Nested Schema for `access_point_type_configs.link_protocol_config` Optional: @@ -142,9 +145,8 @@ Optional: - `encapsulation_strategy` (String) Additional tagging information required by the seller profile. - `reuse_vlan_s_tag` (Boolean) Automatically accept subsequent DOT1Q to QINQ connections that use the same authentication key. These connections will have the same VLAN S-tag assigned as the initial connection. - - + ### Nested Schema for `custom_fields` Required: @@ -159,8 +161,8 @@ Optional: - `description` (String) Description - `options` (List of String) Options - + ### Nested Schema for `marketing_info` Optional: @@ -170,6 +172,7 @@ Optional: - `promotion` (Boolean) Promotion + ### Nested Schema for `marketing_info.process_step` Optional: @@ -178,9 +181,8 @@ Optional: - `sub_title` (String) Sub Title - `title` (String) Title - - + ### Nested Schema for `metros` Optional: @@ -192,8 +194,8 @@ Optional: - `name` (String) Metro Name - `seller_regions` (Map of String) Seller Regions - + ### Nested Schema for `notifications` Required: @@ -205,8 +207,8 @@ Optional: - `send_interval` (String) Send interval - + ### Nested Schema for `ports` Required: @@ -222,6 +224,7 @@ Optional: - `seller_region_description` (String) Seller Region details + ### Nested Schema for `ports.location` Optional: @@ -231,9 +234,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - - + ### Nested Schema for `project` Optional: @@ -244,8 +246,8 @@ Read-Only: - `href` (String) Unique Resource URL - + ### Nested Schema for `timeouts` Optional: @@ -255,8 +257,8 @@ Optional: - `read` (String) - `update` (String) - + ### Nested Schema for `virtual_devices` Required: @@ -270,6 +272,7 @@ Optional: - `location` (Block Set, Max: 1) Device Location (see [below for nested schema](#nestedblock--virtual_devices--location)) + ### Nested Schema for `virtual_devices.location` Optional: @@ -279,9 +282,8 @@ Optional: - `metro_name` (String) Access point metro name - `region` (String) Access point region - - + ### Nested Schema for `account` Read-Only: @@ -295,8 +297,8 @@ Read-Only: - `organization_name` (String) - `ucm_id` (String) - + ### Nested Schema for `change_log` Read-Only: diff --git a/docs/resources/equinix_metal_bgp_session.md b/docs/resources/metal_bgp_session.md similarity index 99% rename from docs/resources/equinix_metal_bgp_session.md rename to docs/resources/metal_bgp_session.md index 9a8fa62c1..efb7a97b6 100644 --- a/docs/resources/equinix_metal_bgp_session.md +++ b/docs/resources/metal_bgp_session.md @@ -19,7 +19,7 @@ Following HCL illustrates usage of the BGP features in Equinix Metal. It will * configure the floating IPv4 statically in the device * install and configure [BIRD](https://bird.network.cz) in the device, and make it announce the floating IPv4 locally -```hcl +```terraform locals { bgp_password = "955dB0b81Ef" project_id = "" diff --git a/docs/resources/equinix_metal_connection.md b/docs/resources/metal_connection.md similarity index 82% rename from docs/resources/equinix_metal_connection.md rename to docs/resources/metal_connection.md index d66fda62e..fbf58941b 100644 --- a/docs/resources/equinix_metal_connection.md +++ b/docs/resources/metal_connection.md @@ -12,7 +12,7 @@ Use this resource to request the creation an Interconnection asset to connect wi ### Shared Connection with a_side token - Redundant Connection from Equinix Metal to a Cloud Service Provider -```hcl +```terraform resource "equinix_metal_connection" "example" { name = "tf-metal-to-azure" project_id = local.project_id @@ -46,17 +46,11 @@ resource "equinix_fabric_connection" "example" { } ``` --> NOTE: There are multiple [Equinix Fabric L2 Connection Terraform modules](https://registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection) available with full-fledged examples of connections from Fabric Ports, Network Edge Devices or Service Token to most popular Cloud Service Providers. Check out the examples for Equinix Metal shared connection with A-side Service Token included in each of them: -[AWS](https://registry.terraform.io/modules/equinix-labs/fabric-connection-aws/equinix/latest/examples/service-token-metal-to-aws-connection), -[Azure](https://registry.terraform.io/modules/equinix-labs/fabric-connection-azure/equinix/latest/examples/service-token-metal-to-azure-connection), -[Google Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-gcp/equinix/latest/examples/service-token-metal-to-gcp-connection), -[IBM Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-ibm/equinix/latest/examples/service-token-metal-to-ibm-connection), -[Oracle Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-oci/equinix/latest/examples/service-token-metal-to-oci-connection), -[Alibaba Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-alibaba/equinix/latest/examples/service-token-metal-to-alibaba-connection). +-> NOTE: There are multiple [Equinix Fabric L2 Connection Terraform modules](https://registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection) available with full-fledged examples of connections from Fabric Ports, Network Edge Devices or Service Token to most popular Cloud Service Providers. Check out the examples for Equinix Metal shared connection with A-side Service Token included in each of them: [AWS](https://registry.terraform.io/modules/equinix-labs/fabric-connection-aws/equinix/latest/examples/service-token-metal-to-aws-connection), [Azure](https://registry.terraform.io/modules/equinix-labs/fabric-connection-azure/equinix/latest/examples/service-token-metal-to-azure-connection), [Google Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-gcp/equinix/latest/examples/service-token-metal-to-gcp-connection), [IBM Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-ibm/equinix/latest/examples/service-token-metal-to-ibm-connection), [Oracle Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-oci/equinix/latest/examples/service-token-metal-to-oci-connection), [Alibaba Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-alibaba/equinix/latest/examples/service-token-metal-to-alibaba-connection). ### Shared Connection with z_side token - Non-redundant Connection from your own Equinix Fabric Port to Equinix Metal -```hcl +```terraform resource "equinix_metal_vlan" "example" { project_id = local.my_project_id metro = "FR" @@ -95,7 +89,7 @@ resource "equinix_fabric_connection" "example" { ### Shared Connection for organizations without Connection Services Token feature enabled -```hcl +```terraform resource "equinix_metal_vlan" "example1" { project_id = local.my_project_id metro = "SV" @@ -140,12 +134,12 @@ The following arguments are supported: * `name` - (Required) Name of the connection resource * `metro` - (Optional) Metro where the connection will be created. -* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) * `redundancy` - (Required) Connection redundancy - redundant or primary. * `type` - (Required) Connection type - dedicated or shared. * `contact_email` - (Optional) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. * `project_id` - (Optional) ID of the project where the connection is scoped to, must be set for. -* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. +* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. * `description` - (Optional) Description for the connection resource. * `mode` - (Optional) Mode for connections in IBX facilities with the dedicated type - standard or tunnel. Default is standard. * `tags` - (Optional) String list of tags. @@ -158,8 +152,6 @@ In addition to all arguments above, the following attributes are exported: * `organization_id` - ID of the organization where the connection is scoped to. * `status` - Status of the connection resource. -* `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`). Schema of -port is described in documentation of the -[equinix_metal_connection datasource](../data-sources/equinix_metal_connection.md). +* `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`). Schema of port is described in documentation of the [equinix_metal_connection datasource](../data-sources/equinix_metal_connection.md). * `service_tokens` - List of connection service tokens with attributes required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./equinix_fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). Scehma of service_token is described in documentation of the [equinix_metal_connection datasource](../data-sources/equinix_metal_connection.md). * `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./equinix_fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. diff --git a/docs/resources/metal_device.md b/docs/resources/metal_device.md new file mode 100644 index 000000000..b814c7426 --- /dev/null +++ b/docs/resources/metal_device.md @@ -0,0 +1,266 @@ +--- +subcategory: "Metal" +--- + +# equinix_metal_device (Resource) + +Provides an Equinix Metal device resource. This can be used to create, modify, and delete devices. + +~> **NOTE:** All arguments including the `root_password` and `user_data` will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://developer.hashicorp.com/terraform/language/state/sensitive-data). + +## Example Usage + +Create a device and add it to cool_project + +```terraform +resource "equinix_metal_device" "web1" { + hostname = "tf.coreos2" + plan = "c3.small.x86" + metro = "sv" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} +``` + +Same as above, but boot via iPXE initially, using the Ignition Provider for provisioning + +```terraform +resource "equinix_metal_device" "pxe1" { + hostname = "tf.coreos2-pxe" + plan = "c3.small.x86" + metro = "sv" + operating_system = "custom_ipxe" + billing_cycle = "hourly" + project_id = local.project_id + ipxe_script_url = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe" + always_pxe = "false" + user_data = data.ignition_config.example.rendered +} +``` + +Create a device without a public IP address in metro ny, with only a /30 private IPv4 subnet (4 IP addresses) + +```terraform +resource "equinix_metal_device" "web1" { + hostname = "tf.coreos2" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id + ip_address { + type = "private_ipv4" + cidr = 30 + } +} +``` + +Deploy device on next-available reserved hardware and do custom partitioning. + +```terraform +resource "equinix_metal_device" "web1" { + hostname = "tftest" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id + hardware_reservation_id = "next-available" + storage = < +## Schema + +### Required + +- `operating_system` (String) The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated. +- `plan` (String) The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/) +- `project_id` (String) The ID of the project in which to create the device + +### Optional + +- `always_pxe` (Boolean) If true, a device with OS custom_ipxe will +- `behavior` (Block List, Max: 1) (see [below for nested schema](#nestedblock--behavior)) +- `billing_cycle` (String) monthly or hourly +- `custom_data` (String, Sensitive) A string of the desired Custom Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"custom_data"`, the device will be updated in-place instead of recreated. +- `description` (String) Description string for the device +- `facilities` (List of String, Deprecated) List of facility codes with deployment preferences. Equinix Metal API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit [Facilities API docs](https://metal.equinix.com/developers/api/facilities/), set your API auth token in the top of the page and see JSON from the API response. Conflicts with metro +- `force_detach_volumes` (Boolean) Delete device even if it has volumes attached. Only applies for destroy action +- `hardware_reservation_id` (String) The UUID of the hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically +- `hostname` (String) The device hostname used in deployments taking advantage of Layer3 DHCP or metadata service configuration. +- `ip_address` (Block List) A list of IP address types for the device (structure is documented below) (see [below for nested schema](#nestedblock--ip_address)) +- `ipxe_script_url` (String) URL pointing to a hosted iPXE script. More +- `locked` (Boolean) Whether the device is locked or unlocked. Locking a device prevents you from deleting or reinstalling the device or performing a firmware update on the device, and it prevents an instance with a termination time set from being reclaimed, even if the termination time was reached +- `metro` (String) Metro area for the new device. Conflicts with facilities +- `project_ssh_key_ids` (List of String) Array of IDs of the project SSH keys which should be added to the device. If you specify this array, only the listed project SSH keys (and any SSH keys for the users specified in user_ssh_key_ids) will be added. If no SSH keys are specified (both user_ssh_keys_ids and project_ssh_key_ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. Project SSH keys can be created with the [equinix_metal_project_ssh_key](equinix_metal_project_ssh_key.md) resource +- `reinstall` (Block List, Max: 1) (see [below for nested schema](#nestedblock--reinstall)) +- `storage` (String) JSON for custom partitioning. Only usable on reserved hardware. More information in in the [Custom Partitioning and RAID](https://metal.equinix.com/developers/docs/servers/custom-partitioning-raid/) doc +- `tags` (List of String) Tags attached to the device +- `termination_time` (String) Timestamp for device termination. For example "2021-09-03T16:32:00+03:00". If you don't supply timezone info, timestamp is assumed to be in UTC. +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `user_data` (String, Sensitive) A string of the desired User Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"user_data"`, the device will be updated in-place instead of recreated. +- `user_ssh_key_ids` (List of String) Array of IDs of the users whose SSH keys should be added to the device. If you specify this array, only the listed users' SSH keys (and any project SSH keys specified in project_ssh_key_ids) will be added. If no SSH keys are specified (both user_ssh_keys_ids and project_ssh_key_ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. User SSH keys can be created with the [equinix_metal_ssh_key](equinix_metal_ssh_key.md) resource +- `wait_for_reservation_deprovision` (Boolean) Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019) + +### Read-Only + +- `access_private_ipv4` (String) The ipv4 private IP assigned to the device +- `access_public_ipv4` (String) The ipv4 maintenance IP assigned to the device +- `access_public_ipv6` (String) The ipv6 maintenance IP assigned to the device +- `created` (String) The timestamp for when the device was created +- `deployed_facility` (String, Deprecated) The facility where the device is deployed +- `deployed_hardware_reservation_id` (String) ID of hardware reservation where this device was deployed. It is useful when using the next-available hardware reservation +- `id` (String) The ID of this resource. +- `network` (List of Object) The device's private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 addresses: public ipv4, private ipv4 and ipv6 (see [below for nested schema](#nestedatt--network)) +- `network_type` (String, Deprecated) Network type of a device, used in [Layer 2 networking](https://metal.equinix.com/developers/docs/networking/layer2/). Will be one of layer3, hybrid, hybrid-bonded, layer2-individual, layer2-bonded +- `ports` (List of Object) Ports assigned to the device (see [below for nested schema](#nestedatt--ports)) +- `root_password` (String, Sensitive) Root password to the server (disabled after 24 hours) +- `sos_hostname` (String) The hostname to use for [Serial over SSH](https://deploy.equinix.com/developers/docs/metal/resilience-recovery/serial-over-ssh/) access to the device +- `ssh_key_ids` (List of String) List of IDs of SSH keys deployed in the device, can be both user and project SSH keys +- `state` (String) The status of the device +- `updated` (String) The timestamp for the last time the device was updated + + +### Nested Schema for `behavior` + +Optional: + +- `allow_changes` (List of String) List of attributes that are allowed to change without recreating the instance. Supported attributes: `custom_data`, `user_data` + + + +### Nested Schema for `ip_address` + +Required: + +- `type` (String) one of public_ipv4,private_ipv4,public_ipv6 + +Optional: + +- `cidr` (Number) CIDR suffix for IP block assigned to this device +- `reservation_ids` (List of String) IDs of reservations to pick the blocks from + + + +### Nested Schema for `reinstall` + +Optional: + +- `deprovision_fast` (Boolean) Whether the OS disk should be filled with `00h` bytes before reinstall +- `enabled` (Boolean) Whether the device should be reinstalled instead of destroyed +- `preserve_data` (Boolean) Whether the non-OS disks should be kept or wiped during reinstall + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `update` (String) + + + +### Nested Schema for `network` + +Read-Only: + +- `address` (String) +- `cidr` (Number) +- `family` (Number) +- `gateway` (String) +- `public` (Boolean) + + + +### Nested Schema for `ports` + +Read-Only: + +- `bonded` (Boolean) +- `id` (String) +- `mac` (String) +- `name` (String) +- `type` (String) diff --git a/docs/resources/equinix_metal_device_network_type.md b/docs/resources/metal_device_network_type.md similarity index 85% rename from docs/resources/equinix_metal_device_network_type.md rename to docs/resources/metal_device_network_type.md index 95635bdd7..340c3d2db 100644 --- a/docs/resources/equinix_metal_device_network_type.md +++ b/docs/resources/metal_device_network_type.md @@ -8,8 +8,8 @@ This resource controls network type of Equinix Metal devices. To learn more about Layer 2 networking in Equinix Metal, refer to -* -* +* https://metal.equinix.com/developers/docs/networking/layer2/ +* https://metal.equinix.com/developers/docs/networking/layer2-configs/ If you are attaching VLAN to a device (i.e. using equinix_metal_port_vlan_attachment), link the device ID from this resource, in order to make the port attachment implicitly dependent on the state of the network type. If you link the device ID from the equinix_metal_device resource, Terraform will not wait for the network type change. See examples in [equinix_metal_port_vlan_attachment](port_vlan_attachment). @@ -30,12 +30,10 @@ terraform import equinix_metal_device_network_type {existing device_id} The following arguments are supported: * `device_id` - (Required) The ID of the device on which the network type should be set. -* `type` - (Required) Network type to set. Must be one of `layer3`, `hybrid`, `hybrid-bonded`, `layer2-individual` -and `layer2-bonded`. +* `type` - (Required) Network type to set. Must be one of `layer3`, `hybrid`, `hybrid-bonded`, `layer2-individual` and `layer2-bonded`. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -* `id` - ID of the controlled device. Use this in linked resources, if you need to wait for the -network type change. It is the same as `device_id`. +* `id` - ID of the controlled device. Use this in linked resources, if you need to wait for the network type change. It is the same as `device_id`. diff --git a/docs/resources/equinix_metal_gateway.md b/docs/resources/metal_gateway.md similarity index 85% rename from docs/resources/equinix_metal_gateway.md rename to docs/resources/metal_gateway.md index 7aedb4b3f..868be8ecf 100644 --- a/docs/resources/equinix_metal_gateway.md +++ b/docs/resources/metal_gateway.md @@ -10,7 +10,7 @@ See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.co ## Example Usage -```hcl +```terraform # Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses resource "equinix_metal_vlan" "test" { @@ -26,7 +26,7 @@ resource "equinix_metal_gateway" "test" { } ``` -```hcl +```terraform # Create Metal Gateway for a VLAN and reserved IP address block resource "equinix_metal_vlan" "test" { @@ -54,10 +54,8 @@ The following arguments are supported: * `project_id` - (Required) UUID of the project where the gateway is scoped to. * `vlan_id` - (Required) UUID of the VLAN where the gateway is scoped to. -* `ip_reservation_id` - (Optional) UUID of Public or VRF IP Reservation to associate with the gateway, the -reservation must be in the same metro as the VLAN, conflicts with `private_ipv4_subnet_size`. -* `private_ipv4_subnet_size` - (Optional) Size of the private IPv4 subnet to create for this metal -gateway, must be one of `8`, `16`, `32`, `64`, `128`. Conflicts with `ip_reservation_id`. +* `ip_reservation_id` - (Optional) UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with `private_ipv4_subnet_size`. +* `private_ipv4_subnet_size` - (Optional) Size of the private IPv4 subnet to create for this metal gateway, must be one of `8`, `16`, `32`, `64`, `128`. Conflicts with `ip_reservation_id`. ## Attributes Reference @@ -70,4 +68,4 @@ In addition to all arguments above, the following attributes are exported: [Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): -* `delete` - (Default `20m`) \ No newline at end of file +* `delete` - (Default `20m`) diff --git a/docs/resources/equinix_metal_ip_attachment.md b/docs/resources/metal_ip_attachment.md similarity index 77% rename from docs/resources/equinix_metal_ip_attachment.md rename to docs/resources/metal_ip_attachment.md index a2ab78e14..81ebe1aad 100644 --- a/docs/resources/equinix_metal_ip_attachment.md +++ b/docs/resources/metal_ip_attachment.md @@ -6,19 +6,15 @@ subcategory: "Metal" Provides a resource to attach elastic IP subnets to devices. -To attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR -belonging to one of your reserved blocks in the same project and metro as the target device. +To attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR belonging to one of your reserved blocks in the same project and metro as the target device. -For example, you have reserved IPv4 address block `147.229.10.152/30`, you can choose to assign -either the whole block as one subnet to a device; or 2 subnets with CIDRs `147.229.10.152/31` and -`147.229.10.154/31`; or 4 subnets with mask prefix length `32`. More about the elastic IP subnets -is [here](https://metal.equinix.com/developers/docs/networking/elastic-ips/). +For example, you have reserved IPv4 address block `147.229.10.152/30`, you can choose to assign either the whole block as one subnet to a device; or 2 subnets with CIDRs `147.229.10.152/31` and `147.229.10.154/31`; or 4 subnets with mask prefix length `32`. More about the elastic IP subnets is [here](https://metal.equinix.com/developers/docs/networking/elastic-ips/). Device and reserved block must be in the same metro. ## Example Usage -```hcl +```terraform # Reserve /30 block of max 2 public IPv4 addresses in metro ny for myproject resource "equinix_metal_reserved_ip_block" "myblock" { project_id = local.project_id @@ -39,8 +35,7 @@ resource "equinix_metal_ip_attachment" "first_address_assignment" { The following arguments are supported: * `device_id` - (Required) ID of device to which to assign the subnet. -* `cidr_notation` - (Required) CIDR notation of subnet from block reserved in the same project -and metro as the device. +* `cidr_notation` - (Required) CIDR notation of subnet from block reserved in the same project and metro as the device. ## Attributes Reference diff --git a/docs/resources/equinix_metal_organization.md b/docs/resources/metal_organization.md similarity index 95% rename from docs/resources/equinix_metal_organization.md rename to docs/resources/metal_organization.md index b210ed098..ebf4adcd4 100644 --- a/docs/resources/equinix_metal_organization.md +++ b/docs/resources/metal_organization.md @@ -8,7 +8,7 @@ Provides a resource to manage organization resource in Equinix Metal. ## Example Usage -```hcl +```terraform # Create a new Organization resource "equinix_metal_organization" "tf_organization_1" { name = "foobar" @@ -21,8 +21,7 @@ resource "equinix_metal_organization" "tf_organization_1" { The following arguments are supported: * `name` - (Required) The name of the Organization. -* `address` - (Required) An object that has the address information. See [Address](#address) -below for more details. +* `address` - (Required) An object that has the address information. See [Address](#address) below for more details. * `description` - (Optional) Description string. * `website` - (Optional) Website link. * `twitter` - (Optional) Twitter handle. diff --git a/docs/resources/equinix_metal_organization_member.md b/docs/resources/metal_organization_member.md similarity index 98% rename from docs/resources/equinix_metal_organization_member.md rename to docs/resources/metal_organization_member.md index f39ac0379..8094c78bf 100644 --- a/docs/resources/equinix_metal_organization_member.md +++ b/docs/resources/metal_organization_member.md @@ -10,7 +10,7 @@ Manage the membership of existing and new invitees within an Equinix Metal organ Add a member to an organization to collaborate on given projects: -```hcl +```terraform resource "equinix_metal_organization_member" "member" { invitee = "member@example.com" roles = ["limited_collaborator"] @@ -21,7 +21,7 @@ resource "equinix_metal_organization_member" "member" { Add a member to an organization as an organization administrator: -```hcl +```terraform resource "equinix_metal_organization_member" "owner" { invitee = "admin@example.com" roles = ["owner"] diff --git a/docs/resources/equinix_metal_port.md b/docs/resources/metal_port.md similarity index 79% rename from docs/resources/equinix_metal_port.md rename to docs/resources/metal_port.md index e7fb6681a..37690d0a7 100644 --- a/docs/resources/equinix_metal_port.md +++ b/docs/resources/metal_port.md @@ -4,14 +4,11 @@ subcategory: "Metal" # equinix_metal_port (Resource) -Use this resource to configure network ports on an Equinix Metal device. This resource can control both -physical and bond ports. +Use this resource to configure network ports on an Equinix Metal device. This resource can control both physical and bond ports. -This Terraform resource doesn't create an API resource in Equinix Metal, but rather provides finer -control for [Layer 2 networking](https://metal.equinix.com/developers/docs/layer2-networking/). +This Terraform resource doesn't create an API resource in Equinix Metal, but rather provides finer control for [Layer 2 networking](https://metal.equinix.com/developers/docs/layer2-networking/). -The port resource referred is created together with device and accessible either via the device -resource or over `/port/` API path. +The port resource referred is created together with device and accessible either via the device resource or over `/port/` API path. -> To achieve the network configurations available in the portal it may require the creation and combination of various `equinix_metal_port` resources. See the [Network Types Guide](../guides/network_types.md) for examples of this resource. @@ -22,32 +19,27 @@ The following arguments are supported: * `port_id` - (Required) ID of the port to read. * `bonded` - (Required) Whether the port should be bonded. * `layer2` - (Optional) Whether to put the port to Layer 2 mode, valid only for bond ports. -* `vlan_ids` - (Optional) List of VLAN UUIDs to attach to the port, valid only for L2 and Hybrid -ports. -* `vxlan_ids` - (Optional) List of VXLAN IDs to attach to the port, valid only for L2 and Hybrid -ports. -* `native_vlan_id` - (Optional) UUID of a VLAN to assign as a native VLAN. It must be one of -attached VLANs (from `vlan_ids` parameter). +* `vlan_ids` - (Optional) List of VLAN UUIDs to attach to the port, valid only for L2 and Hybrid ports. +* `vxlan_ids` - (Optional) List of VXLAN IDs to attach to the port, valid only for L2 and Hybrid ports. +* `native_vlan_id` - (Optional) UUID of a VLAN to assign as a native VLAN. It must be one of attached VLANs (from `vlan_ids` parameter). * `reset_on_delete` - (Optional) Behavioral setting to reset the port to default settings (layer3 bonded mode without any vlan attached) before delete/destroy. ### Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/configuration/resources#operation-timeouts) for certain actions: -These timeout includes the time to disbond, convert to L2/L3, bond and update native vLAN. +These timeout includes the time to disbond, convert to L2/L3, bond and update native vLAN. * `create` - (Defaults to 30 mins) Used when creating the Port. * `update` - (Defaults to 30 mins) Used when updating the Port. * `delete` - (Defaults to 30 mins) Used when deleting the Port. - ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `name` - Name of the port, e.g. `bond0` or `eth0`. -* `network_type` - One of layer2-bonded, layer2-individual, layer3, hybrid and hybrid-bonded. This -attribute is only set on bond ports. +* `network_type` - One of layer2-bonded, layer2-individual, layer3, hybrid and hybrid-bonded. This attribute is only set on bond ports. * `type` - Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports. * `mac` - MAC address of the port. * `bond_id` - UUID of the bond port. diff --git a/docs/resources/equinix_metal_port_vlan_attachment.md b/docs/resources/metal_port_vlan_attachment.md similarity index 85% rename from docs/resources/equinix_metal_port_vlan_attachment.md rename to docs/resources/metal_port_vlan_attachment.md index ac60bb150..7b9330cc5 100644 --- a/docs/resources/equinix_metal_port_vlan_attachment.md +++ b/docs/resources/metal_port_vlan_attachment.md @@ -12,14 +12,14 @@ If you need this resource to add the port back to bond on removal, set `force_bo To learn more about Layer 2 networking in Equinix Metal, refer to -* -* +* https://metal.equinix.com/developers/docs/networking/layer2/ +* https://metal.equinix.com/developers/docs/networking/layer2-configs/ ## Example Usage ### Hybrid network type -```hcl +```terraform resource "equinix_metal_vlan" "test" { description = "VLAN in New York" metro = "ny" @@ -45,12 +45,11 @@ resource "equinix_metal_port_vlan_attachment" "test" { port_name = "eth1" vlan_vnid = equinix_metal_vlan.test.vxlan } - ``` ### Layer 2 network -```hcl +```terraform resource "equinix_metal_device" "test" { hostname = "test" plan = "c3.small.x86" @@ -99,12 +98,8 @@ The following arguments are supported: * `device_id` - (Required) ID of device to be assigned to the VLAN. * `port_name` - (Required) Name of network port to be assigned to the VLAN. * `vlan_vnid` - (Required) VXLAN Network Identifier. -* `force_bond` - (Optional) Add port back to the bond when this resource is removed. Default is -`false`. -* `native` - (Optional) Mark this VLAN a native VLAN on the port. This can be used only if this -assignment assigns second or further VLAN to the port. To ensure that this attachment is not first -on a port, you can use `depends_on` pointing to another `equinix_metal_port_vlan_attachment`, just -like in the layer2-individual example above. +* `force_bond` - (Optional) Add port back to the bond when this resource is removed. Default is `false`. +* `native` - (Optional) Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use `depends_on` pointing to another `equinix_metal_port_vlan_attachment`, just like in the layer2-individual example above. ## Attribute Referece diff --git a/docs/resources/equinix_metal_project.md b/docs/resources/metal_project.md similarity index 72% rename from docs/resources/equinix_metal_project.md rename to docs/resources/metal_project.md index 9d95121c0..2eaec8263 100644 --- a/docs/resources/equinix_metal_project.md +++ b/docs/resources/metal_project.md @@ -4,18 +4,15 @@ subcategory: "Metal" # equinix_metal_project (Resource) -Provides an Equinix Metal project resource to allow you manage devices -in your projects. +Provides an Equinix Metal project resource to allow you manage devices in your projects. --> **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many -`equinix_metal_project` resources will affect the rendered invoice. If you want to keep your -Equinix Metal bill simple and easy to review, please re-use your existing projects. +-> **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix_metal_project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects. ## Example Usage ### Create a new project -```hcl +```terraform resource "equinix_metal_project" "tf_project_1" { name = "Terraform Fun" } @@ -23,7 +20,7 @@ resource "equinix_metal_project" "tf_project_1" { ### Example with BGP config -```hcl +```terraform # Create a new Project resource "equinix_metal_project" "tf_project_1" { name = "tftest" @@ -37,10 +34,9 @@ resource "equinix_metal_project" "tf_project_1" { ### Enabling BGP in an existing project -If you want to enable BGP in an existing Equinix Metal project, you should first create a resource -in your TF config for the existing projects. Set your BGP configuration. +If you want to enable BGP in an existing Equinix Metal project, you should first create a resource in your TF config for the existing projects. Set your BGP configuration. -```hcl +```terraform resource "equinix_metal_project" "existing_project" { name = "The name of the project (if different, will rewrite)" bgp_config { @@ -57,32 +53,26 @@ Then, find out the UUID of the existing project, and import it to your TF state. terraform import equinix_metal_project.existing_project e188d7db-46a7-46cb-8969-e63ec22695d5 ``` -Your existing project is now loaded in your local TF state, and linked to the resource with given -name. +Your existing project is now loaded in your local TF state, and linked to the resource with given name. -After running `terraform apply`, the project will be updated with configuration provided in the TF -template. +After running `terraform apply`, the project will be updated with configuration provided in the TF template. ## Argument Reference The following arguments are supported: -* `name` - (Required) The name of the project. The maximum length is 80 characters -* `organization_id` - (Required) The UUID of organization under which you want to create the project. If you -leave it out, the project will be created under your the default organization of your account. -* `payment_method_id` - The UUID of payment method for this project. The payment method and the -project need to belong to the same organization (passed with `organization_id`, or default). +* `name` - (Required) The name of the project. The maximum length is 80 characters +* `organization_id` - (Required) The UUID of organization under which you want to create the project. If you leave it out, the project will be created under your the default organization of your account. +* `payment_method_id` - The UUID of payment method for this project. The payment method and the project need to belong to the same organization (passed with `organization_id`, or default). * `backend_transfer` - Enable or disable [Backend Transfer](https://metal.equinix.com/developers/docs/networking/backend-transfer/), default is `false`. * `bgp_config` - Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/). --> **NOTE:** Once you set the BGP config in a project, it can't be removed (due to a limitation in -the Equinix Metal API). It can be updated. +-> **NOTE:** Once you set the BGP config in a project, it can't be removed (due to a limitation in the Equinix Metal API). It can be updated. The `bgp_config` block supports: * `asn` - (Required) Autonomous System Number for local BGP deployment. -* `deployment_type` - (Required) `local` or `global`, the `local` is likely to be usable immediately, the -`global` will need to be reviewed by Equinix Metal engineers. +* `deployment_type` - (Required) `local` or `global`, the `local` is likely to be usable immediately, the `global` will need to be reviewed by Equinix Metal engineers. * `md5` - (Optional) Password for BGP session in plaintext (not a checksum). ## Attributes Reference diff --git a/docs/resources/equinix_metal_project_api_key.md b/docs/resources/metal_project_api_key.md similarity index 75% rename from docs/resources/equinix_metal_project_api_key.md rename to docs/resources/metal_project_api_key.md index 6ace18fe5..8ce968b92 100644 --- a/docs/resources/equinix_metal_project_api_key.md +++ b/docs/resources/metal_project_api_key.md @@ -4,16 +4,13 @@ subcategory: "Metal" # equinix_metal_project_api_key (Resource) -Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can -be used to create and read resources in a single project. Each API key contains a token which can -be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`). +Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can be used to create and read resources in a single project. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`). -Read-only keys only allow to list and view existing resources, read-write keys can also be used to -create resources. +Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources. ## Example Usage -```hcl +```terraform # Create a new read-only API key in existing project resource "equinix_metal_project_api_key" "test" { project_id = local.existing_project_id diff --git a/docs/resources/equinix_metal_project_ssh_key.md b/docs/resources/metal_project_ssh_key.md similarity index 93% rename from docs/resources/equinix_metal_project_ssh_key.md rename to docs/resources/metal_project_ssh_key.md index f51c5393c..a931df931 100644 --- a/docs/resources/equinix_metal_project_ssh_key.md +++ b/docs/resources/metal_project_ssh_key.md @@ -4,13 +4,11 @@ subcategory: "Metal" # equinix_metal_project_ssh_key (Resource) -Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. -Project SSH keys will only be populated onto servers that belong to that project, in contrast to -User SSH Keys. +Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys. ## Example Usage -```hcl +```terraform locals { project_id = "" } diff --git a/docs/resources/equinix_metal_reserved_ip_block.md b/docs/resources/metal_reserved_ip_block.md similarity index 81% rename from docs/resources/equinix_metal_reserved_ip_block.md rename to docs/resources/metal_reserved_ip_block.md index 609f18537..0d11544be 100644 --- a/docs/resources/equinix_metal_reserved_ip_block.md +++ b/docs/resources/metal_reserved_ip_block.md @@ -6,10 +6,7 @@ subcategory: "Metal" Provides a resource to create and manage blocks of reserved IP addresses in a project. -When a user provisions first device in a metro, Equinix Metal API automatically allocates IPv6/56 and private IPv4/25 blocks. -The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. -Every new device in the project and metro will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. -The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks. +When a user provisions first device in a metro, Equinix Metal API automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and metro will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks. Public blocks are allocated in a metro. Addresses from public blocks can only be assigned to devices in the metro. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the metro argument. @@ -23,7 +20,7 @@ See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.co Allocate reserved IP blocks: -```hcl +```terraform # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro for myproject resource "equinix_metal_reserved_ip_block" "two_elastic_addresses" { @@ -52,7 +49,7 @@ resource "equinix_metal_reserved_ip_block" "test" { Allocate a block and run a device with public IPv4 from the block -```hcl +```terraform # Allocate /31 block of max 2 public IPv4 addresses in Silicon Valley (sv) metro resource "equinix_metal_reserved_ip_block" "example" { project_id = local.project_id @@ -88,12 +85,9 @@ The following arguments are supported: * `project_id` - (Required) The metal project ID where to allocate the address block. * `quantity` - (Optional) The number of allocated `/32` addresses, a power of 2. Required when `type` is not `vrf`. -* `type` - (Optional) One of `global_ipv4`, `public_ipv4`, or `vrf`. Defaults to `public_ipv4` for backward -compatibility. -* `facility` - (**Deprecated**) Facility where to allocate the public IP address block, makes sense only -if type is `public_ipv4` and must be empty if type is `global_ipv4`. Conflicts with `metro`. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) -* `metro` - (Optional) Metro where to allocate the public IP address block, makes sense only -if type is `public_ipv4` and must be empty if type is `global_ipv4`. Conflicts with `facility`. +* `type` - (Optional) One of `global_ipv4`, `public_ipv4`, or `vrf`. Defaults to `public_ipv4` for backward compatibility. +* `facility` - (**Deprecated**) Facility where to allocate the public IP address block, makes sense only if type is `public_ipv4` and must be empty if type is `global_ipv4`. Conflicts with `metro`. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Metro where to allocate the public IP address block, makes sense only if type is `public_ipv4` and must be empty if type is `global_ipv4`. Conflicts with `facility`. * `description` - (Optional) Arbitrary description. * `tags` - (Optional) String list of tags. * `vrf_id` - (Optional) Only valid and required when `type` is `vrf`. VRF ID for type=vrf reservations. @@ -113,12 +107,10 @@ In addition to all arguments above, the following attributes are exported: * `cidr` - length of CIDR prefix of the block as integer. * `address_family` - Address family as integer. One of `4` or `6`. * `public` - Boolean flag whether addresses from a block are public. -* `global` - Boolean flag whether addresses from a block are global (i.e. can be assigned in any -metro). +* `global` - Boolean flag whether addresses from a block are global (i.e. can be assigned in any metro). * `vrf_id` - VRF ID of the block when type=vrf --> **NOTE:** Idempotent reference to a first `/32` address from a reserved block might look -like `join("/", [cidrhost(metal_reserved_ip_block.myblock.cidr_notation,0), "32"])`. +-> **NOTE:** Idempotent reference to a first `/32` address from a reserved block might look like `join("/", [cidrhost(metal_reserved_ip_block.myblock.cidr_notation,0), "32"])`. ## Import diff --git a/docs/resources/equinix_metal_spot_market_request.md b/docs/resources/metal_spot_market_request.md similarity index 72% rename from docs/resources/equinix_metal_spot_market_request.md rename to docs/resources/metal_spot_market_request.md index 222773577..db620bbae 100644 --- a/docs/resources/equinix_metal_spot_market_request.md +++ b/docs/resources/metal_spot_market_request.md @@ -4,13 +4,11 @@ subcategory: "Metal" # equinix_metal_spot_market_request (Resource) -Provides an Equinix Metal Spot Market Request resource to allow you to -manage spot market requests on your account. For more detail on Spot Market, -see [this article in Equinix Metal documentation](https://metal.equinix.com/developers/docs/deploy/spot-market/). +Provides an Equinix Metal Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see [this article in Equinix Metal documentation](https://metal.equinix.com/developers/docs/deploy/spot-market/). ## Example Usage -```hcl +```terraform # Create a spot market request resource "equinix_metal_spot_market_request" "req" { project_id = local.project_id @@ -36,16 +34,11 @@ The following arguments are supported: * `devices_min` - (Required) Miniumum number devices to be created. * `max_bid_price` - (Required) Maximum price user is willing to pay per hour per device. * `project_id` - (Required) Project ID. -* `wait_for_devices` - (Optional) On resource creation wait until all desired devices are active. -On resource destruction wait until devices are removed. +* `wait_for_devices` - (Optional) On resource creation wait until all desired devices are active. On resource destruction wait until devices are removed. * `facilities` - (**Deprecated**) Facility IDs where devices should be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) * `metro` - (Optional) Metro where devices should be created. * `locked` - (Optional) Blocks deletion of the SpotMarketRequest device until the lock is disabled. -* `instance_parameters` - (Required) Key/Value pairs of parameters for devices provisioned from -this request. Valid keys are: `billing_cycle`, `plan`, `operating_system`, `hostname`, -`termination_time`, `always_pxe`, `description`, `features`, `locked`, `project_ssh_keys`, -`user_ssh_keys`, `userdata`, `customdata`, `ipxe_script_url`, `tags`. You can find each parameter -description in [equinix_metal_device](equinix_metal_device.md) docs. +* `instance_parameters` - (Required) Key/Value pairs of parameters for devices provisioned from this request. Valid keys are: `billing_cycle`, `plan`, `operating_system`, `hostname`, `termination_time`, `always_pxe`, `description`, `features`, `locked`, `project_ssh_keys`, `user_ssh_keys`, `userdata`, `customdata`, `ipxe_script_url`, `tags`. You can find each parameter description in [equinix_metal_device](equinix_metal_device.md) docs. ## Attributes Reference @@ -57,10 +50,8 @@ In addition to all arguments above, the following attributes are exported: The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/configuration/resources#operation-timeouts) for certain actions: -* `create` - (Defaults to 60 mins) Used when creating the Spot Market Request and `wait_for_devices` -is set to `true`. -* `delete` - (Defaults to 60 mins) Used when destroying the Spot Market Request and `wait_for_devices` -is set to `true`. +* `create` - (Defaults to 60 mins) Used when creating the Spot Market Request and `wait_for_devices` is set to `true`. +* `delete` - (Defaults to 60 mins) Used when destroying the Spot Market Request and `wait_for_devices` is set to `true`. ## Import diff --git a/docs/resources/equinix_metal_ssh_key.md b/docs/resources/metal_ssh_key.md similarity index 96% rename from docs/resources/equinix_metal_ssh_key.md rename to docs/resources/metal_ssh_key.md index 33ec175e6..fcaf30251 100644 --- a/docs/resources/equinix_metal_ssh_key.md +++ b/docs/resources/metal_ssh_key.md @@ -10,7 +10,7 @@ The link between User SSH key and device is implicit. If you want to make sure t ## Example Usage -```hcl +```terraform # Create a new SSH key resource "equinix_metal_ssh_key" "key1" { name = "terraform-1" @@ -35,8 +35,7 @@ resource "equinix_metal_device" "test" { The following arguments are supported: * `name` - (Required) The name of the SSH key for identification -* `public_key` - (Required) The public key. If this is a file, it -can be read using the file interpolation function +* `public_key` - (Required) The public key. If this is a file, it can be read using the file interpolation function ## Attributes Reference diff --git a/docs/resources/equinix_metal_user_api_key.md b/docs/resources/metal_user_api_key.md similarity index 81% rename from docs/resources/equinix_metal_user_api_key.md rename to docs/resources/metal_user_api_key.md index a3d50f0fb..64964366f 100644 --- a/docs/resources/equinix_metal_user_api_key.md +++ b/docs/resources/metal_user_api_key.md @@ -4,17 +4,13 @@ subcategory: "Metal" # equinix_metal_user_api_key (Resource) -Use this resource to create Metal User API Key resources in Equinix Metal. Each API key contains a -token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header -`X-Auth-Token`). +Use this resource to create Metal User API Key resources in Equinix Metal. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`). -Read-only keys only allow to list and view existing resources, read-write keys can also be used to -create resources. +Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources. ## Example Usage -```hcl - +```terraform # Create a new read-only user API key resource "equinix_metal_user_api_key" "test" { diff --git a/docs/resources/equinix_metal_virtual_circuit.md b/docs/resources/metal_virtual_circuit.md similarity index 85% rename from docs/resources/equinix_metal_virtual_circuit.md rename to docs/resources/metal_virtual_circuit.md index c81be3f6a..839c78a7d 100644 --- a/docs/resources/equinix_metal_virtual_circuit.md +++ b/docs/resources/metal_virtual_circuit.md @@ -4,17 +4,15 @@ subcategory: "Metal" # equinix_metal_virtual_circuit (Resource) -Use this resource to associate VLAN with a Dedicated Port from -[Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#associating-a-vlan-with-a-dedicated-port). +Use this resource to associate VLAN with a Dedicated Port from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#associating-a-vlan-with-a-dedicated-port). See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. ## Example Usage -Pick an existing Project and dedicated Connection, create a VLAN and use `equinix_metal_virtual_circuit` -to associate it with a Primary Port of the Connection. +Pick an existing Project and dedicated Connection, create a VLAN and use `equinix_metal_virtual_circuit` to associate it with a Primary Port of the Connection. -```hcl +```terraform locals { project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c" conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0" @@ -53,10 +51,8 @@ The following arguments are supported: * `speed` - (Optional) Speed of the Virtual Circuit resource. * `vrf_id` - (Optional) UUID of the VRF to associate. * `peer_asn` - (Optional, required with `vrf_id`) The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF. -* `subnet` - (Optional, required with `vrf_id`) A subnet from one of the IP - blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. - * For a /31 block, it will only have two IP addresses, which will be used for - the metal_ip and customer_ip. +* `subnet` - (Optional, required with `vrf_id`) A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. + * For a /31 block, it will only have two IP addresses, which will be used for the metal_ip and customer_ip. * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. * `metal_ip` - (Optional, required with `vrf_id`) The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. * `customer_ip` - (Optional, required with `vrf_id`) The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. diff --git a/docs/resources/equinix_metal_vlan.md b/docs/resources/metal_vlan.md similarity index 89% rename from docs/resources/equinix_metal_vlan.md rename to docs/resources/metal_vlan.md index 18b2d4f8e..6c781f652 100644 --- a/docs/resources/equinix_metal_vlan.md +++ b/docs/resources/metal_vlan.md @@ -8,12 +8,12 @@ Provides a resource to allow users to manage Virtual Networks in their projects. To learn more about Layer 2 networking in Equinix Metal, refer to -* -* +* https://metal.equinix.com/developers/docs/networking/layer2/ +* https://metal.equinix.com/developers/docs/networking/layer2-configs/ ## Example Usage -```hcl +```terraform # Create a new VLAN in metro "esv" resource "equinix_metal_vlan" "vlan1" { description = "VLAN in New Jersey" diff --git a/docs/resources/equinix_metal_vrf.md b/docs/resources/metal_vrf.md similarity index 98% rename from docs/resources/equinix_metal_vrf.md rename to docs/resources/metal_vrf.md index 39394180e..92848e959 100644 --- a/docs/resources/equinix_metal_vrf.md +++ b/docs/resources/metal_vrf.md @@ -12,7 +12,7 @@ See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.co Create a VRF in your desired metro and project with any IP ranges that you want the VRF to route and forward. -```hcl +```terraform resource "equinix_metal_project" "example" { name = "example" } @@ -29,7 +29,7 @@ resource "equinix_metal_vrf" "example" { Create IP reservations and assign them to a Metal Gateway resources. The Gateway will be assigned the first address in the block. -```hcl +```terraform resource "equinix_metal_reserved_ip_block" "example" { description = "Reserved IP block (192.168.100.0/29) taken from on of the ranges in the VRF's pool of address space." project_id = equinix_metal_project.example.id @@ -55,7 +55,7 @@ resource "equinix_metal_gateway" "example" { Attach a Virtual Circuit from a Dedicated Metal Connection to the Metal Gateway. -```hcl +```terraform data "equinix_metal_connection" "example" { connection_id = var.metal_dedicated_connection_id } diff --git a/docs/resources/equinix_network_acl_template.md b/docs/resources/network_acl_template.md similarity index 73% rename from docs/resources/equinix_network_acl_template.md rename to docs/resources/network_acl_template.md index 0191ca8a9..8613d501d 100644 --- a/docs/resources/equinix_network_acl_template.md +++ b/docs/resources/network_acl_template.md @@ -4,15 +4,13 @@ subcategory: "Network Edge" # equinix_network_acl_template (Resource) -Resource `equinix_network_acl_template` allows creation and management of -Equinix Network Edge device Access Control List templates. +Resource `equinix_network_acl_template` allows creation and management of Equinix Network Edge device Access Control List templates. -Device ACL templates give possibility to define set of rules will allowed inbound -traffic. Templates can be assigned to the network devices. +Device ACL templates give possibility to define set of rules will allowed inbound traffic. Templates can be assigned to the network devices. ## Example Usage -```hcl +```terraform # Creates ACL template and assigns it to the network device resource "equinix_network_acl_template" "myacl" { name = "test" @@ -39,22 +37,18 @@ resource "equinix_network_acl_template" "myacl" { The following arguments are supported: * `name` - (Required) ACL template name. -* `project_id` - (Optional) Unique Identifier for the project resource where the acl template is scoped to.If you -leave it out, the ACL template will be created under the default project id of your organization. +* `project_id` - (Optional) Unique Identifier for the project resource where the acl template is scoped to.If you leave it out, the ACL template will be created under the default project id of your organization. * `description` - (Optional) ACL template description, up to 200 characters. * `metro_code` - (Deprecated) ACL template location metro code. -* `inbound_rule` - (Required) One or more rules to specify allowed inbound traffic. -Rules are ordered, matching traffic rule stops processing subsequent ones. +* `inbound_rule` - (Required) One or more rules to specify allowed inbound traffic. Rules are ordered, matching traffic rule stops processing subsequent ones. The `inbound_rule` block has below fields: * `subnets` - (Deprecated) Inbound traffic source IP subnets in CIDR format. * `subnet` - (Required) Inbound traffic source IP subnet in CIDR format. * `protocol` - (Required) Inbound traffic protocol. One of `IP`, `TCP`, `UDP`. -* `src_port` - (Required) Inbound traffic source ports. Allowed values are a comma separated list -of ports, e.g., `20,22,23`, port range, e.g., `1023-1040` or word `any`. -* `dst_port` - (Required) Inbound traffic destination ports. Allowed values are a comma separated -list of ports, e.g., `20,22,23`, port range, e.g., `1023-1040` or word `any`. +* `src_port` - (Required) Inbound traffic source ports. Allowed values are a comma separated list of ports, e.g., `20,22,23`, port range, e.g., `1023-1040` or word `any`. +* `dst_port` - (Required) Inbound traffic destination ports. Allowed values are a comma separated list of ports, e.g., `20,22,23`, port range, e.g., `1023-1040` or word `any`. * `description` - (Optional) Inbound rule description, up to 200 characters. ## Attributes Reference @@ -63,16 +57,14 @@ In addition to all arguments above, the following attributes are exported: * `uuid` - Unique identifier of ACL template resource. * `device_id` - (Deprecated) Identifier of a network device where template was applied. -* `device_acl_status` - Status of ACL template provisioning process, where template was applied. -One of `PROVISIONING`, `PROVISIONED`. +* `device_acl_status` - Status of ACL template provisioning process, where template was applied. One of `PROVISIONING`, `PROVISIONED`. * `device_details` - List of the devices where the ACL template is applied. The `device_details` block has below fields: * `uuid` - Device uuid. * `name` - Device name. -* `acl_status` - Device ACL provisioning status where template was applied. One of `PROVISIONING`, -`PROVISIONED`. +* `acl_status` - Device ACL provisioning status where template was applied. One of `PROVISIONING`, `PROVISIONED`. ## Import diff --git a/docs/resources/equinix_network_bgp.md b/docs/resources/network_bgp.md similarity index 82% rename from docs/resources/equinix_network_bgp.md rename to docs/resources/network_bgp.md index f5a679eed..5c5236784 100644 --- a/docs/resources/equinix_network_bgp.md +++ b/docs/resources/network_bgp.md @@ -4,12 +4,11 @@ subcategory: "Network Edge" # equinix_network_bgp (Resource) -Resource `equinix_network_bgp` allows creation and management of Equinix Network -Edge BGP peering configurations. +Resource `equinix_network_bgp` allows creation and management of Equinix Network Edge BGP peering configurations. ## Example Usage -```hcl +```terraform # Create BGP peering configuration on a existing connection # between network device and service provider @@ -27,8 +26,7 @@ resource "equinix_network_bgp" "test" { The following arguments are supported: -* `connection_id` - (Required) identifier of a connection established between. -network device and remote service provider that will be used for peering. +* `connection_id` - (Required) identifier of a connection established between. network device and remote service provider that will be used for peering. * `local_ip_address` - (Required) IP address in CIDR format of a local device. * `local_asn` - (Required) Local ASN number. * `remote_ip_address` - (Required) IP address of remote peer. @@ -40,12 +38,9 @@ network device and remote service provider that will be used for peering. In addition to all arguments above, the following attributes are exported: * `uuid` - BGP peering configuration unique identifier. -* `device_id` - unique identifier of a network device that is a local peer in a given BGP peering -configuration. -* `state` - BGP peer state, one of `Idle`, `Connect`, `Active`, `OpenSent`, `OpenConfirm`, -`Established`. -* `provisioning_status` - BGP peering configuration provisioning status, one of `PROVISIONING`, -`PENDING_UPDATE`, `PROVISIONED`, `FAILED`. +* `device_id` - unique identifier of a network device that is a local peer in a given BGP peering configuration. +* `state` - BGP peer state, one of `Idle`, `Connect`, `Active`, `OpenSent`, `OpenConfirm`, `Established`. +* `provisioning_status` - BGP peering configuration provisioning status, one of `PROVISIONING`, `PENDING_UPDATE`, `PROVISIONED`, `FAILED`. ## Import diff --git a/docs/resources/equinix_network_device.md b/docs/resources/network_device.md similarity index 77% rename from docs/resources/equinix_network_device.md rename to docs/resources/network_device.md index eb51f4549..be406f5ed 100644 --- a/docs/resources/equinix_network_device.md +++ b/docs/resources/network_device.md @@ -4,27 +4,21 @@ subcategory: "Network Edge" # equinix_network_device (Resource) -Resource `equinix_network_device` allows creation and management of Equinix Network Edge virtual -network devices. +Resource `equinix_network_device` allows creation and management of Equinix Network Edge virtual network devices. Network Edge virtual network devices can be created in two modes: -* **managed** - (default) Where Equinix manages connectivity and services in the device and -customer gets limited access to the device. -* **self-configured** - Where customer provisions and manages own services in the device with less -restricted access. Some device types are offered only in this mode. +* **managed** - (default) Where Equinix manages connectivity and services in the device and customer gets limited access to the device. +* **self-configured** - Where customer provisions and manages own services in the device with less restricted access. Some device types are offered only in this mode. In addition to management modes, there are two software license modes available: -* **subscription** - Where Equinix provides software license, including end-to-end support, and -bills for the service respectively. -* **BYOL** - [bring your own license] Where customer brings his own, already procured device -software license. There are no charges associated with such license. It is the only licensing mode -for `self-configured` devices. +* **subscription** - Where Equinix provides software license, including end-to-end support, and bills for the service respectively. +* **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices. ## Example Usage -```hcl +```terraform # Create pair of redundant, managed CSR1000V routers with license subscription # in two different metro locations @@ -62,7 +56,7 @@ resource "equinix_network_device" "csr1000v-ha" { } ``` -```hcl +```terraform # Create self configured PANW cluster with BYOL license data "equinix_network_account" "sv" { @@ -105,7 +99,7 @@ resource "equinix_network_device" "panw-cluster" { } ``` -```hcl +```terraform # Create self configured single Aviatrix device with cloud init file data "equinix_network_account" "sv" { @@ -141,7 +135,7 @@ resource "equinix_network_device" "aviatrix-single" { } ``` -```hcl +```terraform # Create self configured single Catalyst 8000V (Autonomous Mode) router with license token data "equinix_network_account" "sv" { @@ -172,7 +166,7 @@ resource "equinix_network_device" "c8kv-single" { } ``` -```hcl +```terraform # Create self configured single VSRX device with BYOL License data "equinix_network_account" "sv" { @@ -204,7 +198,7 @@ resource "equinix_network_device" "vsrx-single" { } ``` -```hcl +```terraform # Create self configured redundant Arista router with DSA key data "equinix_network_account" "sv" { @@ -249,7 +243,7 @@ resource "equinix_network_device" "arista-ha" { } ``` -```hcl +```terraform # Create self configured redundant BlueCat DNS and DHCP Server data "equinix_network_account" "sv" { name = "account-name" @@ -304,7 +298,7 @@ resource "equinix_network_device" "bluecat-bdds-ha" { } ``` -```hcl +```terraform # Create self configured redundant BlueCat Edge Service Point data "equinix_network_account" "sv" { name = "account-name" @@ -367,56 +361,34 @@ The following arguments are supported: * `version` - (Required) Device software software version. * `core_count` - (Required) Number of CPU cores used by device. (**NOTE: Use this field to resize your device. When resizing your HA devices, primary device will be upgraded first. If the upgrade failed, device will be automatically rolled back to the previous state with original core number.**) * `term_length` - (Required) Device term length. -* `self_managed` - (Optional) Boolean value that determines device management mode, i.e., -`self-managed` or `Equinix-managed` (default). -* `byol` - (Optional) Boolean value that determines device licensing mode, i.e., -`bring your own license` or `subscription` (default). -* `license_token` - (Optional, conflicts with `license_file`) License Token applicable for some device types in BYOL licensing -mode. -* `license_file` - (Optional) Path to the license file that will be uploaded and applied on a -device. Applicable for some device types in BYOL licensing mode. +* `self_managed` - (Optional) Boolean value that determines device management mode, i.e., `self-managed` or `Equinix-managed` (default). +* `byol` - (Optional) Boolean value that determines device licensing mode, i.e., `bring your own license` or `subscription` (default). +* `license_token` - (Optional, conflicts with `license_file`) License Token applicable for some device types in BYOL licensing mode. +* `license_file` - (Optional) Path to the license file that will be uploaded and applied on a device. Applicable for some device types in BYOL licensing mode. * `license_file_id` - (Optional, conflicts with `license_file`) Identifier of a license file that will be applied on the device. * `cloud_init_file_id` - (Optional) Identifier of a cloud init file that will be applied on the device. * `throughput` - (Optional) Device license throughput. * `throughput_unit` - (Optional) License throughput unit. One of `Mbps` or `Gbps`. * `account_number` - (Required) Billing account number for a device. -* `notifications` - (Required) List of email addresses that will receive device status -notifications. +* `notifications` - (Required) List of email addresses that will receive device status notifications. * `purchase_order_number` - (Optional) Purchase order number associated with a device order. * `order_reference` - (Optional) Name/number used to identify device order on the invoice. * `acl_template_id` - (Optional) Identifier of a WAN interface ACL template that will be applied on the device. -* `mgmt_acl_template_uuid` - (Optional) Identifier of an MGMT interface ACL template that will be -applied on the device. -* `additional_bandwidth` - (Optional) Additional Internet bandwidth, in Mbps, that will be -allocated to the device (in addition to default 15Mbps). -* `interface_count` - (Optional) Number of network interfaces on a device. If not specified, -default number for a given device type will be used. -* `wan_interafce_id` - (Optional) Specify the WAN/SSH interface id. If not specified, default -WAN/SSH interface for a given device type will be used. -* `vendor_configuration` - (Optional) Map of vendor specific configuration parameters for a device - (controller1, activationKey, managementType, siteId, systemIpAddress, privateAddress, privateCidrMask, privateGateway, licenseKey, licenseId) -* `ssh-key` - (Optional) Definition of SSH key that will be provisioned -on a device (max one key). See [SSH Key](#ssh-key) below for more details. -* `secondary_device` - (Optional) Definition of secondary device for redundant -device configurations. See [Secondary Device](#secondary-device) below for more details. -* `cluster_details` - (Optional) An object that has the cluster details. See -[Cluster Details](#cluster-details) below for more details. -* `connectivity` - (Optional) Device accessibility (INTERNET-ACCESS or PRIVATE or INTERNET-ACCESS-WITH-PRVT-MGMT). -If not specified, default will be INTERNET-ACCESS -* `project_id` - (Optional) Unique Identifier for the project resource where the device is scoped to.If you -leave it out, the device will be created under the default project id of your organization. -* `diverse_device_id` - (Optional) Unique ID of an existing device. -Use this field to let Equinix know if you want your new device to be in a different location from any existing virtual -device. This field is only meaningful for single devices. +* `mgmt_acl_template_uuid` - (Optional) Identifier of an MGMT interface ACL template that will be applied on the device. +* `additional_bandwidth` - (Optional) Additional Internet bandwidth, in Mbps, that will be allocated to the device (in addition to default 15Mbps). +* `interface_count` - (Optional) Number of network interfaces on a device. If not specified, default number for a given device type will be used. +* `wan_interafce_id` - (Optional) Specify the WAN/SSH interface id. If not specified, default WAN/SSH interface for a given device type will be used. +* `vendor_configuration` - (Optional) Map of vendor specific configuration parameters for a device (controller1, activationKey, managementType, siteId, systemIpAddress, privateAddress, privateCidrMask, privateGateway, licenseKey, licenseId) +* `ssh-key` - (Optional) Definition of SSH key that will be provisioned on a device (max one key). See [SSH Key](#ssh-key) below for more details. +* `secondary_device` - (Optional) Definition of secondary device for redundant device configurations. See [Secondary Device](#secondary-device) below for more details. +* `cluster_details` - (Optional) An object that has the cluster details. See [Cluster Details](#cluster-details) below for more details. +* `connectivity` - (Optional) Device accessibility (INTERNET-ACCESS or PRIVATE or INTERNET-ACCESS-WITH-PRVT-MGMT). If not specified, default will be INTERNET-ACCESS +* `project_id` - (Optional) Unique Identifier for the project resource where the device is scoped to.If you leave it out, the device will be created under the default project id of your organization. +* `diverse_device_id` - (Optional) Unique ID of an existing device. Use this field to let Equinix know if you want your new device to be in a different location from any existing virtual device. This field is only meaningful for single devices. ### Secondary Device --> **NOTE:** Network Edge provides different High Availability (HA) options. By defining a -`secondary_device` block, terraform will deploy -[Redundant Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm#:~:text=Redundant%20Devices%20(Active/Active)), -useful for customers that require two actively forwarding data planes (Active/Active) on separate -hardware stacks. See [Architecting for Resiliency](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/NE-architecting-resiliency.htm) -documentation to know more about the fault-tolerant solutions that you can achieve. +-> **NOTE:** Network Edge provides different High Availability (HA) options. By defining a `secondary_device` block, terraform will deploy [Redundant Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm#:~:text=Redundant%20Devices%20(Active/Active)), useful for customers that require two actively forwarding data planes (Active/Active) on separate hardware stacks. See [Architecting for Resiliency](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/NE-architecting-resiliency.htm) documentation to know more about the fault-tolerant solutions that you can achieve. The `secondary_device` block supports the following arguments: @@ -424,24 +396,16 @@ The `secondary_device` block supports the following arguments: * `metro_code` - (Required) Metro location of a secondary device. * `hostname` - (Optional) Secondary device hostname. * `license_token` - (Optional, conflicts with `license_file`) License Token can be provided for some device types o the device. -* `license_file` - (Optional) Path to the license file that will be uploaded and applied on a -secondary device. Applicable for some device types in BYOL licensing mode. +* `license_file` - (Optional) Path to the license file that will be uploaded and applied on a secondary device. Applicable for some device types in BYOL licensing mode. * `license_file_id` - (Optional, conflicts with `license_file`) Identifier of a license file that will be applied on a secondary device. * `cloud_init_file_id` - (Optional) Identifier of a cloud init file that will be applied on a secondary device. * `account_number` - (Required) Billing account number for secondary device. -* `notifications` - (Required) List of email addresses that will receive notifications about -secondary device. -* `additional_bandwidth` - (Optional) Additional Internet bandwidth, in Mbps, for a secondary -device. -* `vendor_configuration` - (Optional) Key/Value pairs of vendor specific configuration parameters -for a secondary device. Key values are `controller1`, `activationKey`, `managementType`, `siteId`, -`systemIpAddress`, `privateAddress`, `privateCidrMask`, `privateGateway`, `licenseKey`, `licenseId`. -* `acl_template_id` - (Optional) Identifier of a WAN interface ACL template that will be applied -on a secondary device. -* `mgmt_acl_template_uuid` - (Optional) Identifier of an MGMT interface ACL template that will be -applied on a secondary device. -* `ssh-key` - (Optional) Up to one definition of SSH key that will be provisioned on a secondary -device. +* `notifications` - (Required) List of email addresses that will receive notifications about secondary device. +* `additional_bandwidth` - (Optional) Additional Internet bandwidth, in Mbps, for a secondary device. +* `vendor_configuration` - (Optional) Key/Value pairs of vendor specific configuration parameters for a secondary device. Key values are `controller1`, `activationKey`, `managementType`, `siteId`, `systemIpAddress`, `privateAddress`, `privateCidrMask`, `privateGateway`, `licenseKey`, `licenseId`. +* `acl_template_id` - (Optional) Identifier of a WAN interface ACL template that will be applied on a secondary device. +* `mgmt_acl_template_uuid` - (Optional) Identifier of an MGMT interface ACL template that will be applied on a secondary device. +* `ssh-key` - (Optional) Up to one definition of SSH key that will be provisioned on a secondary device. ### SSH Key @@ -452,29 +416,19 @@ The `ssh_key` block supports the following arguments: ### Cluster Details --> **NOTE:** Network Edge provides different High Availability (HA) options. By defining a -`cluster_details` block, terraform will deploy a `Device Clustering`. This option, based on -vendor-specific features, allows customers to deploy more advanced resilient configurations than -`secondary_device`. See [Network Edge HA Options](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm) -documentation to know which vendors support clustered devices. -See [Architecting for Resiliency](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/NE-architecting-resiliency.htm) -documentation to know more about the fault-tolerant solutions that you can achieve. +-> **NOTE:** Network Edge provides different High Availability (HA) options. By defining a `cluster_details` block, terraform will deploy a `Device Clustering`. This option, based on vendor-specific features, allows customers to deploy more advanced resilient configurations than `secondary_device`. See [Network Edge HA Options](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm) documentation to know which vendors support clustered devices. See [Architecting for Resiliency](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/NE-architecting-resiliency.htm) documentation to know more about the fault-tolerant solutions that you can achieve. The `cluster_details` block supports the following arguments: * `cluster_name` - (Required) The name of the cluster device -* `node0` - (Required) An object that has `node0` configuration. -See [Cluster Details - Nodes](#cluster-details---nodes) below for more details. -* `node1` - (Required) An object that has `node1` configuration. -See [Cluster Details - Nodes](#cluster-details---nodes) below for more details. +* `node0` - (Required) An object that has `node0` configuration. See [Cluster Details - Nodes](#cluster-details---nodes) below for more details. +* `node1` - (Required) An object that has `node1` configuration. See [Cluster Details - Nodes](#cluster-details---nodes) below for more details. ### Cluster Details - Nodes The `node0` and `node1` blocks supports the following arguments: -* `vendor_configuration` - (Optional) An object that has fields relevant to the vendor of the -cluster device. See [Cluster Details - Nodes - Vendor Configuration](#cluster-details---nodes---vendor-configuration) -below for more details. +* `vendor_configuration` - (Optional) An object that has fields relevant to the vendor of the cluster device. See [Cluster Details - Nodes - Vendor Configuration](#cluster-details---nodes---vendor-configuration) below for more details. * `license_file_id` - (Optional) License file id. This is necessary for Fortinet and Juniper clusters. * `license_token` - (Optional) License token. This is necessary for Palo Alto clusters. @@ -483,42 +437,33 @@ below for more details. The `vendor_configuration` block supports the following arguments: * `hostname` - (Optional) Hostname. This is necessary for Palo Alto, Juniper, and Fortinet clusters. -* `admin_password` - (Optional) The administrative password of the device. You can use it to log in -to the console. This field is not available for all device types. +* `admin_password` - (Optional) The administrative password of the device. You can use it to log in to the console. This field is not available for all device types. * `controller1` - (Optional) System IP Address. Mandatory for the Fortinet SDWAN cluster device. * `activation_key` - (Optional) Activation key. This is required for Velocloud clusters. * `controller_fqdn` - (Optional) Controller fqdn. This is required for Velocloud clusters. -* `root_password` - (Optional) The CLI password of the device. This field is relevant only for the -Velocloud SDWAN cluster. +* `root_password` - (Optional) The CLI password of the device. This field is relevant only for the Velocloud SDWAN cluster. ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `uuid` - Device unique identifier. -* `status` - Device provisioning status. Possible values are - `INITIALIZING`, `PROVISIONING`, `WAITING_FOR_PRIMARY`, `WAITING_FOR_SECONDARY`, - `WAITING_FOR_REPLICA_CLUSTER_NODES`, `CLUSTER_SETUP_IN_PROGRESS`, `FAILED`, `PROVISIONED`, - `DEPROVISIONING`, `DEPROVISIONED`, `RESOURCE_UPGRADE_IN_PROGRESS`, `RESOURCE_UPGRADE_FAILED`. -* `license_status` - Device license registration status. Possible values are `APPLYING_LICENSE`, - `REGISTERED`, `APPLIED`, `WAITING_FOR_CLUSTER_SETUP`, `REGISTRATION_FAILED`. +* `status` - Device provisioning status. Possible values are `INITIALIZING`, `PROVISIONING`, `WAITING_FOR_PRIMARY`, `WAITING_FOR_SECONDARY`, `WAITING_FOR_REPLICA_CLUSTER_NODES`, `CLUSTER_SETUP_IN_PROGRESS`, `FAILED`, `PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `RESOURCE_UPGRADE_IN_PROGRESS`, `RESOURCE_UPGRADE_FAILED`. +* `license_status` - Device license registration status. Possible values are `APPLYING_LICENSE`, `REGISTERED`, `APPLIED`, `WAITING_FOR_CLUSTER_SETUP`, `REGISTRATION_FAILED`. * `license_file_id` - Unique identifier of applied license file. * `ibx` - Device location Equinix Business Exchange name. * `region` - Device location region. * `acl_template_id` - Unique identifier of applied ACL template. * `ssh_ip_address` - IP address of SSH enabled interface on the device. * `ssh_ip_fqdn` - FQDN of SSH enabled interface on the device. -* `redundancy_type` - Device redundancy type applicable for HA devices, either -primary or secondary. +* `redundancy_type` - Device redundancy type applicable for HA devices, either primary or secondary. * `redundant_id` - Unique identifier for a redundant device applicable for HA devices. -* `interface` - List of device interfaces. See [Interface Attribute](#interface-attribute) below -for more details. +* `interface` - List of device interfaces. See [Interface Attribute](#interface-attribute) below for more details. * `asn` - (Autonomous System Number) Unique identifier for a network on the internet. * `zone_code` - Device location zone code. * `cluster_id` - The ID of the cluster. * `num_of_nodes` - The number of nodes in the cluster. -* `diverse_device_name` - Name of the device with diverse device UUID. This field is returned in device details if the -device is created by passing diverse_device_id. +* `diverse_device_name` - Name of the device with diverse device UUID. This field is returned in device details if the device is created by passing diverse_device_id. ### Interface Attribute @@ -526,7 +471,7 @@ Each interface attribute has below fields: * `id` - interface identifier. * `name` - interface name. -* `status` - interface status. One of `AVAILABLE`, `RESERVED`, `ASSIGNED`. +* `status` - interface status. One of `AVAILABLE`, `RESERVED`, `ASSIGNED`. * `operational_status` - interface operational status. One of `up`, `down`. * `mac_address` - interface MAC address. * `ip_address` - interface IP address. @@ -535,8 +480,7 @@ Each interface attribute has below fields: ## Timeouts -This resource provides the following [Timeouts configuration](https://www.terraform.io/language/resources/syntax#operation-timeouts) -options: +This resource provides the following [Timeouts configuration](https://www.terraform.io/language/resources/syntax#operation-timeouts) options: * create - Default is 90 minutes * update - Default is 90 minutes diff --git a/docs/resources/equinix_network_device_link.md b/docs/resources/network_device_link.md similarity index 79% rename from docs/resources/equinix_network_device_link.md rename to docs/resources/network_device_link.md index 9b13b31c5..780d1f436 100644 --- a/docs/resources/equinix_network_device_link.md +++ b/docs/resources/network_device_link.md @@ -4,12 +4,11 @@ subcategory: "Network Edge" # equinix_network_device_link (Resource) -Resource `equinix_network_device_link` allows creation and management of Equinix -Network Edge virtual network device links. +Resource `equinix_network_device_link` allows creation and management of Equinix Network Edge virtual network device links. ## Example Usage -```hcl +```terraform # Example of device link with HA device pair # where each device is in different metro resource "equinix_network_device_link" "test" { @@ -34,7 +33,6 @@ resource "equinix_network_device_link" "test" { throughput_unit = "Mbps" } } - ``` ## Argument Reference @@ -42,18 +40,12 @@ resource "equinix_network_device_link" "test" { The following arguments are supported: * `name` - (Required) device link name. -* `subnet` - (Optional) device link subnet in CIDR format. Not required for link -between self configured devices. -* `device` - (Required) definition of one or more devices belonging to the -device link. See [Device](#device) section below for more details. -* `link` - (Deprecated) definition of one or more, inter metro, connections belonging -to the device link. See [Link](#link) section below for more details. -* `metro_link` - (Optional) definition of one or more, inter metro, connections belonging -to the device link. See [Metro Link](#Metro_Link) section below for more details. -* `redundancy_type` - (Optional) Whether the connection should be created through -Fabric's primary or secondary port. Supported values: `PRIMARY` (Default), `SECONDARY`, `HYBRID` -* `project_id` - (Optional) Unique Identifier for the project resource where the device link is scoped to.If you - leave it out, the device link will be created under the default project id of your organization. +* `subnet` - (Optional) device link subnet in CIDR format. Not required for link between self configured devices. +* `device` - (Required) definition of one or more devices belonging to the device link. See [Device](#device) section below for more details. +* `link` - (Deprecated) definition of one or more, inter metro, connections belonging to the device link. See [Link](#link) section below for more details. +* `metro_link` - (Optional) definition of one or more, inter metro, connections belonging to the device link. See [Metro Link](#Metro_Link) section below for more details. +* `redundancy_type` - (Optional) Whether the connection should be created through Fabric's primary or secondary port. Supported values: `PRIMARY` (Default), `SECONDARY`, `HYBRID` +* `project_id` - (Optional) Unique Identifier for the project resource where the device link is scoped to.If you leave it out, the device link will be created under the default project id of your organization. ### Device @@ -61,15 +53,13 @@ The `device` block supports the following arguments: * `id` - (Required) Device identifier. * `asn` - (Optional) Device ASN number. Not required for self configured devices. -* `interface_id` - (Optional) Device network interface identifier to use for device link -connection. +* `interface_id` - (Optional) Device network interface identifier to use for device link connection. ### Link The `link` block supports the following arguments: -* `account_number` - (Required) billing account number to be used for -connection charges +* `account_number` - (Required) billing account number to be used for connection charges * `throughput` - (Required) connection throughput. * `throughput_unit` - (Required) connection throughput unit (Mbps or Gbps). * `src_metro_code` - (Required) connection source metro code. @@ -81,8 +71,7 @@ connection charges The `Metro link` block supports the following arguments: -* `account_number` - (Required) billing account number to be used for -connection charges +* `account_number` - (Required) billing account number to be used for connection charges * `throughput` - (Required) connection throughput. * `throughput_unit` - (Required) connection throughput unit (Mbps or Gbps). * `metro_code` - (Required) connection metro code. @@ -92,19 +81,16 @@ connection charges In addition to all arguments above, the following attributes are exported: * `uuid` - Device link unique identifier. -* `status` - Device link provisioning status. One of `PROVISIONING`, `PROVISIONED`, -`DEPROVISIONING`, `DEPROVISIONED`, `FAILED`. +* `status` - Device link provisioning status. One of `PROVISIONING`, `PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `FAILED`. The `device` block attributes: * `ip_address` - IP address from device link subnet that was assigned to the device -* `status` - device link provisioning status on a given device. One of `PROVISIONING`, -`PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `FAILED`. +* `status` - device link provisioning status on a given device. One of `PROVISIONING`, `PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `FAILED`. ## Timeouts -This resource provides the following [Timeouts configuration](https://www.terraform.io/language/resources/syntax#operation-timeouts) -options: +This resource provides the following [Timeouts configuration](https://www.terraform.io/language/resources/syntax#operation-timeouts) options: * create - Default is 10 minutes * update - Default is 10 minutes diff --git a/docs/resources/equinix_network_file.md b/docs/resources/network_file.md similarity index 91% rename from docs/resources/equinix_network_file.md rename to docs/resources/network_file.md index 4ddb5b22d..7d3ab59f6 100644 --- a/docs/resources/equinix_network_file.md +++ b/docs/resources/network_file.md @@ -8,7 +8,7 @@ Resource `equinix_network_file` allows creation and management of Equinix Networ ## Example Usage -```hcl +```terraform variable "filepath" { default = "fileFolder/fileName.txt" } resource "equinix_network_file" "test-file" { @@ -31,10 +31,8 @@ The following arguments are supported: * `metro_code` - (Required) File upload location metro code. It should match the device location metro code. * `type_code` - (Required) Device type code. * `process_type` - (Required) File process type (LICENSE or CLOUD_INIT). -* `self_managed` - (Required) Boolean value that determines device management mode, i.e., - `self-managed` or `Equinix-managed`. -* `byol` - (Required) Boolean value that determines device licensing mode, i.e., - `bring your own license` or `subscription`. +* `self_managed` - (Required) Boolean value that determines device management mode, i.e., `self-managed` or `Equinix-managed`. +* `byol` - (Required) Boolean value that determines device licensing mode, i.e., `bring your own license` or `subscription`. ## Attributes Reference diff --git a/docs/resources/equinix_network_ssh_key.md b/docs/resources/network_ssh_key.md similarity index 89% rename from docs/resources/equinix_network_ssh_key.md rename to docs/resources/network_ssh_key.md index d570c0638..f3234969d 100644 --- a/docs/resources/equinix_network_ssh_key.md +++ b/docs/resources/network_ssh_key.md @@ -8,7 +8,7 @@ Resource `equinix_network_ssh_key` allows creation and management of Equinix Net ## Example Usage -```hcl +```terraform resource "equinix_network_ssh_key" "john" { name = "johnKent" public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX @@ -31,11 +31,9 @@ resource "equinix_network_ssh_key" "john" { The following arguments are supported: * `name` - (Required) The name of SSH key used for identification. -* `public_key` - (Required) The SSH public key. If this is a file, it can be read using the file -interpolation function. +* `public_key` - (Required) The SSH public key. If this is a file, it can be read using the file interpolation function. * `type` - (Optional) The type of SSH key: `RSA` (default) or `DSA`. -* `project_id` - (Optional) Unique Identifier for the project resource where the SSH key is scoped to.If you -leave it out, the ssh key will be created under the default project id of your organization. +* `project_id` - (Optional) Unique Identifier for the project resource where the SSH key is scoped to.If you leave it out, the ssh key will be created under the default project id of your organization. ## Attributes Reference diff --git a/docs/resources/equinix_network_ssh_user.md b/docs/resources/network_ssh_user.md similarity index 95% rename from docs/resources/equinix_network_ssh_user.md rename to docs/resources/network_ssh_user.md index 3392609dd..07fa850af 100644 --- a/docs/resources/equinix_network_ssh_user.md +++ b/docs/resources/network_ssh_user.md @@ -4,12 +4,11 @@ subcategory: "Network Edge" # equinix_network_ssh_user (Resource) -Resource `equinix_network_ssh_user` allows creation and management of Equinix Network -Edge SSH users. +Resource `equinix_network_ssh_user` allows creation and management of Equinix Network Edge SSH users. ## Example Usage -```hcl +```terraform # Create SSH user with password auth method and associate it with # two virtual network devices diff --git a/equinix/data_source_metal_device.go b/equinix/data_source_metal_device.go index 3dd90f745..d9d14d357 100644 --- a/equinix/data_source_metal_device.go +++ b/equinix/data_source_metal_device.go @@ -19,6 +19,11 @@ import ( func dataSourceMetalDevice() *schema.Resource { return &schema.Resource{ + Description: `The datasource can be used to fetch a single device. + +If you need to fetch a list of devices which meet filter criteria, you can use the [equinix_metal_devices](equinix_metal_devices.md) datasource. + +~> **Note:** All arguments including the ` + "`root_password` and `user_data`" + ` will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://developer.hashicorp.com/terraform/language/state/sensitive-data).`, ReadWithoutTimeout: dataSourceMetalDeviceRead, Schema: map[string]*schema.Schema{ "hostname": { diff --git a/equinix/provider.go b/equinix/provider.go index 7ab01fe65..7fbb03d74 100644 --- a/equinix/provider.go +++ b/equinix/provider.go @@ -25,25 +25,25 @@ func Provider() *schema.Provider { Optional: true, DefaultFunc: schema.EnvDefaultFunc(config.EndpointEnvVar, config.DefaultBaseURL), ValidateFunc: validation.IsURLWithHTTPorHTTPS, - Description: fmt.Sprintf("The Equinix API base URL to point out desired environment. Defaults to %s", config.DefaultBaseURL), + Description: fmt.Sprintf("The Equinix API base URL to point out desired environment. This argument can also be specified with the `EQUINIX_API_ENDPOINT` shell environment variable. (Defaults to `%s`)", config.DefaultBaseURL), }, "client_id": { Type: schema.TypeString, Optional: true, DefaultFunc: schema.EnvDefaultFunc(config.ClientIDEnvVar, ""), - Description: "API Consumer Key available under My Apps section in developer portal", + 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.", }, "client_secret": { Type: schema.TypeString, Optional: true, DefaultFunc: schema.EnvDefaultFunc(config.ClientSecretEnvVar, ""), - Description: "API Consumer secret available under My Apps section in developer portal", + 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.", }, "token": { Type: schema.TypeString, Optional: true, DefaultFunc: schema.EnvDefaultFunc(config.ClientTokenEnvVar, ""), - Description: "API token from the developer sandbox", + Description: "API tokens are generated from API Consumer clients using the [OAuth2 API](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#request-access-and-refresh-tokens). This argument can also be specified with the `EQUINIX_API_TOKEN` shell environment variable.", }, "auth_token": { Type: schema.TypeString, @@ -56,19 +56,19 @@ func Provider() *schema.Provider { Optional: true, DefaultFunc: schema.EnvDefaultFunc(config.ClientTimeoutEnvVar, config.DefaultTimeout), ValidateFunc: validation.IntAtLeast(1), - Description: fmt.Sprintf("The duration of time, in seconds, that the Equinix Platform API Client should wait before canceling an API request. Defaults to %d", config.DefaultTimeout), + Description: fmt.Sprintf("The duration of time, in seconds, that the Equinix Platform API Client should wait before canceling an API request. Canceled requests may still result in provisioned resources. (Defaults to `%d`)", config.DefaultTimeout), }, "response_max_page_size": { Type: schema.TypeInt, Optional: true, ValidateFunc: validation.IntAtLeast(100), - Description: "The maximum number of records in a single response for REST queries that produce paginated responses", + Description: "The maximum number of records in a single response for REST queries that produce paginated responses. (Default is client specific)", }, "max_retries": { Type: schema.TypeInt, Optional: true, Default: 10, - Description: "Maximum number of retries.", + Description: "Maximum number of retries in case of network failure.", }, "max_retry_wait_seconds": { Type: schema.TypeInt, diff --git a/equinix/resource_metal_device.go b/equinix/resource_metal_device.go index 240fe8bef..a83b30fdd 100644 --- a/equinix/resource_metal_device.go +++ b/equinix/resource_metal_device.go @@ -42,6 +42,9 @@ var ( func resourceMetalDevice() *schema.Resource { return &schema.Resource{ + Description: `Provides an Equinix Metal device resource. This can be used to create, modify, and delete devices. + +~> **NOTE:** All arguments including the ` + "`root_password` and `user_data`" + ` will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://developer.hashicorp.com/terraform/language/state/sensitive-data).`, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(30 * time.Minute), Update: schema.DefaultTimeout(30 * time.Minute), diff --git a/examples/data-sources/fabric_cloud_router/example_1.tf b/examples/data-sources/fabric_cloud_router/example_1.tf new file mode 100644 index 000000000..73f66370a --- /dev/null +++ b/examples/data-sources/fabric_cloud_router/example_1.tf @@ -0,0 +1,43 @@ +data "equinix_fabric_cloud_router" "cloud_router_data_name" { + uuid = "" +} + +output "id" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.id +} + +output "name" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.name +} + +output "account_number" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.account.0.account_number +} + +output "equinix_asn" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.equinix_asn +} + +output "metro_code" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.location.0.metro_code +} + +output "metro_name" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.location.0.metro_name +} + +output "region" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.location.0.region +} + +output "package_code" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.package.0.code +} + +output "project_id" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.project.0.project_id +} + +output "type" { + value = data.equinix_fabric_cloud_router.cloud_router_data_name.type +} diff --git a/examples/data-sources/fabric_cloud_routers/example_1.tf b/examples/data-sources/fabric_cloud_routers/example_1.tf new file mode 100644 index 000000000..b79000516 --- /dev/null +++ b/examples/data-sources/fabric_cloud_routers/example_1.tf @@ -0,0 +1,80 @@ +data "equinix_fabric_cloud_routers" "test" { + filter { + property = "/name" + operator = "=" + values = ["Test_PFCR"] + } + filter { + property = "/location/metroCode" + operator = "=" + values = ["SV"] + } + filter { + property = "/package/code" + operator = "=" + values = ["STANDARD"] + or = true + } + filter { + property = "/state" + operator = "=" + values = ["ACTIVE"] + or = true + } + pagination { + offset = 5 + limit = 3 + } + sort { + direction = "ASC" + property = "/name" + } +} + +output "number_of_returned_fcrs" { + value = length(data.equinix_fabric_cloud_routers.test.data) +} + +output "first_fcr_name" { + value = data.equinix_fabric_cloud_routers.test.data.0.name +} + +output "first_fcr_state" { + value = data.equinix_fabric_cloud_routers.test.data.0.state +} + +output "first_fcr_uuid" { + value = data.equinix_fabric_cloud_routers.test.data.0.uuid +} + +output "first_fcr_type" { + value = data.equinix_fabric_cloud_routers.test.data.0.type +} + +output "first_fcr_package_code" { + value = one(data.equinix_fabric_cloud_routers.test.data.0.package).code +} + +output "first_fcr_equinix_asn" { + value = data.equinix_fabric_cloud_routers.test.data.0.equinix_asn +} + +output "first_fcr_location_region" { + value = one(data.equinix_fabric_cloud_routers.test.data.0.location).region +} + +output "first_fcr_location_metro_name" { + value = one(data.equinix_fabric_cloud_routers.test.data.0.location).metro_name +} + +output "first_fcr_location_metro_code" { + value = one(data.equinix_fabric_cloud_routers.test.data.0.location).metro_code +} + +output "first_fcr_project_id" { + value = one(data.equinix_fabric_cloud_routers.test.data.0.project).project_id +} + +output "first_fcr_account_number" { + value = one(data.equinix_fabric_cloud_routers.test.data.0.account).account_number +} diff --git a/examples/data-sources/fabric_connection/example_1.tf b/examples/data-sources/fabric_connection/example_1.tf new file mode 100644 index 000000000..aef113cfd --- /dev/null +++ b/examples/data-sources/fabric_connection/example_1.tf @@ -0,0 +1,70 @@ +data "equinix_fabric_connection" "connection_data_name" { + uuid = "" +} + +output "id" { + value = data.equinix_fabric_connection.connection_data_name.id +} + +output "name" { + value = data.equinix_fabric_connection.connection_data_name.bandwidth +} + +output "account_number" { + value = data.equinix_fabric_connection.connection_data_name.account.0.account_number +} + +output "bandwidth" { + value = data.equinix_fabric_connection.connection_data_name.bandwidth +} + +output "project_id" { + value = data.equinix_fabric_connection.connection_data_name.project.0.project_id +} + +output "redundancy_group" { + value = data.equinix_fabric_connection.connection_data_name.redundancy.0.group +} + +output "redundancy_priority" { + value = data.equinix_fabric_connection.connection_data_name.redundancy.0.priority +} + +output "state" { + value = data.equinix_fabric_connection.connection_data_name.state +} + +output "type" { + value = data.equinix_fabric_connection.connection_data_name.type +} + +# Same for z_side just use z_side instead of a_side +output "access_point_type" { + value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.type +} + +# Same for z_side just use z_side instead of a_side +output "access_point_link_protocol_type" { + value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.link_protocol.0.type +} + +# Same for z_side just use z_side instead of a_side +output "access_point_link_protocol_vlan_tag" { + value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.link_protocol.0.vlan_tag +} + +# Same for z_side just use z_side instead of a_side +output "access_point_link_protocol_vlan_c_tag" { + value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.link_protocol.0.vlan_c_tag +} + +# Same for z_side just use z_side instead of a_side +output "access_point_link_protocol_vlan_s_tag" { + value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.link_protocol.0.vlan_s_tag +} + +# Same for z_side just use z_side instead of a_side +output "access_point_provider_connection_id" { + value = data.equinix_fabric_connection.connection_data_name.a_side.0.access_point.0.provider_connection_id +} + diff --git a/examples/data-sources/fabric_connections/example_1.tf b/examples/data-sources/fabric_connections/example_1.tf new file mode 100644 index 000000000..2f325a8c7 --- /dev/null +++ b/examples/data-sources/fabric_connections/example_1.tf @@ -0,0 +1,93 @@ +data "equinix_fabric_connections" "test" { + outer_operator = "AND" + filter { + property = "/name" + operator = "LIKE" + values = ["PNFV"] + } + filter { + property = "/aSide/accessPoint/location/metroCode" + operator = "=" + values = ["SY"] + } + filter { + group = "OR_group1" + property = "/redundancy/priority" + operator = "=" + values = ["PRIMARY"] + } + filter { + group = "OR_group1" + property = "/redundancy/priority" + operator = "=" + values = ["SECONDARY"] + } + pagination { + offset = 0 + limit = 5 + } + sort { + direction = "ASC" + property = "/name" + } +} + +output "number_of_returned_connections" { + value = length(data.equinix_fabric_connections.test.data) +} + +output "first_connection_name" { + value = data.equinix_fabric_connections.test.data.0.name +} + +output "first_connection_uuid" { + value = data.equinix_fabric_connections.test.data.0.uuid +} + +output "first_connection_bandwidth" { + value = data.equinix_fabric_connections.test.data.0.bandwidth +} + +output "first_connection_type" { + value = data.equinix_fabric_connections.test.data.0.type +} + +output "first_connection_redundancy_priority" { + value = one(data.equinix_fabric_connections.test.data.0.redundancy).priority +} + +output "first_connection_purchase_order_number" { + value = one(data.equinix_fabric_connections.test.data.0.order).purchase_order_number +} + +output "first_connection_aSide_type" { + value = one(one(data.equinix_fabric_connections.test.data.0.a_side).access_point).type +} + +output "first_connection_aSide_link_protocol_type" { + value = one(one(one(data.equinix_fabric_connections.test.data.0.a_side).access_point).link_protocol).type +} + +output "first_connection_aSide_link_protocol_vlan_tag" { + value = one(one(one(data.equinix_fabric_connections.test.data.0.a_side).access_point).link_protocol).vlan_tag +} + +output "first_connection_aSide_location_metro_code" { + value = one(one(one(data.equinix_fabric_connections.test.data.0.a_side).access_point).location).metro_code +} + +output "first_connection_zSide_type" { + value = one(one(data.equinix_fabric_connections.test.data.0.z_side).access_point).type +} + +output "first_connection_zSide_link_protocol_type" { + value = one(one(one(data.equinix_fabric_connections.test.data.0.z_side).access_point).link_protocol).type +} + +output "first_connection_zSide_link_protocol_vlan_tag" { + value = one(one(one(data.equinix_fabric_connections.test.data.0.z_side).access_point).link_protocol).vlan_tag +} + +output "first_connection_zSide_location_metro_code" { + value = one(one(one(data.equinix_fabric_connections.test.data.0.z_side).access_point).location).metro_code +} diff --git a/examples/data-sources/fabric_network/example_1.tf b/examples/data-sources/fabric_network/example_1.tf new file mode 100644 index 000000000..c45feecf7 --- /dev/null +++ b/examples/data-sources/fabric_network/example_1.tf @@ -0,0 +1,23 @@ +data "equinix_fabric_network" "network_data_name" { + uuid = "" +} + +output "id" { + value = data.equinix_fabric_network.network_data_name.id +} + +output "name" { + value = data.equinix_fabric_network.network_data_name.name +} + +output "scope" { + value = data.equinix_fabric_network.network_data_name.scope +} + +output "type" { + value = data.equinix_fabric_network.network_data_name.type +} + +output "region" { + value = data.equinix_fabric_network.network_data_name.location.0.region +} diff --git a/examples/data-sources/fabric_networks/example_1.tf b/examples/data-sources/fabric_networks/example_1.tf new file mode 100644 index 000000000..71096ab48 --- /dev/null +++ b/examples/data-sources/fabric_networks/example_1.tf @@ -0,0 +1,61 @@ +data "equinix_fabric_networks" "test" { + outer_operator = "AND" + filter { + property = "/type" + operator = "=" + values = ["IPWAN"] + } + filter { + property = "/name" + operator = "=" + values = ["Tf_Network_PFCR"] + } + filter { + group = "OR_group1" + property = "/operation/equinixStatus" + operator = "=" + values = ["PROVISIONED"] + } + filter { + group = "OR_group1" + property = "/operation/equinixStatus" + operator = "LIKE" + values = ["DEPROVISIONED"] + } + pagination { + offset = 0 + limit = 5 + } + sort { + direction = "ASC" + property = "/name" + } +} + +output "number_of_returned_networks" { + value = length(data.equinix_fabric_networks.test.data) +} + +output "first_network_name" { + value = data.equinix_fabric_networks.test.data.0.name +} + +output "first_network_connections_count" { + value = data.equinix_fabric_networks.test.data.0.connections_count +} + +output "first_network_scope" { + value = data.equinix_fabric_networks.test.data.0.scope +} + +output "first_network_type" { + value = data.equinix_fabric_networks.test.data.0.type +} + +output "first_network_location_region" { + value = one(data.equinix_fabric_networks.test.data.0.location).region +} + +output "first_network_project_id" { + value = one(data.equinix_fabric_networks.test.data.0.project).project_id +} diff --git a/examples/data-sources/fabric_port/example_1.tf b/examples/data-sources/fabric_port/example_1.tf new file mode 100644 index 000000000..b0e46d80f --- /dev/null +++ b/examples/data-sources/fabric_port/example_1.tf @@ -0,0 +1,59 @@ +data "equinix_fabric_port" "port_data_name" { + uuid = "" +} + +output "id" { + value = data.equinix_fabric_port.port_data_name.id +} + +output "name" { + value = data.equinix_fabric_port.port_data_name.name +} + +output "state" { + value = data.equinix_fabric_port.port_data_name.state +} + +output "account_name" { + value = data.equinix_fabric_port.port_data_name.account.0.account_name +} + +output "type" { + value = data.equinix_fabric_port.port_data_name.type +} + +output "bandwidth" { + value = data.equinix_fabric_port.port_data_name.bandwidth +} + +output "used_bandwidth" { + value = data.equinix_fabric_port.port_data_name.used_bandwidth +} + +output "encapsulation_type" { + value = data.equinix_fabric_port.port_data_name.encapsulation.0.type +} + +output "ibx" { + value = data.equinix_fabric_port.port_data_name.location.0.ibx +} + +output "metro_code" { + value = data.equinix_fabric_port.port_data_name.location.0.metro_code +} + +output "metro_name" { + value = data.equinix_fabric_port.port_data_name.location.0.metro_name +} + +output "region" { + value = data.equinix_fabric_port.port_data_name.location.0.region +} + +output "device_redundancy_enabled" { + value = data.equinix_fabric_port.port_data_name.device.0.redundancy.0.enabled +} + +output "device_redundancy_priority" { + value = data.equinix_fabric_port.port_data_name.device.0.redundancy.0.priority +} diff --git a/examples/data-sources/fabric_ports/example_1.tf b/examples/data-sources/fabric_ports/example_1.tf new file mode 100644 index 000000000..ef39b35f9 --- /dev/null +++ b/examples/data-sources/fabric_ports/example_1.tf @@ -0,0 +1,62 @@ +data "equinix_fabric_ports" "ports_data_name" { + filters { + name = "" + } +} + + +output "id" { + value = data.equinix_fabric_port.ports_data_name.data.0.id +} + +output "name" { + value = data.equinix_fabric_port.ports_data_name.data.0.name +} + +output "state" { + value = data.equinix_fabric_port.ports_data_name.data.0.state +} + +output "account_name" { + value = data.equinix_fabric_port.ports_data_name.data.0.account.0.account_name +} + +output "type" { + value = data.equinix_fabric_port.ports_data_name.data.0.type +} + +output "bandwidth" { + value = data.equinix_fabric_port.ports_data_name.data.0.bandwidth +} + +output "used_bandwidth" { + value = data.equinix_fabric_port.ports_data_name.data.0.used_bandwidth +} + +output "encapsulation_type" { + value = data.equinix_fabric_port.ports_data_name.data.0.encapsulation.0.type +} + +output "ibx" { + value = data.equinix_fabric_port.ports_data_name.data.0.location.0.ibx +} + +output "metro_code" { + value = data.equinix_fabric_port.ports_data_name.data.0.location.0.metro_code +} + +output "metro_name" { + value = data.equinix_fabric_port.ports_data_name.data.0.location.0.metro_name +} + +output "region" { + value = data.equinix_fabric_port.ports_data_name.data.0.location.0.region +} + +output "device_redundancy_enabled" { + value = data.equinix_fabric_port.ports_data_name.data.0.device.0.redundancy.0.enabled +} + +output "device_redundancy_priority" { + value = data.equinix_fabric_port.ports_data_name.data.0.device.0.redundancy.0.priority +} diff --git a/examples/data-sources/fabric_routing_protocol/example_1.tf b/examples/data-sources/fabric_routing_protocol/example_1.tf new file mode 100644 index 000000000..0242e85f5 --- /dev/null +++ b/examples/data-sources/fabric_routing_protocol/example_1.tf @@ -0,0 +1,52 @@ +data "equinix_fabric_routing_protocol" "routing_protocol_data_name" { + connection_uuid = "" + uuid = "" +} + +output "id" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.id +} + +output "name" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.name +} + +output "type" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.type +} + +output "direct_ipv4" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.direct_ipv4.0.equinix_iface_ip +} + +output "direct_ipv6" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.direct_ipv6.0.equinix_iface_ip +} + +output "bgp_ipv4_customer_peer_ip" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.bgp_ipv4.0.customer_peer_ip +} + +output "bgp_ipv4_equinix_peer_ip" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.bgp_ipv4.0.equinix_peer_ip +} + +output "bgp_ipv4_enabled" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.bgp_ipv4.0.enabled +} + +output "bgp_ipv6_customer_peer_ip" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.bgp_ipv6.0.customer_peer_ip +} + +output "bgp_ipv6_equinix_peer_ip" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.bgp_ipv6.0.equinix_peer_ip +} + +output "bgp_ipv6_enabled" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.bgp_ipv6.0.enabled +} + +output "customer_asn" { + value = data.equinix_fabric_routing_protocol.routing_protocol_data_name.customer_asn +} diff --git a/examples/data-sources/fabric_service_profile/example_1.tf b/examples/data-sources/fabric_service_profile/example_1.tf new file mode 100644 index 000000000..c21ebad60 --- /dev/null +++ b/examples/data-sources/fabric_service_profile/example_1.tf @@ -0,0 +1,47 @@ +data "equinix_fabric_service_profile" "service_profile_data_name" { + uuid = "" +} + +output "id" { + value = data.equinix_fabric_service_profile.service_profile_data_name.id +} + +output "name" { + value = data.equinix_fabric_service_profile.service_profile_data_name.name +} + +output "type" { + value = data.equinix_fabric_service_profile.service_profile_data_name.type +} + +output "visibility" { + value = data.equinix_fabric_service_profile.service_profile_data_name.visibility +} + +output "org_name" { + value = data.equinix_fabric_service_profile.service_profile_data_name.account.0.organization_name +} + +output "access_point_type_configs_type" { + value = data.equinix_fabric_service_profile.service_profile_data_name.access_point_type_configs.0.type +} + +output "allow_remote_connections" { + value = data.equinix_fabric_service_profile.service_profile_data_name.access_point_type_configs.0.allow_remote_connections +} + +output "supported_bandwidth_0" { + value = data.equinix_fabric_service_profile.service_profile_data_name.access_point_type_configs.0.supported_bandwidths.0 +} + +output "supported_bandwidth_1" { + value = data.equinix_fabric_service_profile.service_profile_data_name.access_point_type_configs.0.supported_bandwidths.1 +} + +output "redundandy_required" { + value = data.equinix_fabric_service_profile.service_profile_data_name.access_point_type_configs.0.connection_redundancy_required +} + +output "allow_over_subscription" { + value = data.equinix_fabric_service_profile.service_profile_data_name.access_point_type_configs.0.api_config.0.allow_over_subscription +} diff --git a/examples/data-sources/fabric_service_profiles/example_1.tf b/examples/data-sources/fabric_service_profiles/example_1.tf new file mode 100644 index 000000000..5759f57c6 --- /dev/null +++ b/examples/data-sources/fabric_service_profiles/example_1.tf @@ -0,0 +1,51 @@ +data "equinix_fabric_service_profiles" "service_profiles_data_name" { + filter { + property = "/name" + operator = "=" + values = [""] + } +} + +output "id" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.id +} + +output "name" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.name +} + +output "type" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.type +} + +output "visibility" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.visibility +} + +output "org_name" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.account.0.organization_name +} + +output "access_point_type_configs_type" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.access_point_type_configs.0.type +} + +output "allow_remote_connections" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.access_point_type_configs.0.allow_remote_connections +} + +output "supported_bandwidth_0" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.access_point_type_configs.0.supported_bandwidths.0 +} + +output "supported_bandwidth_1" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.access_point_type_configs.0.supported_bandwidths.1 +} + +output "redundandy_required" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.access_point_type_configs.0.connection_redundancy_required +} + +output "allow_over_subscription" { + value = data.equinix_fabric_service_profile.service_profiles_data_name.data.0.access_point_type_configs.0.api_config.0.allow_over_subscription +} diff --git a/examples/data-sources/metal_connection/example_1.tf b/examples/data-sources/metal_connection/example_1.tf new file mode 100644 index 000000000..3819cbcfb --- /dev/null +++ b/examples/data-sources/metal_connection/example_1.tf @@ -0,0 +1,3 @@ +data "equinix_metal_connection" "example" { + connection_id = "4347e805-eb46-4699-9eb9-5c116e6a017d" +} diff --git a/examples/data-sources/metal_device/example_1.tf b/examples/data-sources/metal_device/example_1.tf new file mode 100644 index 000000000..70737f06b --- /dev/null +++ b/examples/data-sources/metal_device/example_1.tf @@ -0,0 +1,10 @@ +# Fetch a device data by hostname and show it's ID + +data "equinix_metal_device" "test" { + project_id = local.project_id + hostname = "mydevice" +} + +output "id" { + value = data.equinix_metal_device.test.id +} diff --git a/examples/data-sources/metal_device/example_2.tf b/examples/data-sources/metal_device/example_2.tf new file mode 100644 index 000000000..f891a620d --- /dev/null +++ b/examples/data-sources/metal_device/example_2.tf @@ -0,0 +1,8 @@ +# Fetch a device data by ID and show its public IPv4 +data "equinix_metal_device" "test" { + device_id = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40" +} + +output "ipv4" { + value = data.equinix_metal_device.test.access_public_ipv4 +} diff --git a/examples/data-sources/metal_device_bgp_neighbors/example_1.tf b/examples/data-sources/metal_device_bgp_neighbors/example_1.tf new file mode 100644 index 000000000..b07a412c6 --- /dev/null +++ b/examples/data-sources/metal_device_bgp_neighbors/example_1.tf @@ -0,0 +1,9 @@ +# Get Project by name and print UUIDs of its users + +data "equinix_metal_device_bgp_neighbors" "test" { + device_id = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40" +} + +output "bgp_neighbors_listing" { + value = data.equinix_metal_device_bgp_neighbors.test.bgp_neighbors +} diff --git a/examples/data-sources/metal_devices/example_1.tf b/examples/data-sources/metal_devices/example_1.tf new file mode 100644 index 000000000..3582d2975 --- /dev/null +++ b/examples/data-sources/metal_devices/example_1.tf @@ -0,0 +1,18 @@ +# Following example will select c3.small.x86 devices which are deplyed in metro 'da' (Dallas) +# OR 'sv' (Sillicon Valley). +data "equinix_metal_devices" "example" { + project_id = local.project_id + filter { + attribute = "plan" + values = ["c3.small.x86"] + } + filter { + attribute = "metro" + values = ["da", "sv"] + } +} + +output "devices" { + organization_id = local.org_id + value = data.equinix_metal_devices.example.devices +} diff --git a/examples/data-sources/metal_devices/example_2.tf b/examples/data-sources/metal_devices/example_2.tf new file mode 100644 index 000000000..1c126aa64 --- /dev/null +++ b/examples/data-sources/metal_devices/example_2.tf @@ -0,0 +1,9 @@ +# Following example takes advantage of the `search` field in the API request, and will select devices with +# string "database" in one of the searched attributes. See `search` in argument reference. +data "equinix_metal_devices" "example" { + search = "database" +} + +output "devices" { + value = data.equinix_metal_devices.example.devices +} diff --git a/examples/data-sources/metal_facility/example_1.tf b/examples/data-sources/metal_facility/example_1.tf new file mode 100644 index 000000000..9d52998df --- /dev/null +++ b/examples/data-sources/metal_facility/example_1.tf @@ -0,0 +1,9 @@ +# Fetch a facility by code and show its ID + +data "equinix_metal_facility" "ny5" { + code = "ny5" +} + +output "id" { + value = data.equinix_metal_facility.ny5.id +} diff --git a/examples/data-sources/metal_facility/example_2.tf b/examples/data-sources/metal_facility/example_2.tf new file mode 100644 index 000000000..8ccd266b7 --- /dev/null +++ b/examples/data-sources/metal_facility/example_2.tf @@ -0,0 +1,18 @@ +# Verify that facility "dc13" has capacity for provisioning 2 c3.small.x86 + devices and 1 c3.medium.x86 device and has specified features + +data "equinix_metal_facility" "test" { + code = "dc13" + + features_required = ["backend_transfer", "global_ipv4"] + + capacity { + plan = "c3.small.x86" + quantity = 2 + } + + capacity { + plan = "c3.medium.x86" + quantity = 1 + } +} diff --git a/examples/data-sources/metal_gateway/example_1.tf b/examples/data-sources/metal_gateway/example_1.tf new file mode 100644 index 000000000..27b2fb415 --- /dev/null +++ b/examples/data-sources/metal_gateway/example_1.tf @@ -0,0 +1,11 @@ +# Create Metal Gateway for a VLAN with a private IPv4 block with 8 IP addresses + +resource "equinix_metal_vlan" "test" { + description = "test VLAN in SV" + metro = "sv" + project_id = local.project_id +} + +data "equinix_metal_gateway" "test" { + gateway_id = local.gateway_id +} diff --git a/examples/data-sources/metal_hardware_reservation/example_1.tf b/examples/data-sources/metal_hardware_reservation/example_1.tf new file mode 100644 index 000000000..389533736 --- /dev/null +++ b/examples/data-sources/metal_hardware_reservation/example_1.tf @@ -0,0 +1,9 @@ +// lookup by ID +data "equinix_metal_hardware_reservation" "example" { + id = "4347e805-eb46-4699-9eb9-5c116e6a0172" +} + +// lookup by device ID +data "equinix_metal_hardware_reservation" "example_by_device_id" { + device_id = "ff85aa58-c106-4624-8f1c-7c64554047ea" +} diff --git a/examples/data-sources/metal_ip_block_ranges/example_1.tf b/examples/data-sources/metal_ip_block_ranges/example_1.tf new file mode 100644 index 000000000..930777f8b --- /dev/null +++ b/examples/data-sources/metal_ip_block_ranges/example_1.tf @@ -0,0 +1,14 @@ +# List CIDR expressions of all the allocated IP block in you project. + +# Declare your project ID +locals { + project_id = "" +} + +data "equinix_metal_ip_block_ranges" "test" { + project_id = local.project_id +} + +output "out" { + value = data.equinix_metal_ip_block_ranges.test +} diff --git a/examples/data-sources/metal_metro/example_1.tf b/examples/data-sources/metal_metro/example_1.tf new file mode 100644 index 000000000..2c39a546a --- /dev/null +++ b/examples/data-sources/metal_metro/example_1.tf @@ -0,0 +1,9 @@ +# Fetch a metro by code and show its ID + +data "equinix_metal_metro" "sv" { + code = "sv" +} + +output "id" { + value = data.equinix_metal_metro.sv.id +} diff --git a/examples/data-sources/metal_metro/example_2.tf b/examples/data-sources/metal_metro/example_2.tf new file mode 100644 index 000000000..628303e12 --- /dev/null +++ b/examples/data-sources/metal_metro/example_2.tf @@ -0,0 +1,16 @@ +# Verify that metro "sv" has capacity for provisioning 2 c3.small.x86 + devices and 1 c3.medium.x86 device + +data "equinix_metal_metro" "test" { + code = "sv" + + capacity { + plan = "c3.small.x86" + quantity = 2 + } + + capacity { + plan = "c3.medium.x86" + quantity = 1 + } +} diff --git a/examples/data-sources/metal_operating_system/example_1.tf b/examples/data-sources/metal_operating_system/example_1.tf new file mode 100644 index 000000000..1504b3ebd --- /dev/null +++ b/examples/data-sources/metal_operating_system/example_1.tf @@ -0,0 +1,14 @@ +data "equinix_metal_operating_system" "example" { + distro = "ubuntu" + version = "20.04" + provisionable_on = "c3.medium.x86" +} + +resource "equinix_metal_device" "server" { + hostname = "tf.ubuntu" + plan = "c3.medium.x86" + metro = "ny" + operating_system = data.equinix_metal_operating_system.example.id + billing_cycle = "hourly" + project_id = local.project_id +} diff --git a/examples/data-sources/metal_organization/example_1.tf b/examples/data-sources/metal_organization/example_1.tf new file mode 100644 index 000000000..6efbbb0bb --- /dev/null +++ b/examples/data-sources/metal_organization/example_1.tf @@ -0,0 +1,8 @@ +# Fetch a organization data and show projects which belong to it +data "equinix_metal_organization" "test" { + organization_id = local.org_id +} + +output "projects_in_the_org" { + value = data.equinix_metal_organization.test.project_ids +} diff --git a/examples/data-sources/metal_plans/example_1.tf b/examples/data-sources/metal_plans/example_1.tf new file mode 100644 index 000000000..e4138f4d9 --- /dev/null +++ b/examples/data-sources/metal_plans/example_1.tf @@ -0,0 +1,21 @@ +# Following example will select device plans which are under 2.5$ per hour, are available in metro 'da' (Dallas) +# OR 'sv' (Sillicon Valley) and sort it by the hourly price ascending. +data "equinix_metal_plans" "example" { + sort { + attribute = "pricing_hour" + direction = "asc" + } + filter { + attribute = "pricing_hour" + values = [2.5] + match_by = "less_than" + } + filter { + attribute = "available_in_metros" + values = ["da", "sv"] + } +} + +output "plans" { + value = data.equinix_metal_plans.example.plans +} diff --git a/examples/data-sources/metal_plans/example_2.tf b/examples/data-sources/metal_plans/example_2.tf new file mode 100644 index 000000000..58718f982 --- /dev/null +++ b/examples/data-sources/metal_plans/example_2.tf @@ -0,0 +1,22 @@ +# Following example will select device plans with class containing string 'large', are available in metro 'da' (Dallas) +# AND 'sv' (Sillicon Valley), are elegible for spot_market deployments. +data "equinix_metal_plans" "example" { + filter { + attribute = "class" + values = ["large"] + match_by = "substring" + } + filter { + attribute = "deployment_types" + values = ["spot_market"] + } + filter { + attribute = "available_in_metros" + values = ["da", "sv"] + all = true + } +} + +output "plans" { + value = data.equinix_metal_plans.example.plans +} diff --git a/examples/data-sources/metal_plans/example_3.tf b/examples/data-sources/metal_plans/example_3.tf new file mode 100644 index 000000000..c18174a05 --- /dev/null +++ b/examples/data-sources/metal_plans/example_3.tf @@ -0,0 +1,33 @@ +# Following example will use equinix_metal_plans to select the cheapest plan available in metro 'sv' (Sillicon Valley) +data "equinix_metal_plans" "example" { + sort { + attribute = "pricing_hour" + direction = "asc" + } + filter { + attribute = "name" + values = ["c3.small.x86", "c3.medium.x86", "m3.large.x86"] + } + filter { + attribute = "available_in_metros" + values = ["sv"] + } +} + +# This equinix_metal_device will use the first returned plan and the first metro in which that plan is available +# It will ignore future changes on plan and metro +resource "equinix_metal_device" "example" { + hostname = "example" + plan = data.equinix_metal_plans.example.plans[0].name + metro = data.equinix_metal_plans.example.plans[0].available_in_metros[0] + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = var.project_id + + lifecycle { + ignore_changes = [ + plan, + metro, + ] + } +} diff --git a/examples/data-sources/metal_plans/example_4.tf b/examples/data-sources/metal_plans/example_4.tf new file mode 100644 index 000000000..d572d41f1 --- /dev/null +++ b/examples/data-sources/metal_plans/example_4.tf @@ -0,0 +1,21 @@ +# Following example uses a boolean variable that may eventually be set to you false when you update your equinix_metal_plans filter criteria because you need a device plan with a new feature. +variable "ignore_plans_metros_changes" { + type = bool + description = "If set to true, it will ignore plans or metros changes" + default = false +} + +data "equinix_metal_plans" "example" { + // new search criteria +} + +resource "equinix_metal_device" "example" { + // required device arguments + + lifecycle { + ignore_changes = var.ignore_plans_metros_changes ? [ + plan, + metro, + ] : [] + } +} diff --git a/examples/data-sources/metal_port/example_1.tf b/examples/data-sources/metal_port/example_1.tf new file mode 100644 index 000000000..abd6cbbbb --- /dev/null +++ b/examples/data-sources/metal_port/example_1.tf @@ -0,0 +1,17 @@ +locals { + project_id = "" +} + +resource "equinix_metal_device" "test" { + hostname = "tfacc-test-device-port" + plan = "c3.medium.x86" + metro = "sv" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} + +data "equinix_metal_port" "test" { + device_id = equinix_metal_device.test.id + name = "eth0" +} diff --git a/examples/data-sources/metal_precreated_ip_block/example_1.tf b/examples/data-sources/metal_precreated_ip_block/example_1.tf new file mode 100644 index 000000000..3d118fd14 --- /dev/null +++ b/examples/data-sources/metal_precreated_ip_block/example_1.tf @@ -0,0 +1,32 @@ +# Create device in your project and then assign /64 subnet from precreated block +# to the new device + +# Declare your project ID +locals { + project_id = "" +} + +resource "equinix_metal_device" "web1" { + hostname = "web1" + plan = "c3.small.x86" + metro = "sv" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id + +} + +data "equinix_metal_precreated_ip_block" "test" { + metro = "sv" + project_id = local.project_id + address_family = 6 + public = true +} + +# The precreated IPv6 blocks are /56, so to get /64, we specify 8 more bits for network. +# The cirdsubnet interpolation will pick second /64 subnet from the precreated block. + +resource "equinix_metal_ip_attachment" "from_ipv6_block" { + device_id = equinix_metal_device.web1.id + cidr_notation = cidrsubnet(data.equinix_metal_precreated_ip_block.test.cidr_notation, 8, 2) +} diff --git a/examples/data-sources/metal_project/example_1.tf b/examples/data-sources/metal_project/example_1.tf new file mode 100644 index 000000000..bd108ab5b --- /dev/null +++ b/examples/data-sources/metal_project/example_1.tf @@ -0,0 +1,8 @@ +# Get Project by name and print UUIDs of its users +data "equinix_metal_project" "tf_project_1" { + name = "Terraform Fun" +} + +output "users_of_Terraform_Fun" { + value = data.equinix_metal_project.tf_project_1.user_ids +} diff --git a/examples/data-sources/metal_project_ssh_key/example_1.tf b/examples/data-sources/metal_project_ssh_key/example_1.tf new file mode 100644 index 000000000..be7b44caa --- /dev/null +++ b/examples/data-sources/metal_project_ssh_key/example_1.tf @@ -0,0 +1,5 @@ +# Get Project SSH Key by name +data "equinix_metal_project_ssh_key" "my_key" { + search = "username@hostname" + project_id = local.project_id +} diff --git a/examples/data-sources/metal_reserved_ip_block/example_1.tf b/examples/data-sources/metal_reserved_ip_block/example_1.tf new file mode 100644 index 000000000..b05ba7956 --- /dev/null +++ b/examples/data-sources/metal_reserved_ip_block/example_1.tf @@ -0,0 +1,17 @@ +data "dns_a_record_set" "www" { + host = "www.example.com" +} + +data "equinix_metal_reserved_ip_block" "www" { + project_id = local.my_project_id + address = data.dns_a_record_set.www.addrs[0] +} + +resource "equinix_metal_device" "www" { + project_id = local.my_project_id + [...] + ip_address { + type = "public_ipv4" + reservation_ids = [data.equinix_metal_reserved_ip_block.www.id] + } +} diff --git a/examples/data-sources/metal_spot_market_price/example_1.tf b/examples/data-sources/metal_spot_market_price/example_1.tf new file mode 100644 index 000000000..1390140a4 --- /dev/null +++ b/examples/data-sources/metal_spot_market_price/example_1.tf @@ -0,0 +1,4 @@ +data "equinix_metal_spot_market_price" "example" { + metro = "sv" + plan = "c3.small.x86" +} diff --git a/examples/data-sources/metal_spot_market_request/example_1.tf b/examples/data-sources/metal_spot_market_request/example_1.tf new file mode 100644 index 000000000..ae3c84d91 --- /dev/null +++ b/examples/data-sources/metal_spot_market_request/example_1.tf @@ -0,0 +1,34 @@ +# Create a Spot Market Request, and print public IPv4 of the created devices, if any. + +resource "equinix_metal_spot_market_request" "req" { + project_id = local.project_id + max_bid_price = 0.1 + metro = "ny" + devices_min = 2 + devices_max = 2 + wait_for_devices = true + + instance_parameters { + hostname = "testspot" + billing_cycle = "hourly" + operating_system = "ubuntu_20_04" + plan = "c3.small.x86" + } +} + +data "equinix_metal_spot_market_request" "dreq" { + request_id = equinix_metal_spot_market_request.req.id +} + +output "ids" { + value = data.equinix_metal_spot_market_request.dreq.device_ids +} + +data "equinix_metal_device" "devs" { + count = length(data.equinix_metal_spot_market_request.dreq.device_ids) + device_id = data.equinix_metal_spot_market_request.dreq.device_ids[count.index] +} + +output "ips" { + value = [for d in data.equinix_metal_device.devs : d.access_public_ipv4] +} diff --git a/examples/data-sources/metal_virtual_circuit/example_1.tf b/examples/data-sources/metal_virtual_circuit/example_1.tf new file mode 100644 index 000000000..789ec46f6 --- /dev/null +++ b/examples/data-sources/metal_virtual_circuit/example_1.tf @@ -0,0 +1,8 @@ +data "equinix_metal_connection" "example_connection" { + connection_id = "4347e805-eb46-4699-9eb9-5c116e6a017d" +} + +data "equinix_metal_virtual_circuit" "example_vc" { + virtual_circuit_id = data.equinix_metal_connection.example_connection.ports[1].virtual_circuit_ids[0] +} + diff --git a/examples/data-sources/metal_vlan/example_1.tf b/examples/data-sources/metal_vlan/example_1.tf new file mode 100644 index 000000000..5de786abc --- /dev/null +++ b/examples/data-sources/metal_vlan/example_1.tf @@ -0,0 +1,9 @@ +resource "equinix_metal_vlan" "foovlan" { + project_id = local.project_id + metro = "sv" + vxlan = 5 +} + +data "equinix_metal_vlan" "dsvlan" { + vlan_id = equinix_metal_vlan.foovlan.id +} diff --git a/examples/data-sources/metal_vlan/example_2.tf b/examples/data-sources/metal_vlan/example_2.tf new file mode 100644 index 000000000..0ec8d88b3 --- /dev/null +++ b/examples/data-sources/metal_vlan/example_2.tf @@ -0,0 +1,5 @@ +data "equinix_metal_vlan" "dsvlan" { + project_id = local.project_id + vxlan = 5 + metro = "sv" +} diff --git a/examples/data-sources/metal_vrf/example_1.tf b/examples/data-sources/metal_vrf/example_1.tf new file mode 100644 index 000000000..c340735f0 --- /dev/null +++ b/examples/data-sources/metal_vrf/example_1.tf @@ -0,0 +1,3 @@ +data "equinix_metal_vrf" "example_vrf" { + vrf_id = "48630899-9ff2-4ce6-a93f-50ff4ebcdf6e" +} diff --git a/examples/data-sources/network_account/example_1.tf b/examples/data-sources/network_account/example_1.tf new file mode 100644 index 000000000..64b88ed78 --- /dev/null +++ b/examples/data-sources/network_account/example_1.tf @@ -0,0 +1,10 @@ +# Retrieve details of an account in Active status in DC metro +data "equinix_network_account" "dc" { + metro_code = "DC" + status = "Active" + project_id = "a86d7112-d740-4758-9c9c-31e66373746b" +} + +output "number" { + value = data.equinix_network_account.dc.number +} diff --git a/examples/data-sources/network_device/example_1.tf b/examples/data-sources/network_device/example_1.tf new file mode 100644 index 000000000..576d50561 --- /dev/null +++ b/examples/data-sources/network_device/example_1.tf @@ -0,0 +1,9 @@ +# Retrieve data for an existing Equinix Network Edge device with UUID "f0b5c553-cdeb-4bc3-95b8-23db9ccfd5ee" +data "equinix_network_device" "by_uuid" { + uuid = "f0b5c553-cdeb-4bc3-95b8-23db9ccfd5ee" +} + +# Retrieve data for an existing Equinix Network Edge device named "Arcus-Gateway-A1" +data "equinix_network_device" "by_name" { + name = "Arcus-Gateway-A1" +} diff --git a/examples/data-sources/network_device_platform/example_1.tf b/examples/data-sources/network_device_platform/example_1.tf new file mode 100644 index 000000000..e5ecff6d6 --- /dev/null +++ b/examples/data-sources/network_device_platform/example_1.tf @@ -0,0 +1,7 @@ +# Retrieve platform configuration of a large flavor for a CSR100V device type +# Platform has to support IPBASE software package +data "equinix_network_device_platform" "csrLarge" { + device_type = "CSR1000V" + flavor = "large" + packages = ["IPBASE"] +} diff --git a/examples/data-sources/network_device_software/example_1.tf b/examples/data-sources/network_device_software/example_1.tf new file mode 100644 index 000000000..7633c2315 --- /dev/null +++ b/examples/data-sources/network_device_software/example_1.tf @@ -0,0 +1,8 @@ +# Retrieve details for CSR1000V device software with latest path of 16.09 version +# that supports IPBASE package +data "equinix_network_device_software" "csrLatest1609" { + device_type = "CSR1000V" + version_regex = "^16.09.+" + packages = ["IPBASE"] + most_recent = true +} diff --git a/examples/data-sources/network_device_type/example_1.tf b/examples/data-sources/network_device_type/example_1.tf new file mode 100644 index 000000000..abdfa1e63 --- /dev/null +++ b/examples/data-sources/network_device_type/example_1.tf @@ -0,0 +1,7 @@ +# Retrieve device type details of a Cisco router +# Device type has to be available in DC and SV metros +data "equinix_network_device_type" "ciscoRouter" { + category = "Router" + vendor = "Cisco" + metro_codes = ["DC", "SV"] +} diff --git a/examples/example_1.tf b/examples/example_1.tf new file mode 100644 index 000000000..9d4c81c97 --- /dev/null +++ b/examples/example_1.tf @@ -0,0 +1,14 @@ +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +# Credentials for all Equinix resources +provider "equinix" { + client_id = "someEquinixAPIClientID" + client_secret = "someEquinixAPIClientSecret" + auth_token = "someEquinixMetalToken" +} diff --git a/examples/example_2.tf b/examples/example_2.tf new file mode 100644 index 000000000..adc26739b --- /dev/null +++ b/examples/example_2.tf @@ -0,0 +1,4 @@ +# Credentials for only Equinix Metal resources +provider "equinix" { + auth_token = "someEquinixMetalToken" +} diff --git a/examples/example_3.tf b/examples/example_3.tf new file mode 100644 index 000000000..2b2dc4744 --- /dev/null +++ b/examples/example_3.tf @@ -0,0 +1,3 @@ +provider "equinix" { + token = "someToken" +} diff --git a/examples/resources/fabric_cloud_router/example_1.tf b/examples/resources/fabric_cloud_router/example_1.tf new file mode 100644 index 000000000..d1dce4b66 --- /dev/null +++ b/examples/resources/fabric_cloud_router/example_1.tf @@ -0,0 +1,23 @@ +resource "equinix_fabric_cloud_router" "new_cloud_router"{ + name = "Router-SV" + type = "XF_ROUTER" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + order { + purchase_order_number = "1-323292" + } + location { + metro_code = "SV" + } + package { + code = "STANDARD" + } + project { + project_id = "776847000642406" + } + account { + account_number = "203612" + } +} diff --git a/examples/resources/fabric_connection/example_1.tf b/examples/resources/fabric_connection/example_1.tf new file mode 100644 index 000000000..a50de8401 --- /dev/null +++ b/examples/resources/fabric_connection/example_1.tf @@ -0,0 +1,40 @@ +resource "equinix_fabric_connection" "port2port" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number= "1-323292" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "QINQ" + vlan_s_tag = "1976" + + } + } + } + z_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "QINQ" + vlan_s_tag = "3711" + } + location { + metro_code= "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_10.tf b/examples/resources/fabric_connection/example_10.tf new file mode 100644 index 000000000..c8a139a4c --- /dev/null +++ b/examples/resources/fabric_connection/example_10.tf @@ -0,0 +1,39 @@ +resource "equinix_fabric_connection" "vd2azure" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "VD" + virtual_device { + type = "EDGE" + uuid = "" + } + interface { + type = "CLOUD" + id = 7 + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + peering_type = "PRIVATE" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_11.tf b/examples/resources/fabric_connection/example_11.tf new file mode 100644 index 000000000..e1df2d01a --- /dev/null +++ b/examples/resources/fabric_connection/example_11.tf @@ -0,0 +1,84 @@ +resource "equinix_fabric_connection" "vd2azure_primary" { + name = "ConnectionName" + type = "EVPL_VC" + redundancy { priority = "PRIMARY" } + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "VD" + virtual_device { + type = "EDGE" + uuid = "" + } + interface { + type = "CLOUD" + id = 7 + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + peering_type = "PRIVATE" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} + +resource "equinix_fabric_connection" "vd2azure_secondary" { + name = "ConnectionName" + type = "EVPL_VC" + redundancy { + priority = "SECONDARY" + group = one(equinix_fabric_connection.vd2azure_primary.redundancy).group + } + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "VD" + virtual_device { + type = "EDGE" + uuid = "" + } + interface { + type = "CLOUD" + id = 5 + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + peering_type = "PRIVATE" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_12.tf b/examples/resources/fabric_connection/example_12.tf new file mode 100644 index 000000000..5fd5fb769 --- /dev/null +++ b/examples/resources/fabric_connection/example_12.tf @@ -0,0 +1,28 @@ +resource "equinix_fabric_connection" "fcr2network"{ + name = "ConnectionName" + type = "IPWAN_VC" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "CLOUD_ROUTER" + router { + uuid = "" + } + } + } + z_side { + access_point { + type = "NETWORK" + network { + uuid = "" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_13.tf b/examples/resources/fabric_connection/example_13.tf new file mode 100644 index 000000000..6566ea611 --- /dev/null +++ b/examples/resources/fabric_connection/example_13.tf @@ -0,0 +1,33 @@ +resource "equinix_fabric_connection" "vd2token" { + name = "ConnectionName" + type = "EVPLAN_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "VD" + virtual_device { + type = "EDGE" + uuid = "" + } + interface { + type = "CLOUD" + id = 7 + } + } + } + z_side { + access_point { + type = "NETWORK" + network { + uuid = "" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_14.tf b/examples/resources/fabric_connection/example_14.tf new file mode 100644 index 000000000..a61d1f424 --- /dev/null +++ b/examples/resources/fabric_connection/example_14.tf @@ -0,0 +1,28 @@ +resource "equinix_fabric_connection" "epl" { + name = "ConnectionName" + type = "EPLAN_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + } + } + z_side { + access_point { + type = "NETWORK" + network { + uuid = "" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_15.tf b/examples/resources/fabric_connection/example_15.tf new file mode 100644 index 000000000..4b936b77c --- /dev/null +++ b/examples/resources/fabric_connection/example_15.tf @@ -0,0 +1,33 @@ +resource "equinix_fabric_connection" "epl" { + name = "ConnectionName" + type = "EVPLAN_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "DOT1Q" + vlan_s_tag = "1976" + + } + } + } + z_side { + access_point { + type = "NETWORK" + network { + uuid = "" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_2.tf b/examples/resources/fabric_connection/example_2.tf new file mode 100644 index 000000000..2e3fdb7ca --- /dev/null +++ b/examples/resources/fabric_connection/example_2.tf @@ -0,0 +1,45 @@ +resource "equinix_fabric_connection" "port2aws" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + bandwidth = 50 + redundancy { priority= "PRIMARY" } + order { + purchase_order_number= "1-323929" + } + a_side { + access_point { + type= "COLO" + port { + uuid = "" + } + link_protocol { + type = "QINQ" + vlan_s_tag = "2019" + vlan_c_tag = "2112" + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } + + additional_info = [ + { key = "accessKey", value = "" }, + { key = "secretKey", value = "" } + ] +} diff --git a/examples/resources/fabric_connection/example_3.tf b/examples/resources/fabric_connection/example_3.tf new file mode 100644 index 000000000..40661efe7 --- /dev/null +++ b/examples/resources/fabric_connection/example_3.tf @@ -0,0 +1,31 @@ +resource "equinix_fabric_connection" "epl" { + name = "ConnectionName" + type = "EPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + } + } + z_side { + access_point { + type = "COLO" + port { + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_4.tf b/examples/resources/fabric_connection/example_4.tf new file mode 100644 index 000000000..d191d4acb --- /dev/null +++ b/examples/resources/fabric_connection/example_4.tf @@ -0,0 +1,35 @@ +resource "equinix_fabric_connection" "access_epl_vc" { + name = "ConnectionName" + type = "ACCESS_EPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "QINQ" + vlan_s_tag = "1976" + } + } + } + z_side { + access_point { + type = "COLO" + port { + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_5.tf b/examples/resources/fabric_connection/example_5.tf new file mode 100644 index 000000000..380b3de36 --- /dev/null +++ b/examples/resources/fabric_connection/example_5.tf @@ -0,0 +1,40 @@ +resource "equinix_fabric_connection" "vd2port" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "VD" + virtual_device { + type = "EDGE" + uuid = "" + } + interface { + type = "NETWORK" + id = 7 + } + } + } + z_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "DOT1Q" + vlan_s_tag = "3711" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_6.tf b/examples/resources/fabric_connection/example_6.tf new file mode 100644 index 000000000..4459f185d --- /dev/null +++ b/examples/resources/fabric_connection/example_6.tf @@ -0,0 +1,30 @@ +resource "equinix_fabric_connection" "vd2token" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "VD" + virtual_device { + type = "EDGE" + uuid = "" + } + interface { + type = "NETWORK" + id = 7 + } + } + } + z_side { + service_token { + uuid = "" + } + } +} diff --git a/examples/resources/fabric_connection/example_7.tf b/examples/resources/fabric_connection/example_7.tf new file mode 100644 index 000000000..169328c71 --- /dev/null +++ b/examples/resources/fabric_connection/example_7.tf @@ -0,0 +1,31 @@ +resource "equinix_fabric_connection" "token2aws" { + name = "ConnectionName" + type = "EVPL_VC" + notifications { + type = "ALL" + emails = ["example@equinix.com", "test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + service_token { + uuid = "" + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_8.tf b/examples/resources/fabric_connection/example_8.tf new file mode 100644 index 000000000..4d4735ce9 --- /dev/null +++ b/examples/resources/fabric_connection/example_8.tf @@ -0,0 +1,35 @@ +resource "equinix_fabric_connection" "fcr2port"{ + name = "ConnectionName" + type = "IP_VC" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "CLOUD_ROUTER" + router { + uuid = "" + } + } + } + z_side { + access_point { + type = "COLO" + port { + uuid = "" + } + link_protocol { + type = "DOT1Q" + vlan_tag = "2711" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_connection/example_9.tf b/examples/resources/fabric_connection/example_9.tf new file mode 100644 index 000000000..14ce9c86c --- /dev/null +++ b/examples/resources/fabric_connection/example_9.tf @@ -0,0 +1,34 @@ +resource "equinix_fabric_connection" "fcr2azure"{ + name = "ConnectionName" + type = "IP_VC" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + bandwidth = 50 + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "CLOUD_ROUTER" + router { + uuid = "" + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + peering_type = "PRIVATE" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } +} diff --git a/examples/resources/fabric_network/example_1.tf b/examples/resources/fabric_network/example_1.tf new file mode 100644 index 000000000..fde272fc5 --- /dev/null +++ b/examples/resources/fabric_network/example_1.tf @@ -0,0 +1,12 @@ +resource "equinix_fabric_network" "new_network" { + name = "Network-SV" + type = "EVPLAN" + scope = "GLOBAL" + notifications { + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + project { + project_id = "776847000642406" + } +} diff --git a/examples/resources/fabric_routing_protocol/example_1.tf b/examples/resources/fabric_routing_protocol/example_1.tf new file mode 100644 index 000000000..fc282e3c0 --- /dev/null +++ b/examples/resources/fabric_routing_protocol/example_1.tf @@ -0,0 +1,11 @@ +resource "equinix_fabric_routing_protocol" "direct"{ + connection_uuid = + type = "DIRECT" + name = "direct_rp" + direct_ipv4 { + equinix_iface_ip = "190.1.1.1/30" + } + direct_ipv6{ + equinix_iface_ip = "190::1:1/126" + } +} diff --git a/examples/resources/fabric_routing_protocol/example_2.tf b/examples/resources/fabric_routing_protocol/example_2.tf new file mode 100644 index 000000000..946f45a20 --- /dev/null +++ b/examples/resources/fabric_routing_protocol/example_2.tf @@ -0,0 +1,14 @@ +resource "equinix_fabric_routing_protocol" "bgp" { + connection_uuid = + type = "BGP" + name = "bgp_rp" + bgp_ipv4 { + customer_peer_ip = "190.1.1.2" + enabled = true + } + bgp_ipv6 { + customer_peer_ip = "190::1:2" + enabled = true + } + customer_asn = 4532 +} diff --git a/examples/resources/fabric_routing_protocol/example_3.tf b/examples/resources/fabric_routing_protocol/example_3.tf new file mode 100644 index 000000000..0744a4a73 --- /dev/null +++ b/examples/resources/fabric_routing_protocol/example_3.tf @@ -0,0 +1,29 @@ +resource "equinix_fabric_routing_protocol" "direct"{ + connection_uuid = + type = "DIRECT" + name = "direct_rp" + direct_ipv4 { + equinix_iface_ip = "190.1.1.1/30" + } + direct_ipv6{ + equinix_iface_ip = "190::1:1/126" + } +} + +resource "equinix_fabric_routing_protocol" "bgp" { + depends_on = [ + equinix_fabric_routing_protocol.direct + ] + connection_uuid = + type = "BGP" + name = "bgp_rp" + bgp_ipv4 { + customer_peer_ip = "190.1.1.2" + enabled = true + } + bgp_ipv6 { + customer_peer_ip = "190::1:2" + enabled = true + } + customer_asn = 4532 +} diff --git a/examples/resources/fabric_service_profile/example_1.tf b/examples/resources/fabric_service_profile/example_1.tf new file mode 100644 index 000000000..e79d20788 --- /dev/null +++ b/examples/resources/fabric_service_profile/example_1.tf @@ -0,0 +1,30 @@ +resource "equinix_fabric_service_profile" "new_service_profile" { + description = "Service Profile for Receiving Connections" + name = "Name Of Business + Use Case Tag" + type = "L2_PROFILE" + visibility = "PUBLIC" + notifications = [ + { + emails = ["someone@sample.com"] + type = "BANDWIDTH_ALERT" + } + ] + allowed_emails = ["test@equinix.com", "testagain@equinix.com"] + ports = [ + { + uuid = "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee" + type = "XF_PORT" + } + ] + + access_point_type_configs { + type = "COLO" + allow_remote_connections = true + allow_custom_bandwidth = true + allow_bandwidth_auto_approval = false + connection_redundancy_required = false + connection_label = "Service Profile Tag1" + bandwidth_alert_threshold = 10 + supported_bandwidths = [ 100, 500 ] + } +} diff --git a/examples/resources/metal_bgp_session/example_1.tf b/examples/resources/metal_bgp_session/example_1.tf new file mode 100644 index 000000000..ebb10f567 --- /dev/null +++ b/examples/resources/metal_bgp_session/example_1.tf @@ -0,0 +1,127 @@ +locals { + bgp_password = "955dB0b81Ef" + project_id = "" +} + +# you need to enable BGP config for the project. If you decide to create new +# project, you can use the bgp_config section to enable BGP. +# resource "equinix_metal_project" "test" { +# name = "testpro" +# bgp_config { +# deployment_type = "local" +# md5 = local.bgp_password +# asn = 65000 +# } +# } + +resource "equinix_metal_reserved_ip_block" "addr" { + project_id = local.project_id + metro = "ny" + quantity = 1 +} + +resource "equinix_metal_device" "test" { + hostname = "terraform-test-bgp-sesh" + plan = "c3.small.x86" + metro = ["ny"] + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} + +resource "equinix_metal_bgp_session" "test" { + device_id = equinix_metal_device.test.id + address_family = "ipv4" +} + + +data "template_file" "interface_lo0" { + template = <> /etc/network/interfaces", + "ifup lo:0", + "service bird restart", + ] + } +} diff --git a/examples/resources/metal_connection/example_1.tf b/examples/resources/metal_connection/example_1.tf new file mode 100644 index 000000000..03b8a40a2 --- /dev/null +++ b/examples/resources/metal_connection/example_1.tf @@ -0,0 +1,31 @@ +resource "equinix_metal_connection" "example" { + name = "tf-metal-to-azure" + project_id = local.project_id + type = "shared" + redundancy = "redundant" + metro = "sv" + speed = "1000Mbps" + service_token_type = "a_side" + contact_email = "username@example.com" +} + +data "equinix_fabric_sellerprofile" "example" { + name = "Azure ExpressRoute" + organization_global_name = "Microsoft" +} + +resource "equinix_fabric_connection" "example" { + name = "tf-metal-to-azure" + profile_uuid = data.equinix_fabric_sellerprofile.example.uuid + speed = azurerm_express_route_circuit.example.bandwidth_in_mbps + speed_unit = "MB" + notifications = ["example@equinix.com"] + service_token = equinix_metal_connection.example.service_tokens.0.id + seller_metro_code = "AM" + authorization_key = azurerm_express_route_circuit.example.service_key + named_tag = "PRIVATE" + secondary_connection { + name = "tf-metal-to-azure-sec" + service_token = equinix_metal_connection.example.service_tokens.1.id + } +} diff --git a/examples/resources/metal_connection/example_2.tf b/examples/resources/metal_connection/example_2.tf new file mode 100644 index 000000000..c31ae1ef5 --- /dev/null +++ b/examples/resources/metal_connection/example_2.tf @@ -0,0 +1,32 @@ +resource "equinix_metal_vlan" "example" { + project_id = local.my_project_id + metro = "FR" +} + +resource "equinix_metal_connection" "example" { + name = "tf-port-to-metal" + project_id = local.project_id + type = "shared" + redundancy = "primary" + metro = "FR" + speed = "200Mbps" + service_token_type = "z_side" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example.vxlan + ] +} + +data "equinix_fabric_port" "example" { + name = "CX-FR5-NL-Dot1q-BO-1G-PRI" +} + +resource "equinix_fabric_connection" "example" { + name = "tf-port-to-metal" + zside_service_token = equinix_metal_connection.example.service_tokens.0.id + speed = "200" + speed_unit = "MB" + notifications = ["example@equinix.com"] + port_uuid = data.equinix_fabric_port.example.id + vlan_stag = 1020 +} diff --git a/examples/resources/metal_connection/example_3.tf b/examples/resources/metal_connection/example_3.tf new file mode 100644 index 000000000..40c76ca6c --- /dev/null +++ b/examples/resources/metal_connection/example_3.tf @@ -0,0 +1,36 @@ +resource "equinix_metal_vlan" "example1" { + project_id = local.my_project_id + metro = "SV" +} + +resource "equinix_metal_vlan" "example2" { + project_id = local.my_project_id + metro = "SV" +} + +resource "equinix_metal_connection" "example" { + name = "tf-port-to-metal-legacy" + project_id = local.my_project_id + metro = "SV" + redundancy = "redundant" + type = "shared" + contact_email = "username@example.com" + vlans = [ + equinix_metal_vlan.example1.vxlan, + equinix_metal_vlan.example2.vxlan + ] +} + +data "equinix_fabric_port" "example" { + name = "CX-FR5-NL-Dot1q-BO-1G-PRI" +} + +resource "equinix_fabric_connection" "example" { + name = "tf-port-to-metal-legacy" + speed = "200" + speed_unit = "MB" + notifications = ["example@equinix.com"] + port_uuid = data.equinix_fabric_port.example.id + vlan_stag = 1020 + authorization_key = equinix_metal_connection.example.token +} diff --git a/examples/resources/metal_device/example_1.tf b/examples/resources/metal_device/example_1.tf new file mode 100644 index 000000000..79c9fbb97 --- /dev/null +++ b/examples/resources/metal_device/example_1.tf @@ -0,0 +1,8 @@ +resource "equinix_metal_device" "web1" { + hostname = "tf.coreos2" + plan = "c3.small.x86" + metro = "sv" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} diff --git a/examples/resources/metal_device/example_2.tf b/examples/resources/metal_device/example_2.tf new file mode 100644 index 000000000..06829cf52 --- /dev/null +++ b/examples/resources/metal_device/example_2.tf @@ -0,0 +1,11 @@ +resource "equinix_metal_device" "pxe1" { + hostname = "tf.coreos2-pxe" + plan = "c3.small.x86" + metro = "sv" + operating_system = "custom_ipxe" + billing_cycle = "hourly" + project_id = local.project_id + ipxe_script_url = "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-metal.ipxe" + always_pxe = "false" + user_data = data.ignition_config.example.rendered +} diff --git a/examples/resources/metal_device/example_3.tf b/examples/resources/metal_device/example_3.tf new file mode 100644 index 000000000..cce3187b1 --- /dev/null +++ b/examples/resources/metal_device/example_3.tf @@ -0,0 +1,12 @@ +resource "equinix_metal_device" "web1" { + hostname = "tf.coreos2" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id + ip_address { + type = "private_ipv4" + cidr = 30 + } +} diff --git a/examples/resources/metal_device/example_4.tf b/examples/resources/metal_device/example_4.tf new file mode 100644 index 000000000..3fe0ce106 --- /dev/null +++ b/examples/resources/metal_device/example_4.tf @@ -0,0 +1,64 @@ +resource "equinix_metal_device" "web1" { + hostname = "tftest" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id + hardware_reservation_id = "next-available" + storage = < 0 ? equinix_network_device.test.asn : 22111 + interface_id = 6 + } + device { + id = equinix_network_device.test.secondary_device[0].uuid + asn = equinix_network_device.test.secondary_device[0].asn > 0 ? equinix_network_device.test.secondary_device[0].asn : 22333 + interface_id = 7 + } + link { + account_number = equinix_network_device.test.account_number + src_metro_code = equinix_network_device.test.metro_code + dst_metro_code = equinix_network_device.test.secondary_device[0].metro_code + throughput = "50" + throughput_unit = "Mbps" + } +} + diff --git a/examples/resources/network_file/example_1.tf b/examples/resources/network_file/example_1.tf new file mode 100644 index 000000000..36ab1ae2a --- /dev/null +++ b/examples/resources/network_file/example_1.tf @@ -0,0 +1,11 @@ +variable "filepath" { default = "fileFolder/fileName.txt" } + +resource "equinix_network_file" "test-file" { + file_name = "fileName.txt" + content = file("${path.module}/${var.filepath}") + metro_code = "SV" + device_type_code = "AVIATRIX_EDGE" + process_type = "CLOUD_INIT" + self_managed = true + byol = true +} diff --git a/examples/resources/network_ssh_key/example_1.tf b/examples/resources/network_ssh_key/example_1.tf new file mode 100644 index 000000000..7e0d6237d --- /dev/null +++ b/examples/resources/network_ssh_key/example_1.tf @@ -0,0 +1,15 @@ +resource "equinix_network_ssh_key" "john" { + name = "johnKent" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX + 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu + iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS + qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl + mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N + w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM + 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 + SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW + WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F + jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com" + type = "RSA" + project_id = "a86d7112-d740-4758-9c9c-31e66373746b" +} diff --git a/examples/resources/network_ssh_user/example_1.tf b/examples/resources/network_ssh_user/example_1.tf new file mode 100644 index 000000000..954af5d4c --- /dev/null +++ b/examples/resources/network_ssh_user/example_1.tf @@ -0,0 +1,11 @@ +# Create SSH user with password auth method and associate it with +# two virtual network devices + +resource "equinix_network_ssh_user" "john" { + username = "john" + password = "secret" + device_ids = [ + equinix_network_device.csr1000v-ha.uuid, + equinix_network_device.csr1000v-ha.redundant_uuid + ] +} diff --git a/internal/provider/provider.go b/internal/provider/provider.go index a9e8d4f86..4e0d18653 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -51,22 +51,22 @@ func (p *FrameworkProvider) Schema( Attributes: map[string]schema.Attribute{ "endpoint": schema.StringAttribute{ Optional: true, - Description: "The Equinix API base URL to point out desired environment. Defaults to " + config.DefaultBaseURL, + Description: fmt.Sprintf("The Equinix API base URL to point out desired environment. This argument can also be specified with the `EQUINIX_API_ENDPOINT` shell environment variable. (Defaults to `%s`)", config.DefaultBaseURL), Validators: []validator.String{ equinix_validation.URLWithScheme("http", "https"), }, }, "client_id": schema.StringAttribute{ Optional: true, - Description: "API Consumer Key available under My Apps section in developer portal", + 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.", }, "client_secret": schema.StringAttribute{ Optional: true, - Description: "API Consumer secret available under My Apps section in developer portal", + 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.", }, "token": schema.StringAttribute{ Optional: true, - Description: "API token from the developer sandbox", + Description: "API tokens are generated from API Consumer clients using the [OAuth2 API](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#request-access-and-refresh-tokens). This argument can also be specified with the `EQUINIX_API_TOKEN` shell environment variable.", }, "auth_token": schema.StringAttribute{ Optional: true, @@ -74,21 +74,21 @@ func (p *FrameworkProvider) Schema( }, "request_timeout": schema.Int64Attribute{ Optional: true, - Description: fmt.Sprintf("The duration of time, in seconds, that the Equinix Platform API Client should wait before canceling an API request. Defaults to %d", config.DefaultTimeout), + Description: fmt.Sprintf("The duration of time, in seconds, that the Equinix Platform API Client should wait before canceling an API request. Canceled requests may still result in provisioned resources. (Defaults to `%d`)", config.DefaultTimeout), Validators: []validator.Int64{ int64validator.AtLeast(1), }, }, "response_max_page_size": schema.Int64Attribute{ Optional: true, - Description: "The maximum number of records in a single response for REST queries that produce paginated responses", + Description: "The maximum number of records in a single response for REST queries that produce paginated responses. (Default is client specific)", Validators: []validator.Int64{ int64validator.AtLeast(100), }, }, "max_retries": schema.Int64Attribute{ Optional: true, - Description: "Maximum number of retries.", + Description: "Maximum number of retries in case of network failure.", }, "max_retry_wait_seconds": schema.Int64Attribute{ Optional: true, diff --git a/main.go b/main.go index 7dcbf01a0..b9828711f 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" ) -//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs --rendered-provider-name=Equinix func main() { ctx := context.Background() diff --git a/templates/data-sources.md.tmpl b/templates/data-sources.md.tmpl new file mode 100644 index 000000000..673398b5d --- /dev/null +++ b/templates/data-sources.md.tmpl @@ -0,0 +1,19 @@ +--- +{{ if eq (index (split .Name "_") 1) "network" -}} +subcategory: "Network Edge" +{{- else -}} +subcategory: "{{ title (index (split .Name "_") 1) }}" +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +{{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/fabric_cloud_router.md.tmpl b/templates/data-sources/fabric_cloud_router.md.tmpl new file mode 100644 index 000000000..f5d40e50c --- /dev/null +++ b/templates/data-sources/fabric_cloud_router.md.tmpl @@ -0,0 +1,129 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_cloud_router Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch Fabric Cloud Router for a given UUID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_clouder_router (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Fabric Cloud Router for a given UUID + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers + +## Example Usage + +{{tffile "examples/data-sources/fabric_cloud_router/example_1.tf"}} + + + +## Schema + +### Required + +- `uuid` (String) Equinix-assigned Fabric Cloud Router identifier + +### Read-Only + +- `account` (Set of Object) Customer account information that is associated with this Fabric Cloud Router (see [below for nested schema](#nestedatt--account)) +- `bgp_ipv4_routes_count` (Number) Number of IPv4 BGP routes in use (including non-distinct prefixes) +- `bgp_ipv6_routes_count` (Number) Number of IPv6 BGP routes in use (including non-distinct prefixes) +- `change_log` (Set of Object) Captures Fabric Cloud Router lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `connections_count` (Number) Number of connections associated with this Fabric Cloud Router instance +- `description` (String) Customer-provided Fabric Cloud Router description +- `distinct_ipv4_prefixes_count` (Number) Number of distinct IPv4 routes +- `distinct_ipv6_prefixes_count` (Number) Number of distinct IPv6 routes +- `equinix_asn` (Number) Equinix ASN +- `href` (String) Fabric Cloud Router URI information +- `id` (String) The ID of this resource. +- `location` (Set of Object) Fabric Cloud Router location (see [below for nested schema](#nestedatt--location)) +- `name` (String) Fabric Cloud Router name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `notifications` (List of Object) Preferences for notifications on Fabric Cloud Router configuration or status changes (see [below for nested schema](#nestedatt--notifications)) +- `order` (Set of Object) Order information related to this Fabric Cloud Router (see [below for nested schema](#nestedatt--order)) +- `package` (Set of Object) Fabric Cloud Router Package Type (see [below for nested schema](#nestedatt--package)) +- `project` (Set of Object) Customer resource hierarchy project information.Applicable to customers onboarded to Equinix Identity and Access Management. For more information see Identity and Access Management: Projects (see [below for nested schema](#nestedatt--project)) +- `state` (String) Fabric Cloud Router overall state +- `type` (String) Defines the FCR type like; XF_ROUTER + + + +### Nested Schema for `account` + +Read-Only: + +- `account_number` (Number) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `order` + +Read-Only: + +- `billing_tier` (String) +- `order_id` (String) +- `order_number` (String) +- `purchase_order_number` (String) + + + +### Nested Schema for `package` + +Read-Only: + +- `code` (String) + + + +### Nested Schema for `project` + +Read-Only: + +- `href` (String) +- `project_id` (String) diff --git a/templates/data-sources/fabric_cloud_routers.md.tmpl b/templates/data-sources/fabric_cloud_routers.md.tmpl new file mode 100644 index 000000000..d3ade230d --- /dev/null +++ b/templates/data-sources/fabric_cloud_routers.md.tmpl @@ -0,0 +1,175 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_cloud_routers Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch Fabric Cloud Routers matching custom search criteria +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_cloud_routers (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Fabric Cloud Routers matching custom search criteria + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers + +## Example Usage + +{{tffile "examples/data-sources/fabric_cloud_routers/example_1.tf"}} + + + +## Schema + +### Required + +- `filter` (Block List, Min: 1, Max: 10) Filters for the Data Source Search Request. Maximum of 8 total filters. (see [below for nested schema](#nestedblock--filter)) + +### Optional + +- `pagination` (Block Set, Max: 1) Pagination details for the Data Source Search Request (see [below for nested schema](#nestedblock--pagination)) +- `sort` (Block List) Filters for the Data Source Search Request (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `data` (List of Object) List of Cloud Routers (see [below for nested schema](#nestedatt--data)) +- `id` (String) The ID of this resource. + + + +### Nested Schema for `filter` + +Required: + +- `operator` (String) Possible operators to use on the filter property. Can be one of the following: [= - equal, != - not equal, > - greater than, >= - greater than or equal to, < - less than, <= - less than or equal to, [NOT] BETWEEN - (not) between, [NOT] LIKE - (not) like, [NOT] IN - (not) in +- `property` (String) The API response property which you want to filter your request on. Can be one of the following: "/project/projectId", "/name", "/uuid", "/state", "/location/metroCode", "/location/metroName", "/package/code", "/*" +- `values` (List of String) The values that you want to apply the property+operator combination to in order to filter your data search + +Optional: + +- `or` (Boolean) Boolean flag indicating whether this filter is included in the OR group. There can only be one OR group and it can have a maximum of 3 filters. The OR group only counts as 1 of the 8 possible filters + + + +### Nested Schema for `pagination` + +Optional: + +- `limit` (Number) Number of elements to be requested per page. Number must be between 1 and 100. Default is 20 +- `offset` (Number) The page offset for the pagination request. Index of the first element. Default is 0. + + + +### Nested Schema for `sort` + +Optional: + +- `direction` (String) The sorting direction. Can be one of: [DESC, ASC], Defaults to DESC +- `property` (String) The property name to use in sorting. Can be one of the following: [/name, /uuid, /state, /location/metroCode, /location/metroName, /package/code, /changeLog/createdDateTime, /changeLog/updatedDateTime], Defaults to /changeLog/updatedDateTime + + + +### Nested Schema for `data` + +Read-Only: + +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--data--account)) +- `bgp_ipv4_routes_count` (Number) +- `bgp_ipv6_routes_count` (Number) +- `change_log` (Set of Object) (see [below for nested schema](#nestedobjatt--data--change_log)) +- `connections_count` (Number) +- `description` (String) +- `distinct_ipv4_prefixes_count` (Number) +- `distinct_ipv6_prefixes_count` (Number) +- `equinix_asn` (Number) +- `href` (String) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--location)) +- `name` (String) +- `notifications` (List of Object) (see [below for nested schema](#nestedobjatt--data--notifications)) +- `order` (Set of Object) (see [below for nested schema](#nestedobjatt--data--order)) +- `package` (Set of Object) (see [below for nested schema](#nestedobjatt--data--package)) +- `project` (Set of Object) (see [below for nested schema](#nestedobjatt--data--project)) +- `state` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.account` + +Read-Only: + +- `account_number` (Number) + + + +### Nested Schema for `data.change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `data.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `data.notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `data.order` + +Read-Only: + +- `billing_tier` (String) +- `order_id` (String) +- `order_number` (String) +- `purchase_order_number` (String) + + + +### Nested Schema for `data.package` + +Read-Only: + +- `code` (String) + + + +### Nested Schema for `data.project` + +Read-Only: + +- `href` (String) +- `project_id` (String) diff --git a/templates/data-sources/fabric_connection.md.tmpl b/templates/data-sources/fabric_connection.md.tmpl new file mode 100644 index 000000000..91febc4dc --- /dev/null +++ b/templates/data-sources/fabric_connection.md.tmpl @@ -0,0 +1,518 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_connection Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch connection for a given UUID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_connection (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch connection for a given UUID + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections + +## Example Usage + +{{tffile "examples/data-sources/fabric_connection/example_1.tf"}} + + + +## Schema + +### Required + +- `uuid` (String) Equinix-assigned connection identifier + +### Read-Only + +- `a_side` (Set of Object) Requester or Customer side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedatt--a_side)) +- `account` (Set of Object) Customer account information that is associated with this connection (see [below for nested schema](#nestedatt--account)) +- `additional_info` (List of Map of String) Connection additional information +- `bandwidth` (Number) Connection bandwidth in Mbps +- `change_log` (Set of Object) Captures connection lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `description` (String) Customer-provided connection description +- `direction` (String) Connection directionality from the requester point of view +- `href` (String) Connection URI information +- `id` (String) The ID of this resource. +- `is_remote` (Boolean) Connection property derived from access point locations +- `name` (String) Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `notifications` (List of Object) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedatt--notifications)) +- `operation` (Set of Object) Connection type-specific operational data (see [below for nested schema](#nestedatt--operation)) +- `order` (Set of Object) Order details (see [below for nested schema](#nestedatt--order)) +- `project` (Set of Object) Project information (see [below for nested schema](#nestedatt--project)) +- `redundancy` (Set of Object) Connection Redundancy Configuration (see [below for nested schema](#nestedatt--redundancy)) +- `state` (String) Connection overall state +- `type` (String) Defines the connection type like EVPL_VC, EPL_VC, IPWAN_VC, IP_VC, ACCESS_EPL_VC, EVPLAN_VC, EPLAN_VC, EIA_VC, EC_VC +- `z_side` (Set of Object) Destination or Provider side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedatt--z_side)) + + + +### Nested Schema for `a_side` + +Read-Only: + +- `access_point` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point)) +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--a_side--additional_info)) +- `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--service_token)) + + + +### Nested Schema for `a_side.access_point` + +Read-Only: + +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--account)) +- `authentication_key` (String) +- `gateway` (Set of Object, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedobjatt--a_side--access_point--gateway)) +- `interface` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--interface)) +- `link_protocol` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--link_protocol)) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--location)) +- `network` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--network)) +- `peering_type` (String) +- `port` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--port)) +- `profile` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--profile)) +- `provider_connection_id` (String) +- `router` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--router)) +- `seller_region` (String) +- `type` (String) +- `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--virtual_device)) + + + +### Nested Schema for `a_side.access_point.account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `a_side.access_point.gateway` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.interface` + +Read-Only: + +- `id` (Number) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.link_protocol` + +Read-Only: + +- `type` (String) +- `vlan_c_tag` (Number) +- `vlan_s_tag` (Number) +- `vlan_tag` (Number) + + + +### Nested Schema for `a_side.access_point.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `a_side.access_point.network` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.port` + +Read-Only: + +- `href` (String) +- `name` (String) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--port--redundancy)) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.port.uuid` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `a_side.access_point.profile` + +Read-Only: + +- `access_point_type_configs` (List of Object) (see [below for nested schema](#nestedobjatt--a_side--access_point--profile--access_point_type_configs)) +- `description` (String) +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.profile.uuid` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.router` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.additional_info` + +Read-Only: + +- `key` (String) +- `value` (String) + + + +### Nested Schema for `a_side.service_token` + +Read-Only: + +- `description` (String) +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `equinix_status` (String) +- `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) +- `provider_status` (String) + + + +### Nested Schema for `operation.errors` + +Read-Only: + +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors--additional_info)) +- `correlation_id` (String) +- `details` (String) +- `error_code` (String) +- `error_message` (String) +- `help` (String) + + + +### Nested Schema for `operation.errors.additional_info` + +Read-Only: + +- `property` (String) +- `reason` (String) + + + +### Nested Schema for `order` + +Read-Only: + +- `billing_tier` (String) +- `order_id` (String) +- `order_number` (String) +- `purchase_order_number` (String) + + + +### Nested Schema for `project` + +Read-Only: + +- `href` (String) +- `project_id` (String) + + + +### Nested Schema for `redundancy` + +Read-Only: + +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `z_side` + +Read-Only: + +- `access_point` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point)) +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--z_side--additional_info)) +- `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--service_token)) + + + +### Nested Schema for `z_side.access_point` + +Read-Only: + +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--account)) +- `authentication_key` (String) +- `gateway` (Set of Object, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedobjatt--z_side--access_point--gateway)) +- `interface` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--interface)) +- `link_protocol` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--link_protocol)) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--location)) +- `network` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--network)) +- `peering_type` (String) +- `port` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--port)) +- `profile` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--profile)) +- `provider_connection_id` (String) +- `router` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--router)) +- `seller_region` (String) +- `type` (String) +- `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--virtual_device)) + + + +### Nested Schema for `z_side.access_point.account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `z_side.access_point.gateway` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.interface` + +Read-Only: + +- `id` (Number) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.link_protocol` + +Read-Only: + +- `type` (String) +- `vlan_c_tag` (Number) +- `vlan_s_tag` (Number) +- `vlan_tag` (Number) + + + +### Nested Schema for `z_side.access_point.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `z_side.access_point.network` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.port` + +Read-Only: + +- `href` (String) +- `name` (String) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--port--redundancy)) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.port.uuid` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `z_side.access_point.profile` + +Read-Only: + +- `access_point_type_configs` (List of Object) (see [below for nested schema](#nestedobjatt--z_side--access_point--profile--access_point_type_configs)) +- `description` (String) +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.profile.uuid` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.router` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.additional_info` + +Read-Only: + +- `key` (String) +- `value` (String) + + + +### Nested Schema for `z_side.service_token` + +Read-Only: + +- `description` (String) +- `href` (String) +- `type` (String) +- `uuid` (String) diff --git a/templates/data-sources/fabric_connections.md.tmpl b/templates/data-sources/fabric_connections.md.tmpl new file mode 100644 index 000000000..1ce494a6e --- /dev/null +++ b/templates/data-sources/fabric_connections.md.tmpl @@ -0,0 +1,565 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_connections Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch connection for a given UUID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_connections (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch connection for a given UUID + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections + +# Example Usage + +{{tffile "examples/data-sources/fabric_connections/example_1.tf"}} + + + +## Schema + +### Required + +- `filter` (Block List, Min: 1, Max: 10) Filters for the Data Source Search Request (see [below for nested schema](#nestedblock--filter)) +- `outer_operator` (String) Determines if the filter list will be grouped by AND or by OR. One of [AND, OR] + +### Optional + +- `pagination` (Block Set, Max: 1) Pagination details for the Data Source Search Request (see [below for nested schema](#nestedblock--pagination)) +- `sort` (Block List) Filters for the Data Source Search Request (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `data` (List of Object) List of Cloud Routers (see [below for nested schema](#nestedatt--data)) +- `id` (String) The ID of this resource. + + + +### Nested Schema for `filter` + +Required: + +- `operator` (String) Operators to use on your filtered field with the values given. One of [ =, !=, >, >=, <, <=, BETWEEN, NOT BETWEEN, LIKE, NOT LIKE, IN, NOT IN, IS NOT NULL, IS NULL] +- `property` (String) Possible field names to use on filters. One of [/isRemote /name /uuid /type /geoScope /account/orgId /aSide/accessPoint/account/accountName /aSide/accessPoint/account/accountNumber /aSide/accessPoint/router/uuid /aSide/accessPoint/linkProtocol/vlanCTag /aSide/accessPoint/linkProtocol/vlanSTag /aSide/accessPoint/linkProtocol/vlanTagMin /aSide/accessPoint/linkProtocol/vlanTagMax /aSide/accessPoint/location/metroCode /aSide/accessPoint/location/metroName /aSide/accessPoint/name /aSide/accessPoint/port/uuid /aSide/accessPoint/port/name /aSide/accessPoint/type /aSide/accessPoint/virtualDevice/name /aSide/accessPoint/virtualDevice/uuid /aSide/serviceToken/uuid /change/status /operation/equinixStatus /operation/providerStatus /project/projectId /redundancy/group /redundancy/priority /zSide/accessPoint/account/accountName /zSide/accessPoint/authenticationKey /zSide/accessPoint/linkProtocol/vlanCTag /zSide/accessPoint/linkProtocol/vlanSTag /zSide/accessPoint/linkProtocol/vlanTagMin /zSide/accessPoint/linkProtocol/vlanTagMax /zSide/accessPoint/location/metroCode /zSide/accessPoint/location/metroName /zSide/accessPoint/name /zSide/accessPoint/port/uuid /zSide/accessPoint/network/uuid /zSide/accessPoint/port/name /zSide/accessPoint/profile/uuid /zSide/accessPoint/type /zSide/accessPoint/virtualDevice/name /zSide/accessPoint/virtualDevice/uuid /zSide/serviceToken/uuid *] +- `values` (List of String) The values that you want to apply the property+operator combination to in order to filter your data search + +Optional: + +- `group` (String) Optional custom id parameter to assign this filter to an inner AND or OR group. Group id must be prefixed with AND_ or OR_. Ensure intended grouped elements have the same given id. Ungrouped filters will be placed in the filter list group by themselves. + + + +### Nested Schema for `pagination` + +Optional: + +- `limit` (Number) Number of elements to be requested per page. Number must be between 1 and 100. Default is 20 +- `offset` (Number) The page offset for the pagination request. Index of the first element. Default is 0. + + + +### Nested Schema for `sort` + +Optional: + +- `direction` (String) The sorting direction. Can be one of: [DESC, ASC], Defaults to DESC +- `property` (String) The property name to use in sorting. One of [/name /direction /aSide/accessPoint/name /aSide/accessPoint/type /aSide/accessPoint/account/accountName /aSide/accessPoint/location/metroName /aSide/accessPoint/location/metroCode /aSide/accessPoint/linkProtocol/vlanCTag /aSide/accessPoint/linkProtocol/vlanSTag /zSide/accessPoint/name /zSide/accessPoint/type /zSide/accessPoint/account/accountName /zSide/accessPoint/location/metroName /zSide/accessPoint/location/metroCode /zSide/accessPoint/linkProtocol/vlanCTag /zSide/accessPoint/linkProtocol/vlanSTag /zSide/accessPoint/authenticationKey /bandwidth /geoScope /uuid /changeLog/createdDateTime /changeLog/updatedDateTime /operation/equinixStatus /operation/providerStatus /redundancy/priority]. Defaults to /changeLog/updatedDateTime + + + +### Nested Schema for `data` + +Read-Only: + +- `a_side` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side)) +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--data--account)) +- `additional_info` (List of Map of String) +- `bandwidth` (Number) +- `change_log` (Set of Object) (see [below for nested schema](#nestedobjatt--data--change_log)) +- `description` (String) +- `direction` (String) +- `href` (String) +- `is_remote` (Boolean) +- `name` (String) +- `notifications` (List of Object) (see [below for nested schema](#nestedobjatt--data--notifications)) +- `operation` (Set of Object) (see [below for nested schema](#nestedobjatt--data--operation)) +- `order` (Set of Object) (see [below for nested schema](#nestedobjatt--data--order)) +- `project` (Set of Object) (see [below for nested schema](#nestedobjatt--data--project)) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--data--redundancy)) +- `state` (String) +- `type` (String) +- `uuid` (String) +- `z_side` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side)) + + + +### Nested Schema for `data.a_side` + +Read-Only: + +- `access_point` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point)) +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--data--a_side--additional_info)) +- `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--service_token)) + + + +### Nested Schema for `data.a_side.access_point` + +Read-Only: + +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--account)) +- `authentication_key` (String) +- `gateway` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--gateway)) +- `interface` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--interface)) +- `link_protocol` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--link_protocol)) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--location)) +- `network` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--network)) +- `peering_type` (String) +- `port` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--port)) +- `profile` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--profile)) +- `provider_connection_id` (String) +- `router` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--router)) +- `seller_region` (String) +- `type` (String) +- `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--virtual_device)) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `id` (Number) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `type` (String) +- `vlan_c_tag` (Number) +- `vlan_s_tag` (Number) +- `vlan_tag` (Number) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `name` (String) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--virtual_device--redundancy)) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `access_point_type_configs` (List of Object) (see [below for nested schema](#nestedobjatt--data--a_side--access_point--virtual_device--access_point_type_configs)) +- `description` (String) +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device.access_point_type_configs` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.a_side.additional_info` + +Read-Only: + +- `key` (String) +- `value` (String) + + + +### Nested Schema for `data.a_side.service_token` + +Read-Only: + +- `description` (String) +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `data.change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `data.notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `data.operation` + +Read-Only: + +- `equinix_status` (String) +- `errors` (List of Object) (see [below for nested schema](#nestedobjatt--data--operation--errors)) +- `provider_status` (String) + + + +### Nested Schema for `data.operation.errors` + +Read-Only: + +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--data--operation--errors--additional_info)) +- `correlation_id` (String) +- `details` (String) +- `error_code` (String) +- `error_message` (String) +- `help` (String) + + + +### Nested Schema for `data.operation.errors.help` + +Read-Only: + +- `property` (String) +- `reason` (String) + + + +### Nested Schema for `data.order` + +Read-Only: + +- `billing_tier` (String) +- `order_id` (String) +- `order_number` (String) +- `purchase_order_number` (String) + + + +### Nested Schema for `data.project` + +Read-Only: + +- `href` (String) +- `project_id` (String) + + + +### Nested Schema for `data.redundancy` + +Read-Only: + +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `data.z_side` + +Read-Only: + +- `access_point` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point)) +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--data--z_side--additional_info)) +- `service_token` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--service_token)) + + + +### Nested Schema for `data.z_side.access_point` + +Read-Only: + +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--account)) +- `authentication_key` (String) +- `gateway` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--gateway)) +- `interface` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--interface)) +- `link_protocol` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--link_protocol)) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--location)) +- `network` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--network)) +- `peering_type` (String) +- `port` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--port)) +- `profile` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--profile)) +- `provider_connection_id` (String) +- `router` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--router)) +- `seller_region` (String) +- `type` (String) +- `virtual_device` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--virtual_device)) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `id` (Number) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `type` (String) +- `vlan_c_tag` (Number) +- `vlan_s_tag` (Number) +- `vlan_tag` (Number) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `name` (String) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--virtual_device--redundancy)) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `access_point_type_configs` (List of Object) (see [below for nested schema](#nestedobjatt--data--z_side--access_point--virtual_device--access_point_type_configs)) +- `description` (String) +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device.access_point_type_configs` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.access_point.virtual_device` + +Read-Only: + +- `href` (String) +- `name` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.z_side.additional_info` + +Read-Only: + +- `key` (String) +- `value` (String) + + + +### Nested Schema for `data.z_side.service_token` + +Read-Only: + +- `description` (String) +- `href` (String) +- `type` (String) +- `uuid` (String) diff --git a/templates/data-sources/fabric_network.md.tmpl b/templates/data-sources/fabric_network.md.tmpl new file mode 100644 index 000000000..8abb79bf4 --- /dev/null +++ b/templates/data-sources/fabric_network.md.tmpl @@ -0,0 +1,113 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_network Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch Fabric Network for a given UUID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_network (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Fabric Network for a given UUID + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks + +## Example Usage + +{{tffile "examples/data-sources/fabric_network/example_1.tf"}} + + + +## Schema + +### Required + +- `uuid` (String) Equinix-assigned network identifier + +### Read-Only + +- `change` (Set of Object) Information on asset change operation (see [below for nested schema](#nestedatt--change)) +- `change_log` (Set of Object) A permanent record of asset creation, modification, or deletion (see [below for nested schema](#nestedatt--change_log)) +- `connections_count` (Number) Number of connections associated with this network +- `href` (String) Fabric Network URI information +- `id` (String) The ID of this resource. +- `location` (Set of Object) Fabric Network location (see [below for nested schema](#nestedatt--location)) +- `name` (String) Fabric Network name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `notifications` (List of Object) Preferences for notifications on Fabric Network configuration or status changes (see [below for nested schema](#nestedatt--notifications)) +- `operation` (Set of Object) Network operation information that is associated with this Fabric Network (see [below for nested schema](#nestedatt--operation)) +- `project` (Set of Object) Fabric Network project (see [below for nested schema](#nestedatt--project)) +- `scope` (String) Fabric Network scope +- `state` (String) Fabric Network overall state +- `type` (String) Supported Network types - EVPLAN, EPLAN, IPWAN + + + +### Nested Schema for `change` + +Read-Only: + +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `equinix_status` (String) + + + +### Nested Schema for `project` + +Read-Only: + +- `project_id` (String) diff --git a/templates/data-sources/fabric_networks.md.tmpl b/templates/data-sources/fabric_networks.md.tmpl new file mode 100644 index 000000000..da4cb3692 --- /dev/null +++ b/templates/data-sources/fabric_networks.md.tmpl @@ -0,0 +1,160 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_networks Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch Fabric Network for a given UUID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_networks (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Fabric Network for a given UUID + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks + +## Example Usage + +{{tffile "examples/data-sources/fabric_networks/example_1.tf"}} + + + +## Schema + +### Required + +- `filter` (Block List, Min: 1, Max: 10) Filters for the Data Source Search Request (see [below for nested schema](#nestedblock--filter)) +- `outer_operator` (String) Determines if the filter list will be grouped by AND or by OR. One of [AND, OR] + +### Optional + +- `pagination` (Block Set, Max: 1) Pagination details for the Data Source Search Request (see [below for nested schema](#nestedblock--pagination)) +- `sort` (Block List) Filters for the Data Source Search Request (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `data` (List of Object) List of Cloud Routers (see [below for nested schema](#nestedatt--data)) +- `id` (String) The ID of this resource. + + + +### Nested Schema for `filter` + +Required: + +- `operator` (String) Operators to use on your filtered field with the values given. One of [ =, !=, >, >=, <, <=, BETWEEN, NOT BETWEEN, LIKE, NOT LIKE, ILIKE, NOT ILIKE, IN, NOT IN] +- `property` (String) Possible field names to use on filters. One of [/name /uuid /scope /type /operation/equinixStatus /location/region /project/projectId /account/globalCustId /account/orgId /deletedDate /_*] +- `values` (List of String) The values that you want to apply the property+operator combination to in order to filter your data search + +Optional: + +- `group` (String) Optional custom id parameter to assign this filter to an inner AND or OR group. Group id must be prefixed with AND_ or OR_. Ensure intended grouped elements have the same given id. Ungrouped filters will be placed in the filter list group by themselves. + + + +### Nested Schema for `pagination` + +Optional: + +- `limit` (Number) Number of elements to be requested per page. Number must be between 1 and 100. Default is 20 +- `offset` (Number) The page offset for the pagination request. Index of the first element. Default is 0. + + + +### Nested Schema for `sort` + +Optional: + +- `direction` (String) The sorting direction. Can be one of: [DESC, ASC], Defaults to DESC +- `property` (String) The property name to use in sorting. One of [/name /uuid /scope /operation/equinixStatus /location/region /changeLog/createdDateTime /changeLog/updatedDateTime]. Defaults to /changeLog/updatedDateTime + + + +### Nested Schema for `data` + +Read-Only: + +- `change` (Set of Object) (see [below for nested schema](#nestedobjatt--data--change)) +- `change_log` (Set of Object) (see [below for nested schema](#nestedobjatt--data--change_log)) +- `connections_count` (Number) +- `href` (String) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--location)) +- `name` (String) +- `notifications` (List of Object) (see [below for nested schema](#nestedobjatt--data--notifications)) +- `operation` (Set of Object) (see [below for nested schema](#nestedobjatt--data--operation)) +- `project` (Set of Object) (see [below for nested schema](#nestedobjatt--data--project)) +- `scope` (String) +- `state` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.change` + +Read-Only: + +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `data.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `data.notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `data.operation` + +Read-Only: + +- `equinix_status` (String) + + + +### Nested Schema for `data.project` + +Read-Only: + +- `project_id` (String) diff --git a/templates/data-sources/fabric_port.md.tmpl b/templates/data-sources/fabric_port.md.tmpl new file mode 100644 index 000000000..703abe84e --- /dev/null +++ b/templates/data-sources/fabric_port.md.tmpl @@ -0,0 +1,144 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_port Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch port by uuid +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_port (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch port by uuid + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-ports-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#ports + +## Example Usage + +{{tffile "examples/data-sources/fabric_port/example_1.tf"}} + + + +## Schema + +### Required + +- `uuid` (String) Equinix-assigned port identifier + +### Read-Only + +- `account` (Set of Object) Customer account information that is associated with this port (see [below for nested schema](#nestedatt--account)) +- `available_bandwidth` (Number) Port available bandwidth in Mbps +- `bandwidth` (Number) Port bandwidth in Mbps +- `change_log` (Set of Object) Captures port lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `description` (String) Port description +- `device` (Set of Object) Port device (see [below for nested schema](#nestedatt--device)) +- `encapsulation` (Set of Object) Port encapsulation protocol (see [below for nested schema](#nestedatt--encapsulation)) +- `href` (String) Port URI information +- `id` (String) The ID of this resource. +- `lag_enabled` (Boolean) Port Lag +- `location` (Set of Object) Port location information (see [below for nested schema](#nestedatt--location)) +- `name` (String) Port name +- `operation` (Set of Object) Port specific operational data (see [below for nested schema](#nestedatt--operation)) +- `redundancy` (Set of Object) Port redundancy information (see [below for nested schema](#nestedatt--redundancy)) +- `service_type` (String) Port service type +- `state` (String) Port state +- `type` (String) Port type +- `used_bandwidth` (Number) Port used bandwidth in Mbps + + + +### Nested Schema for `account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `device` + +Read-Only: + +- `name` (String) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--device--redundancy)) + + + +### Nested Schema for `device.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `encapsulation` + +Read-Only: + +- `tag_protocol_id` (String) +- `type` (String) + + + +### Nested Schema for `location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `connection_count` (Number) +- `op_status_changed_at` (String) +- `operational_status` (String) + + + +### Nested Schema for `redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) diff --git a/templates/data-sources/fabric_ports.md.tmpl b/templates/data-sources/fabric_ports.md.tmpl new file mode 100644 index 000000000..89f5ecdef --- /dev/null +++ b/templates/data-sources/fabric_ports.md.tmpl @@ -0,0 +1,161 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_ports Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch port by name +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_ports (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch port by name + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-ports-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#ports + +## Example Usage + +{{tffile "examples/data-sources/fabric_ports/example_1.tf"}} + + + +## Schema + +### Required + +- `filters` (Block Set, Min: 1, Max: 1) name (see [below for nested schema](#nestedblock--filters)) + +### Read-Only + +- `data` (List of Object) List of Ports (see [below for nested schema](#nestedatt--data)) +- `id` (String) The ID of this resource. + + + +### Nested Schema for `filters` + +Required: + +- `name` (String) Query Parameter to Get Ports By Name + + + +### Nested Schema for `data` + +Read-Only: + +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--data--account)) +- `available_bandwidth` (Number) +- `bandwidth` (Number) +- `change_log` (Set of Object) (see [below for nested schema](#nestedobjatt--data--change_log)) +- `description` (String) +- `device` (Set of Object) (see [below for nested schema](#nestedobjatt--data--device)) +- `encapsulation` (Set of Object) (see [below for nested schema](#nestedobjatt--data--encapsulation)) +- `href` (String) +- `lag_enabled` (Boolean) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--location)) +- `name` (String) +- `operation` (Set of Object) (see [below for nested schema](#nestedobjatt--data--operation)) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--data--redundancy)) +- `service_type` (String) +- `state` (String) +- `type` (String) +- `used_bandwidth` (Number) +- `uuid` (String) + + + +### Nested Schema for `data.account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) + + + +### Nested Schema for `data.change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `data.device` + +Read-Only: + +- `name` (String) +- `redundancy` (Set of Object) (see [below for nested schema](#nestedobjatt--data--device--redundancy)) + + + +### Nested Schema for `data.device.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `data.encapsulation` + +Read-Only: + +- `tag_protocol_id` (String) +- `type` (String) + + + +### Nested Schema for `data.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `data.operation` + +Read-Only: + +- `connection_count` (Number) +- `op_status_changed_at` (String) +- `operational_status` (String) + + + +### Nested Schema for `data.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) diff --git a/templates/data-sources/fabric_routing_protocol.md.tmpl b/templates/data-sources/fabric_routing_protocol.md.tmpl new file mode 100644 index 000000000..78c906492 --- /dev/null +++ b/templates/data-sources/fabric_routing_protocol.md.tmpl @@ -0,0 +1,158 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_routing_protocol Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch routing protocol for a given UUID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_routing_protocol (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch routing protocol for a given UUID + +API documentation can be found here - https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols + +## Example Usage + +{{tffile "examples/data-sources/fabric_routing_protocol/example_1.tf"}} + + + +## Schema + +### Required + +- `connection_uuid` (String) Connection URI associated with Routing Protocol +- `uuid` (String) Equinix-assigned routing protocol identifier + +### Read-Only + +- `bfd` (Set of Object) Bidirectional Forwarding Detection (see [below for nested schema](#nestedatt--bfd)) +- `bgp_auth_key` (String) BGP authorization key +- `bgp_ipv4` (Set of Object) Routing Protocol BGP IPv4 (see [below for nested schema](#nestedatt--bgp_ipv4)) +- `bgp_ipv6` (Set of Object) Routing Protocol BGP IPv6 (see [below for nested schema](#nestedatt--bgp_ipv6)) +- `change` (Set of Object) Routing Protocol configuration Changes (see [below for nested schema](#nestedatt--change)) +- `change_log` (Set of Object) Captures Routing Protocol lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `customer_asn` (Number) Customer-provided ASN +- `description` (String) Customer-provided Fabric Routing Protocol description +- `direct_ipv4` (Set of Object) Routing Protocol Direct IPv4 (see [below for nested schema](#nestedatt--direct_ipv4)) +- `direct_ipv6` (Set of Object) Routing Protocol Direct IPv6 (see [below for nested schema](#nestedatt--direct_ipv6)) +- `equinix_asn` (Number) Equinix ASN +- `href` (String) Routing Protocol URI information +- `id` (String) The ID of this resource. +- `name` (String) Routing Protocol name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `operation` (Set of Object) Routing Protocol type-specific operational data (see [below for nested schema](#nestedatt--operation)) +- `state` (String) Routing Protocol overall state +- `type` (String) Defines the routing protocol type like BGP or DIRECT + + + +### Nested Schema for `bfd` + +Read-Only: + +- `enabled` (Boolean) +- `interval` (String) + + + +### Nested Schema for `bgp_ipv4` + +Read-Only: + +- `customer_peer_ip` (String) +- `enabled` (Boolean) +- `equinix_peer_ip` (String) + + + +### Nested Schema for `bgp_ipv6` + +Read-Only: + +- `customer_peer_ip` (String) +- `enabled` (Boolean) +- `equinix_peer_ip` (String) + + + +### Nested Schema for `change` + +Read-Only: + +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `direct_ipv4` + +Read-Only: + +- `equinix_iface_ip` (String) + + + +### Nested Schema for `direct_ipv6` + +Read-Only: + +- `equinix_iface_ip` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) + + + +### Nested Schema for `operation.errors` + +Read-Only: + +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors--additional_info)) +- `correlation_id` (String) +- `details` (String) +- `error_code` (String) +- `error_message` (String) +- `help` (String) + + + +### Nested Schema for `operation.errors.additional_info` + +Read-Only: + +- `property` (String) +- `reason` (String) diff --git a/templates/data-sources/fabric_service_profile.md.tmpl b/templates/data-sources/fabric_service_profile.md.tmpl new file mode 100644 index 000000000..8cdba893a --- /dev/null +++ b/templates/data-sources/fabric_service_profile.md.tmpl @@ -0,0 +1,254 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_service_profile Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch Service Profile by UUID filter criteria +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_service_profile (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Service Profile by UUID filter criteria + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles + +## Example Usage + +{{tffile "examples/data-sources/fabric_service_profile/example_1.tf"}} + + + +## Schema + +### Required + +- `uuid` (String) Equinix assigned service profile identifier + +### Read-Only + +- `access_point_type_configs` (List of Object) Access point config information (see [below for nested schema](#nestedatt--access_point_type_configs)) +- `account` (Set of Object) Service Profile Owner Account Information (see [below for nested schema](#nestedatt--account)) +- `allowed_emails` (List of String) Array of contact emails +- `change_log` (Set of Object) Captures connection lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `custom_fields` (List of Object) Custom Fields (see [below for nested schema](#nestedatt--custom_fields)) +- `description` (String) User-provided service description +- `href` (String) Service Profile URI response attribute +- `id` (String) The ID of this resource. +- `marketing_info` (Set of Object) Marketing Info (see [below for nested schema](#nestedatt--marketing_info)) +- `metros` (List of Object) Access point config information (see [below for nested schema](#nestedatt--metros)) +- `name` (String) Customer-assigned service profile name +- `notifications` (List of Object) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedatt--notifications)) +- `ports` (List of Object) Ports (see [below for nested schema](#nestedatt--ports)) +- `project` (Set of Object) Project information (see [below for nested schema](#nestedatt--project)) +- `self_profile` (Boolean) Self Profile indicating if the profile is created for customer's self use +- `state` (String) Service profile state - ACTIVE, PENDING_APPROVAL, DELETED, REJECTED +- `tags` (List of String) Tags attached to the connection +- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE +- `virtual_devices` (List of Object) Virtual Devices (see [below for nested schema](#nestedatt--virtual_devices)) +- `visibility` (String) Service profile visibility - PUBLIC, PRIVATE + + + +### Nested Schema for `access_point_type_configs` + +Read-Only: + +- `allow_bandwidth_auto_approval` (Boolean) +- `allow_bandwidth_upgrade` (Boolean) +- `allow_custom_bandwidth` (Boolean) +- `allow_remote_connections` (Boolean) +- `api_config` (Set of Object) (see [below for nested schema](#nestedobjatt--access_point_type_configs--api_config)) +- `authentication_key` (Set of Object) (see [below for nested schema](#nestedobjatt--access_point_type_configs--authentication_key)) +- `bandwidth_alert_threshold` (Number) +- `connection_label` (String) +- `connection_redundancy_required` (Boolean) +- `enable_auto_generate_service_key` (Boolean) +- `link_protocol_config` (Set of Object) (see [below for nested schema](#nestedobjatt--access_point_type_configs--link_protocol_config)) +- `supported_bandwidths` (List of Number) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `access_point_type_configs.api_config` + +Read-Only: + +- `allow_over_subscription` (Boolean) +- `api_available` (Boolean) +- `bandwidth_from_api` (Boolean) +- `equinix_managed_port` (Boolean) +- `equinix_managed_vlan` (Boolean) +- `integration_id` (String) +- `over_subscription_limit` (Number) + + + +### Nested Schema for `access_point_type_configs.authentication_key` + +Read-Only: + +- `description` (String) +- `label` (String) +- `required` (Boolean) + + + +### Nested Schema for `access_point_type_configs.link_protocol_config` + +Read-Only: + +- `encapsulation` (String) +- `encapsulation_strategy` (String) +- `reuse_vlan_s_tag` (Boolean) + + + +### Nested Schema for `account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `custom_fields` + +Read-Only: + +- `capture_in_email` (Boolean) +- `data_type` (String) +- `description` (String) +- `label` (String) +- `options` (List of String) +- `required` (Boolean) + + + +### Nested Schema for `marketing_info` + +Read-Only: + +- `logo` (String) +- `process_step` (List of Object) (see [below for nested schema](#nestedobjatt--marketing_info--process_step)) +- `promotion` (Boolean) + + + +### Nested Schema for `marketing_info.process_step` + +Read-Only: + +- `description` (String) +- `sub_title` (String) +- `title` (String) + + + +### Nested Schema for `metros` + +Read-Only: + +- `code` (String) +- `display_name` (String) +- `ibxs` (List of String) +- `in_trail` (Boolean) +- `name` (String) +- `seller_regions` (Map of String) + + + +### Nested Schema for `notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `ports` + +Read-Only: + +- `cross_connect_id` (String) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--ports--location)) +- `seller_region` (String) +- `seller_region_description` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `ports.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `project` + +Read-Only: + +- `href` (String) +- `project_id` (String) + + + +### Nested Schema for `virtual_devices` + +Read-Only: + +- `interface_uuid` (String) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--virtual_devices--location)) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `virtual_devices.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) diff --git a/templates/data-sources/fabric_service_profiles.md.tmpl b/templates/data-sources/fabric_service_profiles.md.tmpl new file mode 100644 index 000000000..e50ef0350 --- /dev/null +++ b/templates/data-sources/fabric_service_profiles.md.tmpl @@ -0,0 +1,284 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_service_profiles Data Source - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible data resource that allow user to fetch Service Profile by name filter criteria +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_service_profiles (Data Source) + +Fabric V4 API compatible data resource that allow user to fetch Service Profile by name filter criteria + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles + +## Example Usage + +{{tffile "examples/data-sources/fabric_service_profiles/example_1.tf"}} + + + +## Schema + +### Optional + +- `filter` (Block Set, Max: 1) Service Profile Search Filter (see [below for nested schema](#nestedblock--filter)) +- `sort` (Block List) Service Profile Sort criteria for Search Request response payload (see [below for nested schema](#nestedblock--sort)) +- `view_point` (String) flips view between buyer and seller representation. Available values : aSide, zSide. Default value : aSide + +### Read-Only + +- `data` (List of Object) List of Service Profiles (see [below for nested schema](#nestedatt--data)) +- `id` (String) The ID of this resource. + + + +### Nested Schema for `filter` + +Optional: + +- `operator` (String) Possible operator to use on filters = - equal +- `property` (String) Search Criteria for Service Profile - /name, /uuid, /state, /metros/code, /visibility, /type +- `values` (List of String) Values + + + +### Nested Schema for `sort` + +Optional: + +- `direction` (String) Priority type- DESC, ASC +- `property` (String) Search operation sort criteria /name /state /changeLog/createdDateTime /changeLog/updatedDateTime + + + +### Nested Schema for `data` + +Read-Only: + +- `access_point_type_configs` (List of Object) (see [below for nested schema](#nestedobjatt--data--access_point_type_configs)) +- `account` (Set of Object) (see [below for nested schema](#nestedobjatt--data--account)) +- `allowed_emails` (List of String) +- `change_log` (Set of Object) (see [below for nested schema](#nestedobjatt--data--change_log)) +- `custom_fields` (List of Object) (see [below for nested schema](#nestedobjatt--data--custom_fields)) +- `description` (String) +- `href` (String) +- `marketing_info` (Set of Object) (see [below for nested schema](#nestedobjatt--data--marketing_info)) +- `metros` (List of Object) (see [below for nested schema](#nestedobjatt--data--metros)) +- `name` (String) +- `notifications` (List of Object) (see [below for nested schema](#nestedobjatt--data--notifications)) +- `ports` (List of Object) (see [below for nested schema](#nestedobjatt--data--ports)) +- `project` (Set of Object) (see [below for nested schema](#nestedobjatt--data--project)) +- `self_profile` (Boolean) +- `state` (String) +- `tags` (List of String) +- `type` (String) +- `uuid` (String) +- `virtual_devices` (List of Object) (see [below for nested schema](#nestedobjatt--data--virtual_devices)) +- `visibility` (String) + + + +### Nested Schema for `data.access_point_type_configs` + +Read-Only: + +- `allow_bandwidth_auto_approval` (Boolean) +- `allow_bandwidth_upgrade` (Boolean) +- `allow_custom_bandwidth` (Boolean) +- `allow_remote_connections` (Boolean) +- `api_config` (Set of Object) (see [below for nested schema](#nestedobjatt--data--access_point_type_configs--api_config)) +- `authentication_key` (Set of Object) (see [below for nested schema](#nestedobjatt--data--access_point_type_configs--authentication_key)) +- `bandwidth_alert_threshold` (Number) +- `connection_label` (String) +- `connection_redundancy_required` (Boolean) +- `enable_auto_generate_service_key` (Boolean) +- `link_protocol_config` (Set of Object) (see [below for nested schema](#nestedobjatt--data--access_point_type_configs--link_protocol_config)) +- `supported_bandwidths` (List of Number) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.access_point_type_configs.api_config` + +Read-Only: + +- `allow_over_subscription` (Boolean) +- `api_available` (Boolean) +- `bandwidth_from_api` (Boolean) +- `equinix_managed_port` (Boolean) +- `equinix_managed_vlan` (Boolean) +- `integration_id` (String) +- `over_subscription_limit` (Number) + + + +### Nested Schema for `data.access_point_type_configs.authentication_key` + +Read-Only: + +- `description` (String) +- `label` (String) +- `required` (Boolean) + + + +### Nested Schema for `data.access_point_type_configs.link_protocol_config` + +Read-Only: + +- `encapsulation` (String) +- `encapsulation_strategy` (String) +- `reuse_vlan_s_tag` (Boolean) + + + +### Nested Schema for `data.account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `data.change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `data.custom_fields` + +Read-Only: + +- `capture_in_email` (Boolean) +- `data_type` (String) +- `description` (String) +- `label` (String) +- `options` (List of String) +- `required` (Boolean) + + + +### Nested Schema for `data.marketing_info` + +Read-Only: + +- `logo` (String) +- `process_step` (List of Object) (see [below for nested schema](#nestedobjatt--data--marketing_info--process_step)) +- `promotion` (Boolean) + + + +### Nested Schema for `data.marketing_info.process_step` + +Read-Only: + +- `description` (String) +- `sub_title` (String) +- `title` (String) + + + +### Nested Schema for `data.metros` + +Read-Only: + +- `code` (String) +- `display_name` (String) +- `ibxs` (List of String) +- `in_trail` (Boolean) +- `name` (String) +- `seller_regions` (Map of String) + + + +### Nested Schema for `data.notifications` + +Read-Only: + +- `emails` (List of String) +- `send_interval` (String) +- `type` (String) + + + +### Nested Schema for `data.ports` + +Read-Only: + +- `cross_connect_id` (String) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--ports--location)) +- `seller_region` (String) +- `seller_region_description` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.ports.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) + + + +### Nested Schema for `data.project` + +Read-Only: + +- `href` (String) +- `project_id` (String) + + + +### Nested Schema for `data.virtual_devices` + +Read-Only: + +- `interface_uuid` (String) +- `location` (Set of Object) (see [below for nested schema](#nestedobjatt--data--virtual_devices--location)) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `data.virtual_devices.location` + +Read-Only: + +- `ibx` (String) +- `metro_code` (String) +- `metro_name` (String) +- `region` (String) diff --git a/templates/data-sources/metal_connection.md.tmpl b/templates/data-sources/metal_connection.md.tmpl new file mode 100644 index 000000000..ec24ae5f9 --- /dev/null +++ b/templates/data-sources/metal_connection.md.tmpl @@ -0,0 +1,58 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_connection (Data Source) + +Use this data source to retrieve a [connection resource](https://metal.equinix.com/developers/docs/networking/fabric/) + +~> Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization. + +## Example Usage + +{{tffile "examples/data-sources/metal_connection/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) ID of the connection resource. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `name` - Name of the connection resource. +* `metro` - Slug of a metro to which the connection belongs. +* `facility` - (**Deprecated**) Slug of a facility to which the connection belongs. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `contact_email` - The preferred email used for communication and notifications about the Equinix Fabric interconnection. +* `redundancy` - Connection redundancy, reduntant or primary. +* `type` - Connection type, dedicated or shared. +* `project_id` - ID of project to which the connection belongs. +* `speed` - Connection speed - Values will be in the format 'Mbps' or 'Gpbs', for example '100Mbps`, '50Gbps', etc. +* `description` - Description of the connection resource. +* `mode` - Mode for connections in IBX facilities with the dedicated type - standard or tunnel. +* `tags` - String list of tags. +* `vlans` - Attached VLANs. Only available in shared connection. One vlan for Primary/Single connection and two vlans for Redundant connection. +* `service_token_type` - Type of service token, a_side or z_side. One available in shared connection. +* `organization_id` - ID of the organization where the connection is scoped to. +* `status` - Status of the connection resource. +* `service_tokens` - List of connection service tokens with attributes + * `id` - UUID of the service token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](../resources/equinix_fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). + * `expires_at` - Expiration date of the service token. + * `max_allowed_speed` - Maximum allowed speed for the service token, string like in the `speed` attribute. + * `type` - Token type, `a_side` or `z_side`. + * `role` - Token role, `primary` or `secondary`. +* `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`) + * `name` - Port name. + * `id` - Port UUID. + * `role` - Port role - primary or secondary. + * `speed` - Port speed in bits per second. + * `status` - Port status. + * `link_status` - Port link status. + * `virtual_circuit_ids` - List of IDs of virtual cicruits attached to this port. +* `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](../resources/equinix_fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. diff --git a/templates/data-sources/metal_device.md.tmpl b/templates/data-sources/metal_device.md.tmpl new file mode 100644 index 000000000..7511eea41 --- /dev/null +++ b/templates/data-sources/metal_device.md.tmpl @@ -0,0 +1,15 @@ +--- +subcategory: "Metal" +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +{{tffile "examples/data-sources/metal_device/example_1.tf"}} + +{{tffile "examples/data-sources/metal_device/example_2.tf"}} + +{{ .SchemaMarkdown | trimspace }} diff --git a/templates/data-sources/metal_device_bgp_neighbors.md.tmpl b/templates/data-sources/metal_device_bgp_neighbors.md.tmpl new file mode 100644 index 000000000..b34ab78b2 --- /dev/null +++ b/templates/data-sources/metal_device_bgp_neighbors.md.tmpl @@ -0,0 +1,43 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_device_bgp_neighbors (Data Source) + +Use this datasource to retrieve list of BGP neighbors of a device in the Equinix Metal host. + +To have any BGP neighbors listed, the device must be in [BGP-enabled project](../r/project.html) and have a [BGP session](../r/bgp_session.html) assigned. + +To learn more about using BGP in Equinix Metal, see the [equinix_metal_bgp_session](../r/bgp_session.html) resource documentation. + +## Example Usage + +{{tffile "examples/data-sources/metal_device_bgp_neighbors/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `device_id` - (Required) UUID of BGP-enabled device whose neighbors to list. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `bgp_neighbors` - array of BGP neighbor records with attributes: + * `address_family` - IP address version, 4 or 6. + * `customer_as` - Local autonomous system number. + * `customer_ip` - Local used peer IP address. + * `md5_enabled` - Whether BGP session is password enabled. + * `md5_password` - BGP session password in plaintext (not a checksum). + * `multihop` - Whether the neighbor is in EBGP multihop session. + * `peer_as` - Peer AS number (different than customer_as for EBGP). + * `peer_ips` - Array of IP addresses of this neighbor's peers. + * `routes_in` - Array of incoming routes. + * `route` - CIDR expression of route (IP/mask). + * `exact` - (bool) Whether the route is exact. + * `routes_out` - Array of outgoing routes in the same format. diff --git a/templates/data-sources/metal_devices.md.tmpl b/templates/data-sources/metal_devices.md.tmpl new file mode 100644 index 000000000..19de6fe1b --- /dev/null +++ b/templates/data-sources/metal_devices.md.tmpl @@ -0,0 +1,44 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_devices + +The datasource can be used to find a list of devices which meet filter criteria. + +If you need to fetch a single device by ID or by project ID and hostname, use the [equinix_metal_device](equinix_metal_device.md) datasource. + +## Example Usage + +{{tffile "examples/data-sources/metal_devices/example_1.tf"}} + +{{tffile "examples/data-sources/metal_devices/example_2.tf"}} + +## search vs filter + +The difference between `search` and `filter` is that `search` is an API parameter, interpreted by the Equinix Metal service. The "filter" arguments will reduce the API list (or search) results by applying client-side filtering, within this provider. + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Optional) ID of project containing the devices. Exactly one of `project_id` and `organization_id` must be set. +* `organization_id` - (Optional) ID of organization containing the devices. +* `search` - (Optional) - Search string to filter devices by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. +* `filter` - (Optional) One or more attribute/values pairs to filter. List of atributes to filter can be found in the [attribute reference](equinix_metal_device.md#attributes-reference) of the `equinix_metal_device` datasource. + - `attribute` - (Required) The attribute used to filter. Filter attributes are case-sensitive + - `values` - (Required) The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR by default, and the request returns all results that match any of the specified values + - `match_by` - (Optional) The type of comparison to apply. One of: `in` , `re`, `substring`, `less_than`, `less_than_or_equal`, `greater_than`, `greater_than_or_equal`. Default is `in`. + - `all` - (Optional) If is set to true, the values are joined with an AND, and the requests returns only the results that match all specified values. Default is `false`. + +All fields in the `devices` block defined below can be used as attribute for both `sort` and `filter` blocks. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `devices` - list of resources with attributes like in the [equninix_metal_device datasources](equinix_metal_device.md). diff --git a/templates/data-sources/metal_facility.md.tmpl b/templates/data-sources/metal_facility.md.tmpl new file mode 100644 index 000000000..5f79d93d3 --- /dev/null +++ b/templates/data-sources/metal_facility.md.tmpl @@ -0,0 +1,38 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_facility (Data Source) + +> **Deprecated** Use `equinix_metal_metro` instead. For more information, refer to the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices). + +Provides an Equinix Metal facility datasource. + +## Example Usage + +{{tffile "examples/data-sources/metal_facility/example_1.tf"}} + +{{tffile "examples/data-sources/metal_facility/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `code` - (Required) The facility code to search for facilities. +* `features_required` - (Optional) Set of feature strings that the facility must have. Some possible values are `baremetal`, `ibx`, `storage`, `global_ipv4`, `backend_transfer`, `layer_2`. +* `capacity` - (Optional) One or more device plans for which the facility must have capacity. + * `plan` - (Required) Device plan that must be available in selected location. + * `quantity` - (Optional) Minimun number of devices that must be available in selected location. Default is `1`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The ID of the facility. +* `name` - The name of the facility. +* `features` - The features of the facility. +* `metro` - The metro code the facility is part of. diff --git a/templates/data-sources/metal_gateway.md.tmpl b/templates/data-sources/metal_gateway.md.tmpl new file mode 100644 index 000000000..32f8813e4 --- /dev/null +++ b/templates/data-sources/metal_gateway.md.tmpl @@ -0,0 +1,34 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_gateway (Data Source) + +Use this datasource to retrieve Metal Gateway resources in Equinix Metal. + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +{{tffile "examples/data-sources/metal_gateway/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `gateway_id` - (Required) UUID of the metal gateway resource to retrieve. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `project_id` - UUID of the project where the gateway is scoped to. +* `vlan_id` - UUID of the VLAN where the gateway is scoped to. +* `vrf_id` - UUID of the VRF associated with the IP Reservation. +* `ip_reservation_id` - UUID of IP reservation block bound to the gateway. +* `private_ipv4_subnet_size` - Size of the private IPv4 subnet bound to this metal gateway. One of `8`, `16`, `32`, `64`, `128`. +* `state` - Status of the gateway resource. diff --git a/templates/data-sources/metal_hardware_reservation.md.tmpl b/templates/data-sources/metal_hardware_reservation.md.tmpl new file mode 100644 index 000000000..ab8755c81 --- /dev/null +++ b/templates/data-sources/metal_hardware_reservation.md.tmpl @@ -0,0 +1,38 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_hardware_reservation (Data Source) + +Use this data source to retrieve a [hardware reservation resource from Equinix Metal](https://metal.equinix.com/developers/docs/deploy/reserved/). + +You can look up hardware reservation by its ID or by ID of device which occupies it. + +## Example Usage + +{{tffile "examples/data-sources/metal_hardware_reservation/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `id` - (Optional) ID of the hardware reservation. +* `device_id` - (Optional) UUID of device occupying the reservation. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the hardware reservation to look up. +* `short_id` - Reservation short ID. +* `project_id` - UUID of project this reservation is scoped to. +* `device_id` - UUID of device occupying the reservation. +* `plan` - Plan type for the reservation. +* `facility` - (**Deprecated**) Facility for the reservation. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `provisionable` - Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first. +* `spare` - Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix. +* `switch_uuid` - Switch short ID, can be used to determine if two devices are connected to the same switch. diff --git a/templates/data-sources/metal_ip_block_ranges.md.tmpl b/templates/data-sources/metal_ip_block_ranges.md.tmpl new file mode 100644 index 000000000..7923b2f8b --- /dev/null +++ b/templates/data-sources/metal_ip_block_ranges.md.tmpl @@ -0,0 +1,36 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_ip_block_ranges (Data Source) + +Use this datasource to get CIDR expressions for allocated IP blocks of all the types in a project, optionally filtered by facility or metro. + +There are four types of IP blocks in Equinix: equinix_metal_global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 blocks are allocated in a facility or metro, and addresses from it can only be assigned to devices in that location. Addresses from Global IPv4 block can be assigned to a device in any metro. + +The datasource has 4 list attributes: `global_ipv4`, `public_ipv4`, `private_ipv4` and `ipv6`, each listing CIDR notation (`/`) of respective blocks from the project. + +## Example Usage + +{{tffile "examples/data-sources/metal_ip_block_ranges/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) ID of the project from which to list the blocks. +* `facility` - (**Deprecated**) Facility code filtering the IP blocks. Global IPv4 blocks will be listed anyway. If you omit this and metro, all the block from the project will be listed. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Metro code filtering the IP blocks. Global IPv4 blocks will be listed anyway. If you omit this and facility, all the block from the project will be listed. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `global_ipv4` - list of CIDR expressions for Global IPv4 blocks in the project. +* `public_ipv4` - list of CIDR expressions for Public IPv4 blocks in the project. +* `private_ipv4` - list of CIDR expressions for Private IPv4 blocks in the project. +* `ipv6` - list of CIDR expressions for IPv6 blocks in the project. diff --git a/templates/data-sources/metal_metro.md.tmpl b/templates/data-sources/metal_metro.md.tmpl new file mode 100644 index 000000000..ecd67b615 --- /dev/null +++ b/templates/data-sources/metal_metro.md.tmpl @@ -0,0 +1,34 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_metro (Data Source) + +Provides an Equinix Metal metro datasource. + +## Example Usage + +{{tffile "examples/data-sources/metal_metro/example_1.tf"}} + +{{tffile "examples/data-sources/metal_metro/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `code` - (Required) The metro code to search for. +* `capacity` - (Optional) One or more device plans for which the metro must have capacity. + * `plan` - (Required) Device plan that must be available in selected location. + * `quantity` - (Optional) Minimum number of devices that must be available in selected location. Default is `1`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The ID of the metro. +* `name` - The name of the metro. +* `country` - The country of the metro. diff --git a/templates/data-sources/metal_operating_system.md.tmpl b/templates/data-sources/metal_operating_system.md.tmpl new file mode 100644 index 000000000..e1af73221 --- /dev/null +++ b/templates/data-sources/metal_operating_system.md.tmpl @@ -0,0 +1,31 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_operating_system (Data Source) + +Use this data source to get Equinix Metal Operating System image. + +## Example Usage + +{{tffile "examples/data-sources/metal_operating_system/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `distro` - (Optional) Name of the OS distribution. +* `name` - (Optional) Name or part of the name of the distribution. Case insensitive. +* `provisionable_on` - (Optional) Plan name. +* `version` - (Optional) Version of the distribution. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - Operating system slug. +* `slug` - Operating system slug (same as `id`). diff --git a/templates/data-sources/metal_organization.md.tmpl b/templates/data-sources/metal_organization.md.tmpl new file mode 100644 index 000000000..6d2153f9a --- /dev/null +++ b/templates/data-sources/metal_organization.md.tmpl @@ -0,0 +1,40 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_organization (Data Source) + +Provides an Equinix Metal organization datasource. + +## Example Usage + +{{tffile "examples/data-sources/metal_organization/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Optional) The organization name. +* `organization_id` - (Optional) The UUID of the organization resource. + +Exactly one of `name` or `organization_id` must be given. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `project_ids` - UUIDs of project resources which belong to this organization. +* `description` - Description string. +* `website` - Website link. +* `twitter` - Twitter handle. +* `logo` - Logo URL. +* `address` - Address information + * `address` - Postal address. + * `city` - City name. + * `country` - Two letter country code (ISO 3166-1 alpha-2), e.g. US. + * `zip_code` - Zip Code. + * `state` - State name. diff --git a/templates/data-sources/metal_plans.md.tmpl b/templates/data-sources/metal_plans.md.tmpl new file mode 100644 index 000000000..5a127fc6c --- /dev/null +++ b/templates/data-sources/metal_plans.md.tmpl @@ -0,0 +1,66 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_plans + +Provides an Equinix Metal plans datasource. This can be used to find plans that meet a filter criteria. + +## Example Usage + +{{tffile "examples/data-sources/metal_plans/example_1.tf"}} + +{{tffile "examples/data-sources/metal_plans/example_2.tf"}} + +### Ignoring Changes to Plans/Metro + +Preserve deployed device plan, facility and metro when creating a new execution plan. + +As described in the [`data-resource-behavior`](https://www.terraform.io/language/data-sources#data-resource-behavior), terraform reads data resources during the planning phase in both the terraform plan and terraform apply commands. If the output from the data source is different to the prior state, it will propose changes to resources where there is a reference to their attributes. + +For `equinix_metal_plans`, it may happen that a device plan is no longer available in a metro because there is no stock at that time or you were using a legacy server plan, and thus the returned list of plans matching your search criteria will be different from last `plan`/`apply`. Therefore, if a resource such as a `equinix_metal_device` uses the output of this data source to select a device plan or metro, the Terraform plan will report that the `equinix_metal_device` needs to be recreated. + +To prevent that you can take advantage of the Terraform [`lifecycle ignore_changes`](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changes) feature as shown in the example below. + +{{tffile "examples/data-sources/metal_plans/example_3.tf"}} + +If your use case requires dynamic changes of a device plan or metro you can define the lifecycle with a condition. + +{{tffile "examples/data-sources/metal_plans/example_4.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `sort` - (Optional) One or more attribute/direction pairs on which to sort results. If multiple sorts are provided, they will be applied in order + - `attribute` - (Required) The attribute used to sort the results. Sort attributes are case-sensitive + - `direction` - (Optional) Sort results in ascending or descending order. Strings are sorted in alphabetical order. One of: asc, desc +* `filter` - (Optional) One or more attribute/values pairs to filter off of + - `attribute` - (Required) The attribute used to filter. Filter attributes are case-sensitive + - `values` - (Required) The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR by default, and the request returns all results that match any of the specified values + - `match_by` - (Optional) The type of comparison to apply. One of: `in` , `re`, `substring`, `less_than`, `less_than_or_equal`, `greater_than`, `greater_than_or_equal`. Default is `in`. + - `all` - (Optional) If is set to true, the values are joined with an AND, and the requests returns only the results that match all specified values. Default is `false`. + +All fields in the `plans` block defined below can be used as attribute for both `sort` and `filter` blocks. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `plans` + - `id` - id of the plan + - `name` - name of the plan + - `slug`- plan slug + - `description`- description of the plan + - `line`- plan line, e.g. baremetal + - `legacy`- flag showing if it's a legacy plan + - `class`- plan class + - `pricing_hour`- plan hourly price + - `pricing_month`- plan monthly price + - `deployment_types`- list of deployment types, e.g. on_demand, spot_market + - `available_in`- (**Deprecated**) list of facilities where the plan is available + - `available_in_metros`- list of metros where the plan is available diff --git a/templates/data-sources/metal_port.md.tmpl b/templates/data-sources/metal_port.md.tmpl new file mode 100644 index 000000000..f91f548bf --- /dev/null +++ b/templates/data-sources/metal_port.md.tmpl @@ -0,0 +1,40 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_port (Data Source) + +Use this data source to read ports of existing devices. You can read port by either its UUID, or by a device UUID and port name. + +## Example Usage + +Create a device and read it's eth0 port to the datasource. + +{{tffile "examples/data-sources/metal_port/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `port_id` - (Optional) ID of the port to read, conflicts with `device_id`. +* `device_id` - (Optional) Device UUID where to lookup the port. +* `name` - (Optional) Name of the port to look up, i.e. `bond0`, `eth1`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `network_type` - One of `layer2-bonded`, `layer2-individual`, `layer3`, `hybrid`, `hybrid-bonded`. +* `type` - Type is either `NetworkBondPort` for bond ports or `NetworkPort` for bondable ethernet ports. +* `mac` - MAC address of the port. +* `bond_id` - UUID of the bond port. +* `bond_name` - Name of the bond port. +* `bonded` - Flag indicating whether the port is bonded. +* `disbond_supported` - Flag indicating whether the port can be removed from a bond. +* `native_vlan_id` - UUID of native VLAN of the port. +* `vlan_ids` - UUIDs of attached VLANs. +* `vxlan_ids` - VXLAN ids of attached VLANs. diff --git a/templates/data-sources/metal_precreated_ip_block.md.tmpl b/templates/data-sources/metal_precreated_ip_block.md.tmpl new file mode 100644 index 000000000..332c608f1 --- /dev/null +++ b/templates/data-sources/metal_precreated_ip_block.md.tmpl @@ -0,0 +1,38 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_precreated_ip_block (Data Source) + +Use this data source to get CIDR expression for precreated (management) IPv6 and IPv4 blocks in Equinix Metal. You can then use the cidrsubnet TF builtin function to derive subnets. + +~> For backward compatibility, this data source will also return reserved (elastic) IP blocks. + +-> Precreated (management) IP blocks for a metro will not be available until first device is created in that metro. + +-> Public IPv4 blocks auto-assigned (management) to a device cannot be retrieved. If you need that information, consider using the [equinix_metal_device](equinix_metal_device.md) data source instead. + +## Example Usage + +{{tffile "examples/data-sources/metal_precreated_ip_block/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) ID of the project where the searched block should be. +* `address_family` - (Required) 4 or 6, depending on which block you are looking for. +* `public` - (Required) Whether to look for public or private block. +* `global` - (Optional) Whether to look for global block. Default is false for backward compatibility. +* `facility` - (**Deprecated**) Facility of the searched block. (for non-global blocks). Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Metro of the searched block (for non-global blocks). + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `cidr_notation` - CIDR notation of the looked up block. diff --git a/templates/data-sources/metal_project.md.tmpl b/templates/data-sources/metal_project.md.tmpl new file mode 100644 index 000000000..59f7c0e4e --- /dev/null +++ b/templates/data-sources/metal_project.md.tmpl @@ -0,0 +1,42 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_project (Data Source) + +Use this datasource to retrieve attributes of the Project API resource. + +## Example Usage + +{{tffile "examples/data-sources/metal_project/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Optional) The name which is used to look up the project. +* `project_id` - (Optional) The UUID by which to look up the project. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `payment_method_id` - The UUID of payment method for this project. +* `organization_id` - The UUID of this project's parent organization. +* `backend_transfer` - Whether Backend Transfer is enabled for this project. +* `created` - The timestamp for when the project was created. +* `updated` - The timestamp for the last time the project was updated. +* `user_ids` - List of UUIDs of user accounts which belong to this project. +* `bgp_config` - Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/). + +The `bgp_config` block contains: + +* `asn` - Autonomous System Number for local BGP deployment. +* `md5` - Password for BGP session in plaintext (not a checksum). +* `deployment_type` - One of `private`, `public`. +* `status` - Status of BGP configuration in the project. +* `max_prefix` - The maximum number of route filters allowed per server. diff --git a/templates/data-sources/metal_project_ssh_key.md.tmpl b/templates/data-sources/metal_project_ssh_key.md.tmpl new file mode 100644 index 000000000..c781ad745 --- /dev/null +++ b/templates/data-sources/metal_project_ssh_key.md.tmpl @@ -0,0 +1,38 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_project_ssh_key (Data Source) + +Use this datasource to retrieve attributes of a Project SSH Key API resource. + +## Example Usage + +{{tffile "examples/data-sources/metal_project_ssh_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `search` - (Optional) The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project. +* `id` - (Optional) The id of the SSH Key to search for in the Equinix Metal project. +* `project_id` - (Optional) The Equinix Metal project id of the Equinix Metal SSH Key. + +-> **NOTE:** One of either `search` or `id` must be provided along with `project_id`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the key. +* `name` - The name of the SSH key. +* `public_key` - The text of the public key. +* `project_id` - The ID of parent project. +* `owner_id` - The ID of parent project (same as project_id). +* `fingerprint` - The fingerprint of the SSH key. +* `created` - The timestamp for when the SSH key was created. +* `updated` - The timestamp for the last time the SSH key was updated. diff --git a/templates/data-sources/metal_reserved_ip_block.md.tmpl b/templates/data-sources/metal_reserved_ip_block.md.tmpl new file mode 100644 index 000000000..a9749a314 --- /dev/null +++ b/templates/data-sources/metal_reserved_ip_block.md.tmpl @@ -0,0 +1,37 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_reserved_ip_block (Data Source) + +Use this data source to find IP address blocks in Equinix Metal. You can use IP address or a block ID for lookup. + +~> For backward compatibility, this data source can be also used for precreated (management) IP blocks. + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +Look up an IP address for a domain name, then use the IP to look up the containing IP block and run a device with IP address from the block: + +{{tffile "examples/data-sources/metal_reserved_ip_block/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `id` - (Optional) UUID of the IP address block to look up. +* `project_id` - (Optional) UUID of the project where the searched block should be. +* `ip_address` - (Optional) Block containing this IP address will be returned. + +-> **NOTE:** You should pass either `id`, or both `project_id` and `ip_address`. + +## Attributes Reference + +This datasource exposes the same attributes as the [equinix_metal_reserved_ip_block](../resources/equinix_metal_reserved_ip_block.md) resource, with the following differences: + +* `type` - One of `global_ipv4`, `public_ipv4`, `private_ipv4`, `public_ipv6`,or `vrf` diff --git a/templates/data-sources/metal_spot_market_price.md.tmpl b/templates/data-sources/metal_spot_market_price.md.tmpl new file mode 100644 index 000000000..804770c43 --- /dev/null +++ b/templates/data-sources/metal_spot_market_price.md.tmpl @@ -0,0 +1,31 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_operating_system (Data Source) + +Use this data source to get Equinix Metal Spot Market Price for a plan. + +## Example Usage + +Lookup by metro: + +{{tffile "examples/data-sources/metal_spot_market_price/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `plan` - (Required) Name of the plan. +* `facility` - (**Deprecated**) Name of the facility. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Name of the metro. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `price` - Current spot market price for given plan in given facility. diff --git a/templates/data-sources/metal_spot_market_request.md.tmpl b/templates/data-sources/metal_spot_market_request.md.tmpl new file mode 100644 index 000000000..2d48268d2 --- /dev/null +++ b/templates/data-sources/metal_spot_market_request.md.tmpl @@ -0,0 +1,54 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_spot_market_request (Data Source) + +Provides an Equinix Metal spot_market_request datasource. The datasource will contain list of device IDs created by referenced Spot Market Request. + +## Example Usage + +{{tffile "examples/data-sources/metal_spot_market_request/example_1.tf"}} + +With the code as `main.tf`, first create the spot market request: + +```shell +terraform apply -target equinix_metal_spot_market_request.req +``` + +When the terraform run ends, run a full apply, and the IPv4 addresses will be printed: + +```shell +$ terraform apply + +[...] + +ips = [ + "947.85.199.231", + "947.85.194.181", +] +``` + +## Argument Reference + +The following arguments are supported: + +* `request_id` - (Required) The id of the Spot Market Request. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `device_ids` - List of IDs of devices spawned by the referenced Spot Market Request. +* `devices_min` - Miniumum number devices to be created. +* `devices_max` - Maximum number devices to be created. +* `max_bid_price` - Maximum price user is willing to pay per hour per device. +* `facilities` - (**Deprecated**) Facility IDs where devices should be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - Metro where devices should be created. +* `project_id` - Project ID. +* `plan` - The device plan slug. +* `end_at` - Date and time When the spot market request will be ended. diff --git a/templates/data-sources/metal_virtual_circuit.md.tmpl b/templates/data-sources/metal_virtual_circuit.md.tmpl new file mode 100644 index 000000000..a52234654 --- /dev/null +++ b/templates/data-sources/metal_virtual_circuit.md.tmpl @@ -0,0 +1,45 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_virtual_circuit (Data Source) + +Use this data source to retrieve a virtual circuit resource from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/) + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +{{tffile "examples/data-sources/metal_virtual_circuit/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `virtual_circuit_id` - (Required) ID of the virtual circuit resource + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `name` - Name of the virtual circuit resource. +* `connection_id` - UUID of Connection where the VC is scoped to. +* `status` - Status of the virtal circuit. +* `port_id` - UUID of the Connection Port where the VC is scoped to. +* `project_id` - ID of project to which the VC belongs. +* `vnid`, `nni_vlan`, `nni_nvid` - VLAN parameters, see the [documentation for Equinix Fabric](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/). +* `description` - Description for the Virtual Circuit resource. +* `tags` - Tags for the Virtual Circuit resource. +* `speed` - Speed of the Virtual Circuit resource. +* `vrf_id` - UUID of the VLAN to associate. +* `peer_asn` - The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF. +* `subnet` - A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. + * For a /31 block, it will only have two IP addresses, which will be used for the metal_ip and customer_ip. + * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. +* `metal_ip` - The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. +* `customer_ip` - The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. +* `md5` - The password that can be set for the VRF BGP peer diff --git a/templates/data-sources/metal_vlan.md.tmpl b/templates/data-sources/metal_vlan.md.tmpl new file mode 100644 index 000000000..00602c352 --- /dev/null +++ b/templates/data-sources/metal_vlan.md.tmpl @@ -0,0 +1,40 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_vlan (Data Source) + +Provides an Equinix Metal Virtual Network datasource. VLANs data sources can be searched by VLAN UUID, or project UUID and vxlan number. + +## Example Usage + +Fetch a vlan by ID: + +{{tffile "examples/data-sources/metal_vlan/example_1.tf"}} + +Fetch a vlan by project ID, vxlan and metro + +{{tffile "examples/data-sources/metal_vlan/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `vlan_id` - (Optional) Metal UUID of the VLAN resource to look up. +* `project_id` - (Optional) UUID of parent project of the VLAN. Use together with the vxlan number and metro or facility. +* `vxlan` - (Optional) vxlan number of the VLAN to look up. Use together with the project_id and metro or facility. +* `facility` - (Optional) Facility where the VLAN is deployed. Deprecated, see https://feedback.equinixmetal.com/changelog/bye-facilities-hello-again-metros +* `metro` - (Optional) Metro where the VLAN is deployed. + +-> **NOTE:** You must set either `vlan_id` or a combination of `vxlan`, `project_id`, and, `metro` or `facility`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `description` - Description text of the VLAN resource. +* `assigned_devices_ids` - List of device ID to which this VLAN is assigned. diff --git a/templates/data-sources/metal_vrf.md.tmpl b/templates/data-sources/metal_vrf.md.tmpl new file mode 100644 index 000000000..a1ab3ac3c --- /dev/null +++ b/templates/data-sources/metal_vrf.md.tmpl @@ -0,0 +1,34 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_virtual_circuit (Data Source) + +Use this data source to retrieve a VRF resource. + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +{{tffile "examples/data-sources/metal_vrf/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `vrf_id` - (Required) ID of the VRF resource + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `name` - User-supplied name of the VRF, unique to the project +* `metro` - Metro ID or Code where the VRF will be deployed. +* `project_id` - Project ID where the VRF will be deployed. +* `description` - Description of the VRF. +* `local_asn` - The 4-byte ASN set on the VRF. +* `ip_ranges` - All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF. diff --git a/templates/data-sources/network_account.md.tmpl b/templates/data-sources/network_account.md.tmpl new file mode 100644 index 000000000..9644fc3a3 --- /dev/null +++ b/templates/data-sources/network_account.md.tmpl @@ -0,0 +1,33 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_account (Data Source) + +Use this data source to get number and identifier of Equinix Network Edge billing account in a given metro location. + +Billing account reference is required to create Network Edge virtual device in corresponding metro location. + +## Example Usage + +{{tffile "examples/data-sources/network_account/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `metro_code` - (Required) Account location metro code. +* `name` - (Optional) Account name for filtering. +* `status` - (Optional) Account status for filtering. Possible values are: `Active`, `Processing`, `Submitted`, `Staged`. +* `project_id` - (Optional) Unique Identifier for the project resource where the account is scoped to.If you leave it out, all the billing accounts under all projects in your organization will be returned and it may return more than one account. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `number` - Account unique number. +* `ucm_id` - Account unique identifier. diff --git a/templates/data-sources/network_device.md.tmpl b/templates/data-sources/network_device.md.tmpl new file mode 100644 index 000000000..433ce43a3 --- /dev/null +++ b/templates/data-sources/network_device.md.tmpl @@ -0,0 +1,72 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_device (Data Source) + +Use this data source to get Equinix Network Edge device details. + +## Example Usage + +{{tffile "examples/data-sources/network_device/example_1.tf"}} + +## Argument Reference + +* `uuid` - (Optional) UUID of an existing Equinix Network Edge device +* `name` - (Optional) Name of an existing Equinix Network Edge device +* `valid_status_list` - (Optional) Device states to be considered valid when searching for a device by name + +NOTE: Exactly one of either `uuid` or `name` must be specified. + +## Attributes Reference + +* `uuid` - Device unique identifier +* `status` - Device provisioning status + * INITIALIZING + * PROVISIONING + * PROVISIONED (**NOTE: By default data source will only return devices in this state. To include other states see `valid_state_list`**) + * WAITING_FOR_PRIMARY + * WAITING_FOR_SECONDARY + * WAITING_FOR_REPLICA_CLUSTER_NODES + * CLUSTER_SETUP_IN_PROGRESS + * FAILED + * DEPROVISIONING + * DEPROVISIONED + * RESOURCE_UPGRADE_IN_PROGRESS + * RESOURCE_UPGRADE_FAILED +* `valid_status_list` - Comma separated list of device states (from see `status` for full list) to be considered valid. Default is 'PROVISIONED'. Case insensitive. +* `license_status` - Device license registration status + * APPLYING_LICENSE + * REGISTERED + * APPLIED + * WAITING_FOR_CLUSTER_SETUP + * REGISTRATION_FAILED + * NA +* `license_file_id` - Unique identifier of applied license file +* `ibx` - Device location Equinix Business Exchange name +* `region` - Device location region +* `acl_template_id` - Unique identifier of applied ACL template +* `ssh_ip_address` - IP address of SSH enabled interface on the device +* `ssh_ip_fqdn` - FQDN of SSH enabled interface on the device +* `redundancy_type` - Device redundancy type applicable for HA devices, either primary or secondary +* `redundant_id` - Unique identifier for a redundant device applicable for HA devices +* `interface` - List of device interfaces + * `interface.#.id` - interface identifier + * `interface.#.name` - interface name + * `interface.#.status` - interface status (AVAILABLE, RESERVED, ASSIGNED) + * `interface.#.operational_status` - interface operational status (up or down) + * `interface.#.mac_address` - interface MAC address + * `interface.#.ip_address` - interface IP address + * `interface.#.assigned_type` - interface management type (Equinix Managed or empty) + * `interface.#.type` - interface type +* `asn` - Autonomous system number +* `zone_code` - Device location zone code +* `cluster_id` - The id of the cluster +* `num_of_nodes` - The number of nodes in the cluster +* `connectivity` - Device accessibility (INTERNET-ACCESS or PRIVATE or INTERNET-ACCESS-WITH-PRVT-MGMT) +* `diverse_device_id` - diverse device uuid +* `diverse_device_name` - Name of the device with diverse device UUID diff --git a/templates/data-sources/network_device_platform.md.tmpl b/templates/data-sources/network_device_platform.md.tmpl new file mode 100644 index 000000000..b371e1332 --- /dev/null +++ b/templates/data-sources/network_device_platform.md.tmpl @@ -0,0 +1,33 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_device_platform (Data Source) + +Use this data source to get Equinix Network Edge device platform configuration details for a given device type. For further details, check supported [Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). + +## Example Usage + +{{tffile "examples/data-sources/network_device_platform/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `device_type` - (Required) Device type code +* `flavor` - (Optional) Device platform flavor that determines number of CPU cores and memory. Supported values are: `small`, `medium`, `large`, `xlarge`. +* `core_count` - (Optional) Number of CPU cores used to limit platform search results. +* `packages` - (Optional) List of software package codes to limit platform search results. +* `management_types` - (Optional) List of device management types to limit platform search results. Supported values are: `EQUINIX-CONFIGURED`, `SELF-CONFIGURED`. +* `license_options` - (Optional) List of device licensing options to limit platform search result. Supported values are: `BYOL` (for Bring Your Own License), `Sub` (for license subscription). + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `memory` - The amount of memory provided by device platform. +* `memory_unit` - Unit of memory provider by device platform. diff --git a/templates/data-sources/network_device_software.md.tmpl b/templates/data-sources/network_device_software.md.tmpl new file mode 100644 index 000000000..09bfb9b2e --- /dev/null +++ b/templates/data-sources/network_device_software.md.tmpl @@ -0,0 +1,35 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_device_software (Data Source) + +Use this data source to get Equinix Network Edge device software details for a given device type. For further details, check supported [Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). + +## Example Usage + +{{tffile "examples/data-sources/network_device_software/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `device_type` - (Required) Code of a device type. +* `version_regex` - (Optional) A regex string to apply on returned versions and filter search results. +* `stable` - (Optional) Boolean value to limit query results to stable versions only. +* `packages` - (Optional) Limits returned versions to those that are supported by given software package codes. +* `most_recent` - (Optional) Boolean value to indicate that most recent version should be used *(in case when more than one result is returned)*. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `version` - Version number. +* `image_name` - Software image name. +* `date` - Version release date. +* `status` - Version status. +* `release_notes_link` - Link to version release notes. diff --git a/templates/data-sources/network_device_type.md.tmpl b/templates/data-sources/network_device_type.md.tmpl new file mode 100644 index 000000000..c80f72c58 --- /dev/null +++ b/templates/data-sources/network_device_type.md.tmpl @@ -0,0 +1,31 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_device_type (Data Source) + +Use this data source to get Equinix Network Edge device type details. For further details, check supported [Network Edge Vendors and Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm). + +## Example Usage + +{{tffile "examples/data-sources/network_device_type/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Optional) Device type name. +* `vendor` - (Optional) Device type vendor i.e. `Cisco`, `Juniper Networks`, `VERSA Networks`. +* `category` - (Optional) Device type category. One of: `Router`, `Firewall`, `SDWAN`. +* `metro_codes` - (Optional) List of metro codes where device type has to be available + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `code` - Device type short code, unique identifier of a network device type +* `description` - Device type textual description diff --git a/templates/guides/equinix_fabric_cloud_providers.md b/templates/guides/equinix_fabric_cloud_providers.md new file mode 100644 index 000000000..4b786fa49 --- /dev/null +++ b/templates/guides/equinix_fabric_cloud_providers.md @@ -0,0 +1,272 @@ +--- +page_title: "Connecting to the cloud with Equinix Fabric via Terraform" +--- + +# Connecting to the cloud with Equinix Fabric via Terraform + +-> **NOTE:** See the [Equinix Fabric](https://docs.equinix.com/en-us/Content/Interconnection/Fabric/Fabric-landing-main.htm) +documentation for more details. + +Equinix Fabric™ is a software-defined interconnection service that allows any business to connect +its own distributed infrastructure to any other company's infrastructure or service provider on +Platform Equinix® across a globally connected network. This guide focuses mainly on establishing an +interconnection to a cloud service provider and how to take advantage of the +[Equinix Fabric connection terraform modules](https://registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection), +for further details and other options you can check on [References](#references) section below. + +## Getting started - Enabling an interconnection + +Whether you are setting up a Multi-Cloud or Hybrid Cloud architecture, the main resource you will +need to define is an [equinix_fabric_connection](../resources/equinix_fabric_connection.md) which +will let Equinix enable an interconnection on your behalf to the specified cloud provider. +However, there are other required resources that must be configured on both Equinix and your cloud +provider to have the interconnection up and running. Below we describe these general steps using +Azure ExpressRoute as an example. + +**1.** Enabling interconnection in the cloud provider - Usually this implies creating a cloud router +and an interconnection asset (e.g. Google Cloud Router and VLAN attachment, Oracle FastConnect, +etc.). For this example it is required an [azurerm_express_route_circuit](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/express_route_circuit) +resource in which the service provider (i.e. `Equinix`) must be specified in order to generate a +valid pairing key. + +```hcl-terraform +provider "azurerm" { + features {} +} + +resource "azurerm_express_route_circuit" "example" { + name = "my-circuit" + resource_group_name = "my-resource-group" + location = "Germany West Central" + service_provider_name = "Equinix" + peering_location = "Frankfurt" + bandwidth_in_mbps = 100 + sku { + tier = "Premium" + family = "UnlimitedData" + } + allow_classic_operations = false +} +``` + +**2.** Request an Equinix Fabric connection - From an +[Equinix Fabric Port](https://docs.equinix.com/en-us/Content/Interconnection/Fabric/ports/Fabric-port-details.htm) / +[Network Edge Device](https://docs.equinix.com/en-us/Content/Interconnection/NE/landing-pages/NE-landing-main.htm) / +[Equinix Service Token](https://docs.equinix.com/en-us/Content/Interconnection/Fabric/service%20tokens/Fabric-Service-Tokens.htm) / +[Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm) +to the cloud virtual interconnection asset. + +In this example, we will establish a connection from a Cloud Router +resource). Note that the value of `authorization_key` must be the `azurerm_express_route_circuit.example.service_key` +(i.e. the pairing key mentioned above). + +```hcl-terraform +provider "equinix" {} + +data "equinix_fabric_service_profile" "azure" { + name = "Azure ExpressRoute" + filter { + property = "/name" + operator = "=" + values = ["Azure ExpressRoute"] + } +} + +resource "equinix_fabric_connection" "fcr2azure"{ + name = "ConnectionName" + type = "IP_VC" + notifications{ + type = "ALL" + emails = ["example@equinix.com","test1@equinix.com"] + } + bandwidth = azurerm_express_route_circuit.example.bandwidth_in_mbps + order { + purchase_order_number = "1-323292" + } + a_side { + access_point { + type = "CLOUD_ROUTER" + router { + uuid = "" + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = azurerm_express_route_circuit.example.service_key + peering_type = "PRIVATE" + profile { + type = "L2_PROFILE" + uuid = data.equinix_fabric_service_profile.azure.data.0.id + } + location { + metro_code = "SV" + } + } + } +} +``` + +**3.** Configure BGP in cloud side - Known as circuit peering or virtual interface, all cloud +providers offer a resource to add a BGP peer. Some commonly required details that need to be +provided are: + +- Customer router IP (your destination router peer IP to which the cloud provider should send +traffic). +- Cloud router IP (virtual router peer IP to send traffic to the cloud). +- Customer BGP ASN (the Border Gateway Protocol Autonomous System Number of your on-premises peer +router). + +For this example, we need to create an `azurerm_express_route_circuit_peering` where the details +for both the primary and secondary connections must be defined. + +```hcl-terraform +resource "azurerm_express_route_circuit_peering" "example" { + express_route_circuit_name = azurerm_express_route_circuit.example.name + resource_group_name = "my-resource-group" + + peering_type = "AzurePrivatePeering" + peer_asn = 100 + primary_peer_address_prefix = "123.0.0.0/30" + secondary_peer_address_prefix = "123.0.0.4/30" + vlan_id = 300 + bandwidth_in_mpbs = 50 +} +``` + +**4.** Configure BGP in Equinix side - Finally the customer side must be configured with the same +information. Since in this example the origin of the connection is a Fabric Cloud Router you can +take advantage of the `equinix_fabric_routing_protocol` resource to configure the BGP peering in the cloud +router. + +```hcl-terraform +resource "equinix_fabric_routing_protocol" "direct"{ + connection_uuid = equinix_fabric_connection.fcr2azure.id + type = "DIRECT" + name = "direct_rp" + direct_ipv4 { + equinix_iface_ip = "190.1.1.1/30" + } + direct_ipv6{ + equinix_iface_ip = "190::1:1/126" + } +} + +resource "equinix_fabric_routing_protocol" "bgp" { + depends_on = [ + equinix_fabric_routing_protocol.direct + ] + connection_uuid = equinix_fabric_connection.fcr2azure.id + type = "BGP" + name = "bgp_rp" + bgp_ipv4 { + customer_peer_ip = "190.1.1.2" + enabled = true + } + bgp_ipv6 { + customer_peer_ip = "190::1:2" + enabled = true + } + customer_asn = 4532 +} +``` + +## Terraform Modules - The easiest way + +Although the configuration will look similar on the Equinix side, all the resources required to +complete the configuration will depend on each cloud provider. This requires you to have prior +knowledge on how to configure the interconnection on each platform. Alternatively, you can take +advantage of the [Equinix Fabric Terraform Modules](https://registry.terraform.io/modules/equinix/fabric/equinix/latest). + +The terraform modules containerize multiple resources that are used together in a configuration. +With the [Equinix Fabric Terraform Cloud Router 2 Azure Connection Example Module](https://registry.terraform.io/modules/equinix/fabric/equinix/latest/examples/cloud-router-2-azure-connection) +and the [Equinix Fabric Terraform Routing Protocols Module](https://registry.terraform.io/modules/equinix/fabric/equinix/latest/examples/routing-protocols) +you can configure all described above by just defining three resources. + +Below code is all you need to fully replace the example above: + +```hcl-terraform +# main.tf +provider "equinix" {} + +provider "azurerm" {} + +module "equinix-fabric-connection-azure" { + source = "equinix/fabric/equinix//examples/cloud-router-2-azure-connection" + + + # Connection Details + connection_name = "fcr_2_azure" + connection_type = "IP_VC" + notifications_type = "ALL" + notifications_emails = ["example@equinix.com","test1@equinix.com"] + purchase_order_number = "1-323292" + bandwidth = 50 + aside_ap_type = "CLOUD_ROUTER" + aside_fcr_uuid = "" + zside_ap_type = "SP" + zside_ap_profile_type = "L2_PROFILE" + zside_location = "SV" + zside_peering_type = "PRIVATE" + zside_fabric_sp_name = "Azure ExpressRoute" + + # Azure details + azure_client_id = "" + azure_client_secret = "" + azure_tenant_id = "" + azure_subscription_id = "" + azure_resource_name = "my-resource-group" + azure_location = "West US 2" + azure_service_key_name = "Test_Azure_Key" + azure_service_provider_name = "" + azure_peering_location = "Silicon Valley Test" + azure_tier = "Standard" + azure_family = "UnlimitedData" + azure_environment = "PROD" +} + +resource "azurerm_express_route_circuit_peering" "example" { + express_route_circuit_name = module.equinix-fabric-connection-azure.azurerm_express_route_circuit_name + resource_group_name = "my-resource-group" + + peering_type = "AzurePrivatePeering" + peer_asn = 100 + primary_peer_address_prefix = "123.0.0.0/30" + secondary_peer_address_prefix = "123.0.0.4/30" + vlan_id = 300 + bandwidth_in_mpbs = 50 +} + +module "routing_protocols" { + source = "equinix/fabric/equinix//modules/routing-protocols" + + connection_uuid = module.equinix-fabric-connection-azure.module_output + + # Direct RP Details + direct_rp_name = "direct_rp" + direct_equinix_ipv4_ip = "190.1.1.1/30" + direct_equinix_ipv6_ip = "190::1:1/126" + + # BGP RP Details + bgp_rp_name = "bgp_rp" + bgp_customer_asn = 4532 + bgp_customer_peer_ipv4 = "190.1.1.2" + bgp_enabled_ipv4 = true + bgp_customer_peer_ipv6 = var.bgp_customer_peer_ipv6 + bgp_enabled_ipv6 = "190::1:2" +} +``` + +- See [Equinix Connectivity Examples on Fabric Modules Page](https://registry.terraform.io/modules/equinix/fabric/equinix/latest) + for information on more Fabric use cases that are supported by Fabric Terraform Modules + +If you don't find one for your cloud provider you can open a ticket in the [github repository](https://github.com/equinix/terraform-provider-equinix/issues) +with your request. + +## References + +- See the [API how to guides](https://developer.equinix.com/docs?page=/dev-docs/fabric/overview) for further +details on each cloud service provider requirements. +- Check the [available providers](https://www.equinix.com/interconnection-services/equinix-fabric/provider-availability) +on Platform Equinix® to find your required service provider. diff --git a/templates/guides/migration_guide_equinix_metal.md b/templates/guides/migration_guide_equinix_metal.md new file mode 100644 index 000000000..84307223a --- /dev/null +++ b/templates/guides/migration_guide_equinix_metal.md @@ -0,0 +1,248 @@ +--- +page_title: "Migrating from the Equinix Metal provider" +--- + +# Migrating from equinix/metal to equinix/equinix + +[Equinix Metal](https://metal.equinix.com/) (formerly Packet), has been fully integrated into Platform Equinix and therefore the terraform provider changes too. This (terraform-provider-equinix, provider equinix/equinix) is the current provider of the various services available on Platform Equinix that can be managed using Terraform. + +If you've been using terraform-provider-metal, and you want to use a newer provider version to manage resources in Equinix Metal, you will need to change the references in you HCL files. You can just change the names of the resources, e.g. from `metal_device` to `equinix_metal_device`. That should work, but it will cause the `metal_device` to be destroyed and new `equinix_metal_device` to be created instead. Re-creation of the resources might be undesirable, and this guide shows how to migrate to `equinix_metal_` resources without the re-creation. + +Before starting to migrate your Terraform templates, please upgrade + +* equinix/metal provider to the latest version (3.2.1) +* Terraform to version at least v0.13 + +## Fast migration with Equinix Migration Tool + +As part of the release v1.5.0, a migration tool has been supplied that will automatically update your `Metal` terraform plans and state files to work with the unified `Equinix` provider. The latest version of the `Equinix Migration Tool` can be found [here](https://github.com/equinix/terraform-provider-equinix/releases/latest). You will need to download the zip file corresponding to your operating system from the `Assets` section. Once unzipped you will find a folder `equinix-migration-tool` with the tool binary. Please, refer to the migration tool [readme file](https://github.com/equinix/terraform-provider-equinix/tree/main/cmd/migration-tool#readme) for further details. + +Once downloaded, you will need to unzip the file and use the binary corresponding to your OS. Running this tool against your terraform project directory will: + +* Transform all the "metal_" resource and datasource definitions and references to the "equinix_" name. +* Transform all "metal" references in .tfstate file to the "equinix" provider name. +* Transform the "metal" provider block and the "required_providers" section to match the latest "equinix" provider version. + +Alternatively, you can make the changes manually following one of the options described below. + +## Fast migration with replace-provider and sed + +Just like the Terraform HCL templates, the Terraform state is a file containing resource names and their attributes in structured text. We can attempt the migration as a text substitution task, basically replacing `metal_` with `equinix_metal_` wherever possible, and fixing the provider source reference. + +It's a good idea to make a backup of the whole Terraform directory before doing this. + +Considering we have infrastructure created from following template: + +```hcl-terraform +terraform { + required_providers { + metal = { + source = "equinix/metal" + } + } +} + +resource "metal_project" "example" { + name = "example" +} + +resource "metal_vlan" "example" { + project_id = metal_project.example.id + facility = "sv15" + description = "example" +} +``` + +We can first change the provider in Terraform state file (`terraform.tfstate`) with `terraform state` subcommand `replace-provider`: + +```shell +terraform state replace-provider equinix/metal equinix/equinix +``` + +Then we replace the provider reference in the HCL templates. Do this for every file where you have the reference: + +```shell +sed -i 's|equinix/metal|equinix/equinix|g' main.tf +``` + +Then we simply replace all strings `metal_` with `equinix_metal_` in the Terraform HCL files. + +```shell +sed -i 's/metal_/equinix_metal_/g' main.tf +``` + +..this is a bit dangerous, so check your `git diff` after. It should replace all the `metal_` prefixes and also the key from the `required_providers` block. + +Then replace `metal_` with `equinix_metal_` in the terraform state file: + +```shell +sed -i 's/metal_/equinix_metal_/g' terraform.tfstate +``` + +The example template would now look as: + +```hcl-terraform +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +resource "equinix_metal_project" "example" { + name = "example" +} + +resource "equinix_metal_vlan" "example" { + project_id = equinix_metal_project.example.id + facility = "sv15" + description = "example" +} +``` + +We then need to install the `equinix/equinix` provider by running `terraform init`. After that, our templates should be in check with the Terraform state and with the upstream resources in Equinix Metal. You can verify the result by running `terraform plan`. + +If the plan is not empty, it means that some resources can not be simply read fom upstream, or that attributes have changed between your version of the `equinix/metal` provider and the current version of the `equinix/equinix` provider. + +## Migrating one resource at a time + +We can use `terraform state` and `terraform import` to achieve transition without destroying existing resources. + +### Existing infrastructure + +We assume to have infrastructure created with provider `equinix/metal` with a device and an IP reservation. The HCL looks like: + +```hcl +terraform { + required_providers { + metal = { + source = "equinix/metal" + version = "3.2.1" + } + } +} + +resource "metal_reserved_ip_block" "example" { + project_id = local.project_id + facility = "sv15" + quantity = 2 +} + +resource "metal_device" "example" { + project_id = local.project_id + facilities = ["sv15"] + plan = "c3.medium.x86" + operating_system = "ubuntu_20_04" + hostname = "test" + billing_cycle = "hourly" + + ip_address { + type = "public_ipv4" + cidr = 31 + reservation_ids = [metal_reserved_ip_block.example.id] + } + + ip_address { + type = "private_ipv4" + } +} +``` + +### Resource UUIDs + +In order to transition to provider `equinix/equinix`, we need to find out UUIDs of all the resources we want to migrate. In this case `metal_reserved_ip_block.example` and `metal_device.example`. We can use `terraform state` to find out the UUIDs. + +For the reserved IP block: + +```shell +$ terraform state show metal_reserved_ip_block.example + +# metal_reserved_ip_block.example: +resource "metal_reserved_ip_block" "example" { + [...] + id = "e689072f-aa6e-4d51-8e37-c2fbe18b4ff0" + [...] +} +``` + +For the device: + +```shell +$ terraform state show metal_device.example + +# metal_device.example +resource "metal_device" "example" { + [...] + id = "8eb3bc10-0e1a-476a-aec2-6dc699df9c1c" + [...] + +``` + +### Migrated template + +Once we find out the UUIDs of resources to migrate, in the HCL template, we need to change: + +* the required_providers block to require `equinix/equinix` +* the names of the resources to corresponding resources from provider `equinix/equinix`: `sed 's/metal_/equinix_metal_'` +* all the references from `metal_` resources to `equinix_metal_` resources + +The modified template will then look as: + +```hcl +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +resource "equinix_metal_reserved_ip_block" "example" { + project_id = local.project_id + facility = "sv15" + quantity = 2 +} + +resource "equinix_metal_device" "example" { + project_id = local.project_id + facilities = ["sv15"] + plan = "c3.medium.x86" + operating_system = "ubuntu_20_04" + hostname = "test" + billing_cycle = "hourly" + + ip_address { + type = "public_ipv4" + cidr = 31 + reservation_ids = [equinix_metal_reserved_ip_block.example.id] + } + + ip_address { + type = "private_ipv4" + } +} +``` + +### Migrating Terraform state + +Once we changed the template accordingly, we can remove the old `metal_` resources from Terraform state and import the new ones as `equinix_metal_` resources by their UUIDs. + +From checking the state before, we remember that UUID of the metal_device.example is 8eb3bc10-0e1a-476a-aec2-6dc699df9c1c, and UUID of the metal_reserved_ip_block.example is e689072f-aa6e-4d51-8e37-c2fbe18b4ff0. + + In the terraform state and import commands, we use the resource type and name, separated by dot: + +```shell +terraform state rm metal_reserved_ip_block.example +terraform import equinix_metal_reserved_ip_block.example e689072f-aa6e-4d51-8e37-c2fbe18b4ff0 +terraform state rm metal_device.example +terraform import equinix_metal_device.example 8eb3bc10-0e1a-476a-aec2-6dc699df9c1c +``` + +We then need to install the `equinix/equinix` provider by running `terraform init`. After that, our templates should be in check with the Terraform state and with the upstream resources in Equinix Metal. We can verify the migration by running `terraform plan`, it should show that infrastructure is up to date. + +## Resolving migration issues + +When we run `terraform plan` to verify that migration was successful, terraform might warn that some resource attributes from templates are not aligned with imported state. It's because not all of the resource attribute can be computed, for example the `ip_address` blocks in `metal_device` are user-defined and will result to a non-empty diff against downloaded imported state. + +In case of the `ip_address`, a consequent `terraform apply` will update the local state without changing the upstream resource, but if an attribute causes an upstream update, you will need to resolve it manually, either changing your template, or letting Terraform change the resource upstream. diff --git a/templates/guides/migration_guide_fabricv3_to_fabricv4.md b/templates/guides/migration_guide_fabricv3_to_fabricv4.md new file mode 100644 index 000000000..f388b5212 --- /dev/null +++ b/templates/guides/migration_guide_fabricv3_to_fabricv4.md @@ -0,0 +1,288 @@ +--- +page_title: "Migrating from Fabric v3 (ecx) to Fabric v4 (fabric)" +--- + +# Migrating from Fabric v3 (ecx) to Fabric v4 (fabric) + +In December 2023, the Fabric v3 APIs were deprecated and they will reach +End of Life (EOL) in June 2024. The `ecx` Terraform Resources are built on those +APIs and will also reach EOL in June 2024. If you are using them this guide +will help you migrate to the `fabric` Terraform Resources that are built +with the Fabric v4 APIs. + +The Fabric v3 Resources are the following data sources and resources: + +Data Sources: +* `data "equinix_ecx_l2_sellerprofile"` +* `data "equinix_ecx_l2_sellerprofiles"` +* `data "equinix_ecx_port"` + +Resources: +* `resource "equinix_ecx_l2_connection"` +* `resource "equinix_ecx_l2_connection_accepter"` +* `resource "equinix_ecx_l2_service_profile"` + +They are being replaced by the family of resources with the +`equinix_fabric_` prefix. + +## Mapping ECX to Fabric + +All ECX resources are limited to Layer 2 Connections. This is due to +the limited amount of possibilities that existed at the time of Fabric v3. +The Fabric v4 APIs allow for Layer 2 and Layer 3 Connections. + +What this means is that the Fabric resources are more robust so there isn't +an exact one to one mapping, but rather that ECX connection types are now +a subset of a Fabric resource. + +### Data Source Mappings: + +* Use `data "equinix_fabric_service_profile"` instead of `data "equinix_ecx_sellerprofile"` +* Use `data "equinix_fabric_service_profiles"` instead of `data "equinix_ecx_sellerprofiles"` +* Use `data "equinix_fabric_port"` instead of `data "equinix_ecx_port"` + +#### Template Changes Would Be: + +Seller Profile: +```hcl +data "equinix_ecx_l2_sellerprofile" "aws" { + name = "AWS Direct Connect" +} + +output "id" { + value = data.equinix_ecx_l2_sellerprofile.aws.id +} +``` +to +```hcl +data "equinix_fabric_service_profile" "aws" { + uuid = "" +} + +output "id" { + value = data.equinix_fabric_service_profile.aws.id +} +``` +or if you still want to search by name you would use the `equinix_fabric_service_profiles` data source +```hcl +data "equinix_fabric_service_profiles" "aws" { + filter { + property = "/name" + operator = "=" + values = ["AWS Direct Connect"] + } +} + +output "id" { + value = data.equinix_fabric_service_profile.aws.data.0.id +} +``` + +Seller Profiles: +```hcl +data "equinix_ecx_l2_sellerprofiles" "aws" { + organization_global_name = "AWS" +} +``` +to +```hcl +data "equinix_fabric_service_profiles" "aws" { + filter { + property = "/name" + operator = "=" + values = ["AWS"] + } +} +``` + +Port: +```hcl +data "equinix_ecx_port" "tf-pri-dot1q" { + name = "sit-001-CX-NY5-NL-Dot1q-BO-10G-PRI-JP-157" +} + +output "id" { + value = data.equinix_ecx_port.tf-pri-dot1q.id +} +``` +to +```hcl +data "equinix_fabric_ports" "tf-pri-dot1q" { + filters { + name = "sit-001-CX-NY5-NL-Dot1q-BO-10G-PRI-JP-157" + } +} + +output "id" { + value = data.equinix_fabric_ports.tf-pri-dot1q.0.id +} +``` + +### Resource Mappings + +* Use `resource "equinix_fabric_connection"` instead of `resource "equinix_ecx_l2_connection"` +* `resource "equinix_ecx_l2_connection_acceptor` is deprecated. + * Add your AWS Secret Key and AWS Access Key to `additional_info` property in `resource "equinix_fabric_connection"` for AWS + * Or use the equivalent resource `aws_dx_connection_confirmation` in the 'AWS' provider instead." +* Use `resource "equinix_fabric_service_profile"` instead of `resource "equinix_ecx_l2_service_profile"` + +#### Template Changes + +L2 Connection: +```hcl +resource "equinix_ecx_l2_connection" "port-2-aws" { + name = "tf-aws" + profile_uuid = "" + speed = 200 + speed_unit = "MB" + notifications = ["marry@equinix.com", "john@equinix.com"] + port_uuid = "" + vlan_stag = 777 + vlan_ctag = 1000 + seller_region = "us-west-1" + seller_metro_code = "SV" + authorization_key = "" +} +``` +to +```hcl +resource "equinix_fabric_connection" "port2aws" { + name = "tf-aws" + type = "EVPL_VC" # L2 Connection + notifications { + type = "ALL" + emails = ["marry@equinix.com", "john@equinix.com"] + } + bandwidth = 200 # Speed unit is defaulted to MB + redundancy { priority= "PRIMARY" } + order { + purchase_order_number= "1-323929" + } + a_side { + access_point { + type= "COLO" + port { + uuid = "" + } + link_protocol { + type = "QINQ" + vlan_s_tag = "777" + vlan_c_tag = "1000" + } + } + } + z_side { + access_point { + type = "SP" + authentication_key = "" + seller_region = "us-west-1" + profile { + type = "L2_PROFILE" + uuid = "" + } + location { + metro_code = "SV" + } + } + } + + additional_info = [ + { key = "accessKey", value = "" }, + { key = "secretKey", value = "" } + ] +} +``` + +Service Profile: +```hcl +resource "equinix_ecx_l2_serviceprofile" "private-profile" { + name = "private-profile" + description = "my private profile" + connection_name_label = "Connection" + bandwidth_threshold_notifications = ["John.Doe@example.com", "Marry.Doe@example.com"] + profile_statuschange_notifications = ["John.Doe@example.com", "Marry.Doe@example.com"] + vc_statuschange_notifications = ["John.Doe@example.com", "Marry.Doe@example.com"] + private = true + private_user_emails = ["John.Doe@example.com", "Marry.Doe@example.com"] + features { + allow_remote_connections = true + test_profile = false + } + port { + uuid = "a867f685-422f-22f7-6de0-320a5c00abdd" + metro_code = "NY" + } + port { + uuid = "a867f685-4231-2317-6de0-320a5c00abdd" + metro_code = "NY" + } + speed_band { + speed = 1000 + speed_unit = "MB" + } + speed_band { + speed = 500 + speed_unit = "MB" + } + speed_band { + speed = 100 + speed_unit = "MB" + } +} +``` +to +```hcl +resource "equinix_fabric_service_profile" "private-profile" { + name = "private-profile" + description = "my private profile" + type = "L2_PROFILE" # Need to specify to make it an Layer 2 Profile + visibility = "PRIVATE" + notifications = [ + { + emails = ["John.Doe@example.com", "Marry.Doe@example.com"] + type = "BANDWIDTH_ALERT" + }, + { + emails = ["John.Doe@example.com", "Marry.Doe@example.com"] + type = "PROFILE_LIFECYCLE" + }, + { + emails = ["John.Doe@example.com", "Marry.Doe@example.com"] + type = "CONNECTION_APPROVAL" + } + ] + allowed_emails = ["John.Doe@example.com", "Marry.Doe@example.com"] + ports = [ + { + uuid = "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee" + type = "XF_PORT" + }, + { + uuid = "a867f685-4231-2317-6de0-320a5c00abdd" + type = "XF_PORT" + } + ] + + access_point_type_configs { + type = "COLO" + allow_remote_connections = true + connection_label = "Connection" + supported_bandwidths = [ 100, 500, 1000 ] + } +} +``` + + +## Migrating Terraform State + +Once we changed the template accordingly, we can remove the old `equinix_ecx_` resources from Terraform state and import the new ones as `equinix_fabric_` resources by their UUIDs. + +In the terraform state and import commands, we use the resource type and name, separated by dot: +```bash +terraform state rm equinix_ecx_l2_connection.example +terraform import equinix_fabric_connection.example +``` + +After that, our templates should be in check with the Terraform state and with the upstream resources in Equinix Fabric. We can verify the migration by running terraform plan, it should show that infrastructure is up to date. + + diff --git a/templates/guides/migration_guide_facilities_to_metros_devices.md b/templates/guides/migration_guide_facilities_to_metros_devices.md new file mode 100644 index 000000000..46d5d3c00 --- /dev/null +++ b/templates/guides/migration_guide_facilities_to_metros_devices.md @@ -0,0 +1,64 @@ +--- +page_title: "Migrating devices from facilities to metros" +--- + +# Metros vs. Facilities + +In April 2021, [Equinix Metal](https://metal.equinix.com/) rolled out a new location concept - [metros](https://feedback.equinixmetal.com/changelog/new-metros-feature-live). A metro is an Equinix-wide concept for data centers which are grouped together geographically. Data centers within a metro share capacity and networking features. You can read more about metros at https://metal.equinix.com/developers/docs/locations/metros/. In April 2023, [facility deployment was deprecated](https://feedback.equinixmetal.com/changelog/bye-facilities-hello-again-metros) with metro provisioning offered as an all-around superior deployment strategy. See the [facilities guide in the Metal API docs](https://deploy.equinix.com/developers/docs/metal/locations/facilities/) for more details about the API change. + +Before the introduction of metros, resources were deployed to a single `facility` location. When provisioning `equinix_metal_device` resources, the facility could be chosen by Equinix Metal with a user-supplied list of `facilities`, or a wildcard `any` facility. The individual facility locations use a code like "sv15" or "ny5". Metros group facilities. For example, metro "sv" contains the "sv15" facility, among others. If you specify a metro when creating a resource, it will be deployed to one of the facilities in the metro group. You can then find the deployed facility using a read-only attribute of the resource (e.g. `deployed_facility` for `equinix_metal_device` resources). + +## Changing your Terraform templates to use metros instead of facilities + +To take advantage of some of the features of the metro, you might want to change the configuration of your Terraform templates so that the devices have `metro` specified instead of `facilities`. As both of the `metro` and `facilities` are ForceNew parameters (a change will trigger re-creation of the resource), you should be cautious if you don't want to have the device destroyed. + +We updated the `equinix_metal_device` resource so that the change should be seamless, but please proceed with care. The `metro` parameter is also a computed attribute, and if you use newer provider version than 3.2.1, the `metro` attribute is actually present in your resource. You then only need to add it explicitly to your configuration. + +The `facilities` parameter is only used for facility selection when creating the device resource. The actual facility where the device is deployed is in the `deployed_facility` Computed attribute. + +If you only want to change the `equinix_metal_device` resource specfication from facility-based to metro-based, e.g. from facilities ["sv15"] to metro "sv", it's enough to remove the `facilities` attribute, and add the `metro` attribute. + +For example, given following configuration of a device deployed in the `sv15` facility: + +```hcl-terraform +resource "equinix_metal_device" "node" { + project_id = local.project_id + facilities = ["sv15"] + plan = "c3.small.x86" + operating_system = "ubuntu_16_04" + hostname = "test" + billing_cycle = "hourly" +} +``` + +.. you can remove `faclities` and add `metro`, changing the configuration to: + + +```hcl-terraform +resource "equinix_metal_device" "node" { + project_id = local.project_id + metro = "sv" + plan = "c3.small.x86" + operating_system = "ubuntu_16_04" + hostname = "test" + billing_cycle = "hourly" +} +``` + +To test that the change didn't taint the state, and that the device will not be re-created, you can check if `terraform plan` reports any differences. The terraform state should be up to date as long as the facility in which the device was deployed was contained within the metro. + +If the plan diff is not empty, you might have used a metro not containing the facility to which the device was deployed. This might happen if you've used more facilities in the `facilities` list, or you have used the special "any" facility. + +You can find out the deployed facility, and the containing metro by examining the terraform state of the `equinix_metal_device` resource: + +``` +$ terraform state show equinix_metal_device.node | grep deployed + deployed_facility = "sv15" +``` + +``` +$ terraform state show equinix_metal_device.node | grep metro + metro = "sv" +``` + +You should then set the existing metro in your Terraform templates. diff --git a/templates/guides/migration_guide_packet.md b/templates/guides/migration_guide_packet.md new file mode 100644 index 000000000..fef8d0e3c --- /dev/null +++ b/templates/guides/migration_guide_packet.md @@ -0,0 +1,248 @@ +--- +page_title: "Migrating from the Packet provider" +--- + +# Migrating from packethost/packet to equinix/equinix + +[Equinix Metal](https://metal.equinix.com/) (formerly Packet), has been fully integrated into Platform Equinix and therefore the terraform provider changes too. This (terraform-provider-equinix, provider equinix/equinix) is the current provider of the various services available on Platform Equinix that can be managed using Terraform. + +If you've been using terraform-provider-packet, and you want to use a newer provider version to manage resources in Equinix Metal, you will need to change the references in you HCL files. You can just change the names of the resources, e.g. from `packet_device` to `equinix_metal_device`. That should work, but it will cause the `packet_device` to be destroyed and new `equinix_metal_device` to be created instead. Re-creation of the resources might be undesirable, and this guide shows how to migrate to `equinix_metal_` resources without the re-creation. + +Before starting to migrate your Terraform templates, please upgrade + +* packethost/packet provider to the latest version (3.2.1) +* Terraform to version at least v0.13 + +## Fast migration with Equinix Migration Tool + +As part of the release v1.5.0, a migration tool has been supplied that will automatically update your `Packet` terraform plans and state files to work with the unified `Equinix` provider. The latest version of the `Equinix Migration Tool` can be found [here](https://github.com/equinix/terraform-provider-equinix/releases/tag/v1.5.0). You will need to download the zip file corresponding to your operating system from the `Assets` section. Once unzipped you will find a folder `equinix-migration-tool` with the tool binary. Please, refer to the migration tool [readme file](https://github.com/equinix/terraform-provider-equinix/tree/v1.5.0/cmd/migration-tool#readme) for further details. + +Once downloaded, you will need to unzip the file and use the binary corresponding to your OS. Running this tool against your terraform project directory will: + +* Transform all the "packet_" resource and datasource definitions and references to the "equinix_" name. +* Transform all "packet" references in .tfstate file to the "equinix" provider name. +* Transform the "packet" provider block and the "required_providers" section to match the latest "equinix" provider version. + +Alternatively, you can make the changes manually following one of the options described below. + +## Fast migration with replace-provider and sed + +Just like the Terraform HCL templates, the Terraform state is a file containing resource names and their attributes in structured text. We can attempt the migration as a text substitution task, basically replacing `packet_` with `equinix_metal_` wherever possible, and fixing the provider source reference. + +It's a good idea to make a backup of the whole Terraform directory before doing this. + +Considering we have infrastructure created from following template: + +```hcl-terraform +terraform { + required_providers { + packet = { + source = "packethost/packet" + } + } +} + +resource "packet_project" "example" { + name = "example" +} + +resource "packet_vlan" "example" { + project_id = packet_project.example.id + facility = "sv15" + description = "example" +} +``` + +We can first change the provider in Terraform state file (`terraform.tfstate`) with `terraform state` subcommand `replace-provider`: + +```shell +terraform state replace-provider packethost/packet equinix/equinix +``` + +Then we replace the provider reference in the HCL templates. Do this for every file where you have the reference: + +```shell +sed -i 's|packethost/packet|equinix/equinix|g' main.tf +``` + +Then we simply replace all strings `packet_` with `equinix_metal_` in the Terraform HCL files. + +```shell +sed -i 's/packet_/equinix_metal_/g' main.tf +``` + +..this is a bit dangerous, so check your `git diff` after. It should replace all the `packet_` prefixes and also the key from the `required_providers` block. + +Then replace `packet_` with `equinix_metal_` in the terraform state file: + +```shell +sed -i 's/packet_/equinix_metal_/g' terraform.tfstate +``` + +The example template would now look as: + +```hcl-terraform +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +resource "equinix_metal_project" "example" { + name = "example" +} + +resource "equinix_metal_vlan" "example" { + project_id = equinix_metal_project.example.id + facility = "sv15" + description = "example" +} +``` + +We then need to install the `equinix/equinix` provider by running `terraform init`. After that, our templates should be in check with the Terraform state and with the upstream resources in Equinix Metal. You can verify the result by running `terraform plan`. + +If the plan is not empty, it means that some resources can not be simply read fom upstream, or that attributes have changed between your version of the `packethost/packet` provider and the current version of the `equinix/equinix` provider. + +## Migrating one resource at a time + +We can use `terraform state` and `terraform import` to achieve transition without destroying existing resources. + +### Existing infrastructure + +We assume to have infrastructure created with provider `packethost/packet` with a device and an IP reservation. The HCL looks like: + +```hcl +terraform { + required_providers { + packet = { + source = "packethost/packet" + version = "3.2.1" + } + } +} + +resource "packet_reserved_ip_block" "example" { + project_id = local.project_id + facility = "sv15" + quantity = 2 +} + +resource "packet_device" "example" { + project_id = local.project_id + facilities = ["sv15"] + plan = "c3.medium.x86" + operating_system = "ubuntu_20_04" + hostname = "test" + billing_cycle = "hourly" + + ip_address { + type = "public_ipv4" + cidr = 31 + reservation_ids = [packet_reserved_ip_block.example.id] + } + + ip_address { + type = "private_ipv4" + } +} +``` + +### Resource UUIDs + +In order to transition to provider `equinix/equinix`, we need to find out UUIDs of all the resources we want to migrate. In this case `packet_reserved_ip_block.example` and `packet_device.example`. We can use `terraform state` to find out the UUIDs. + +For the reserved IP block: + +```shell +$ terraform state show packet_reserved_ip_block.example + +# packet_reserved_ip_block.example: +resource "packet_reserved_ip_block" "example" { + [...] + id = "e689072f-aa6e-4d51-8e37-c2fbe18b4ff0" + [...] +} +``` + +For the device: + +```shell +$ terraform state show packet_device.example + +# packet_device.example +resource "packet_device" "example" { + [...] + id = "8eb3bc10-0e1a-476a-aec2-6dc699df9c1c" + [...] + +``` + +### Migrated template + +Once we find out the UUIDs of resources to migrate, in the HCL template, we need to change: + +* the required_providers block to require `equinix/equinix` +* the names of the resources to corresponding resources from provider `equinix/equinix`: `sed 's/packet_/equinix_metal_'` +* all the references from `packet_` resources to `equinix_metal_` resources + +The modified template will then look as: + +```hcl +terraform { + required_providers { + equinix = { + source = "equinix/equinix" + } + } +} + +resource "equinix_metal_reserved_ip_block" "example" { + project_id = local.project_id + facility = "sv15" + quantity = 2 +} + +resource "equinix_metal_device" "example" { + project_id = local.project_id + facilities = ["sv15"] + plan = "c3.medium.x86" + operating_system = "ubuntu_20_04" + hostname = "test" + billing_cycle = "hourly" + + ip_address { + type = "public_ipv4" + cidr = 31 + reservation_ids = [equinix_metal_reserved_ip_block.example.id] + } + + ip_address { + type = "private_ipv4" + } +} +``` + +### Migrating Terraform state + +Once we changed the template accordingly, we can remove the old `packet_` resources from Terraform state and import the new ones as `equinix_metal_` resources by their UUIDs. + +From checking the state before, we remember that UUID of the packet_device.example is 8eb3bc10-0e1a-476a-aec2-6dc699df9c1c, and UUID of the packet_reserved_ip_block.example is e689072f-aa6e-4d51-8e37-c2fbe18b4ff0. + + In the terraform state and import commands, we use the resource type and name, separated by dot: + +```shell +terraform state rm packet_reserved_ip_block.example +terraform import equinix_metal_reserved_ip_block.example e689072f-aa6e-4d51-8e37-c2fbe18b4ff0 +terraform state rm packet_device.example +terraform import equinix_metal_device.example 8eb3bc10-0e1a-476a-aec2-6dc699df9c1c +``` + +We then need to install the `equinix/equinix` provider by running `terraform init`. After that, our templates should be in check with the Terraform state and with the upstream resources in Equinix Metal. We can verify the migration by running `terraform plan`, it should show that infrastructure is up to date. + +## Resolving migration issues + +When we run `terraform plan` to verify that migration was successful, terraform might warn that some resource attributes from templates are not aligned with imported state. It's because not all of the resource attribute can be computed, for example the `ip_address` blocks in `packet_device` are user-defined and will result to a non-empty diff against downloaded imported state. + +In case of the `ip_address`, a consequent `terraform apply` will update the local state without changing the upstream resource, but if an attribute causes an upstream update, you will need to resolve it manually, either changing your template, or letting Terraform change the resource upstream. diff --git a/templates/guides/network_types.md b/templates/guides/network_types.md new file mode 100644 index 000000000..5851b70c5 --- /dev/null +++ b/templates/guides/network_types.md @@ -0,0 +1,221 @@ +--- +page_title: "Metal Device Network Types" +--- + + +# Network types + +Server network types, such as Layer-2, Layer-3, and Hybrid may be familiar to users of the Equinix Metal Portal. In the Portal, you can toggle the network type with a click of the UI. To take advantage of these features in Terraform, which closely follows the Equinix Metal API, it is important to understand that the network type is a composite string value determined by one or more port bonding, addressing, and VLAN attachment configurations. To change the network type, you must change these underlying properties of the port(s). + +For more details, see the Equinix Metal documentation on [Network Configuration Types](https://metal.equinix.com/developers/docs/layer2-networking/overview/#network-configuration-types). + +This Terraform provider offers two ways to define the network type. + +* [`equinix_metal_port`](#Metal-Port) +* [`equinix_metal_device_network_type`](#Metal-Device-Network-Type) + +## Metal Port + +The [`equinix_metal_port`](../resources/metal_port.md) resource exposes all of the features needed to affect the network type of a device or port pairing. + +Following are examples of how the `equinix_metal_port` resource can be used to configure various network types, assuming that `local.bond0_id` is the UUID of the bond interface containing `eth1` and `local.eth1_id` is the UUID of the `eth1` interface. These could represent the ports of `equinix_metal_device` resources or data sources. + +### Layer 3 Port + +Layer-3 (Bonded) is the default port configuration on Equinix Metal devices. The following is provided to illustrate the usage of the `equinix_metal_port` resource. This HCL should not be needed in practice, however it may be useful in some configurations to assert the correct mode is set, port by port, on imported `equinix_metal_device` resources or data-sources. + +```hcl +resource "equinix_metal_port" "bond0" { + port_id = local.bond0_id + bonded = true +} + +resource "equinix_metal_port" "eth1" { + port_id = local.eth1_id + bonded = true +} +``` + +### Layer 2 Unbonded Port + +This example configures an Equinix Metal server with a [pure layer 2 unbonded](https://deploy.equinix.com/developers/docs/metal/layer2-networking/layer2-mode/#:~:text=Layer%202%20Unbonded%20Mode) network configuration and adds two VLANs to its `eth1` port; one of them set as the [native VLAN](https://deploy.equinix.com/developers/docs/metal/layer2-networking/native-vlan/). Notice the `depends_on` meta-argument in the `equinix_metal_port.eth1` resource and the `reset_on_delete` attribute in both ports’ configuration. The `reset_on_delete` will set the port to the default settings (layer3 bonded without VLANs attached) before the terraform resource delete/destroy. It is recommended to use the `depends_on` argument here to ensure that the port resources with attached VLANs are reset first, since all VLANs must be detached before re-bonding the ports. + +```hcl +resource "equinix_metal_port" "bond0" { + port_id = local.bond0_id + layer2 = true + bonded = false + reset_on_delete = true +} + +resource "equinix_metal_port" "eth1" { + port_id = local.eth1_id + bonded = false + reset_on_delete = true + vlan_ids = [equinix_metal_vlan.test1.id, equinix_metal_vlan.test2.id] + native_vlan_id = equinix_metal_vlan.test1.id + depends_on = [ + equinix_metal_port.bond0, + ] +} + +resource "equinix_metal_vlan" "test1" { + description = "test" + metro = "sv" + project = equinix_metal_project.test.id +} + +resource "equinix_metal_vlan" "test2" { + description = "test" + metro = "sv" + project = equinix_metal_project.test.id +} +``` + +### Layer 2 Bonded Port + +```hcl +resource "equinix_metal_port" "bond0" { + port_id = local.bond0_id + layer2 = true + bonded = true +} +``` + +### Hybrid Unbonded Port + +```hcl +resource "equinix_metal_port" "eth1" { + port_id = local.eth1_id + bonded = false +} +``` + +### Hybrid Bonded Port + +```hcl +resource "equinix_metal_port" "bond0" { + port_id = local.bond0_id + layer2 = false + bonded = true + vlan_ids = [equinix_metal_vlan.test.id] +} + +resource "equinix_metal_vlan" "test" { + description = "test" + metro = "sv" + project = equinix_metal_project.test.id +} +``` + +### Accessing Port IDs + +The port ID value can be obtained from a `equinix_metal_device` using a [`for` expression](https://www.terraform.io/docs/language/expressions/for.html). + +Assuming a `equinix_metal_device` exists with the resource name `test`: + +```hcl +locals { + bond0_id = [for p in equinix_metal_device.test.ports: p.id if p.name == "bond0"][0] + eth1_id = [for p in equinix_metal_device.test.ports: p.id if p.name == "eth1"][0] +} +``` + +## Metal Device Network Type + +The [`equinix_metal_device_network_type`](../resources/metal_device_network_type.md) takes a named network type with any mode required parameters and converts a device to the named network type. This resource simulated the network type interface for Devices in the Equinix Metal Portal. That interface changed when additional network types were introduced with more diverse port configurations. + +When using this resource, keep in mind: + +* this resource is not guaranteed to work in devices with more than two ethernet ports +* it may not be able to express all possible port configurations +* subsequent changes to the network configuration may cause this device to detect changes that can not be reconciled without intervention +* `equinix_metal_device_network_type` resources should not be used on devices with ports being controlled with `equinix_metal_port` resources + +### Hybrid (Unbonded) Device + +This example create one c3.small device and puts it into [hybrid (unbonded) network mode](https://metal.equinix.com/developers/docs/layer2-networking/hybrid-unbonded-mode/). + +```hcl +resource "equinix_metal_device" "test" { + hostname = "tfacc-device-port-vlan-attachment-test" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} + +resource "equinix_metal_device_network_type" "test" { + device_id = equinix_metal_device.test.id + type = "hybrid" +} +``` + +### Hybrid (Unbonded) Device with a VLAN + +This example create two devices in [hybrid (unbonded) mode](https://metal.equinix.com/developers/docs/layer2-networking/hybrid-unbonded-mode/) and adds a VLAN to their eth1 ports. + +```hcl +locals { + project_id = "" + device_count = 2 +} + +resource "equinix_metal_vlan" "test" { + metro = "ny" + project_id = local.project_id +} + + +resource "equinix_metal_device" "test" { + count = local.device_count + hostname = "test${count.index}" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} + +resource "equinix_metal_device_network_type" "test" { + count = local.device_count + device_id = equinix_metal_device.test[count.index].id + type = "hybrid" +} + + +resource "equinix_metal_port_vlan_attachment" "test" { + count = local.device_count + device_id = equinix_metal_device_network_type.test[count.index].id + port_name = "eth1" + vlan_vnid = equinix_metal_vlan.test.vxlan +} +``` + +### Hybrid (Bonded) Device + +This example create one c3.small device and puts it into [hybrid-bonded network mode](https://metal.equinix.com/developers/docs/layer2-networking/hybrid-bonded-mode/). Notice, the default network type of `layer3` can be used with VLAN attachments without reconfiguring the device ports. + +```hcl +resource "equinix_metal_device" "test" { + hostname = "tfacc-device-port-vlan-attachment-test" + plan = "c3.small.x86" + metro = "ny" + operating_system = "ubuntu_20_04" + billing_cycle = "hourly" + project_id = local.project_id +} + +resource "equinix_metal_vlan" "test" { + metro = "ny" + project_id = local.project_id +} + +resource "equinix_metal_port_vlan_attachment" "test" { + count = local.device_count + device_id = equinix_metal_device.test.id + port_name = "bond0" + vlan_vnid = equinix_metal_vlan.test.vxlan +} +``` diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl new file mode 100644 index 000000000..b7468c9c3 --- /dev/null +++ b/templates/index.md.tmpl @@ -0,0 +1,51 @@ +--- +page_title: "{{.RenderedProviderName}} Provider" +--- + +# {{.RenderedProviderName}} Provider + +The Equinix provider is used to interact with the resources provided by Equinix Platform. The provider needs to be configured with the proper credentials before it can be used. + +For information about obtaining API key and secret required for Equinix Fabric and Network Edge refer to [Generating Client ID and Client Secret key](https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#generating-client-id-and-client-secret) from [Equinix Developer Platform portal](https://developer.equinix.com). + +Interacting with Equinix Metal requires an API auth token that can be generated at [Project-level](https://metal.equinix.com/developers/docs/accounts/projects/#api-keys) or [User-level](https://metal.equinix.com/developers/docs/accounts/users/#api-keys) tokens can be used. + +If you are only using Equinix Metal resources, you may omit the Client ID and Client Secret provider configuration parameters needed to access other Equinix resource types (Network Edge, Fabric, etc). + +Use the navigation to the left to read about the available resources. + +## Example Usage + +Example HCL with [provider configuration](https://www.terraform.io/docs/configuration/providers.html) and a [required providers definition](https://www.terraform.io/language/settings#specifying-a-required-terraform-version): + +{{tffile "examples/example_1.tf"}} + +Client ID and Client Secret can be omitted when the only Equinix resources consumed are Equinix Metal resources. + +{{tffile "examples/example_2.tf"}} + +Example provider configuration using `environment variables`: + +```sh +export EQUINIX_API_CLIENTID=someEquinixAPIClientID +export EQUINIX_API_CLIENTSECRET=someEquinixAPIClientSecret +export METAL_AUTH_TOKEN=someEquinixMetalToken +``` + +### Token Authentication + +Token's can be generated for the API Client using the OAuth2 Token features described in the [OAuth2 API](https://developer.equinix.com/catalog/accesstokenv1#operation/GetOAuth2AccessToken) documentation. + +API tokens can be provided using the `token` provider argument, or the `EQUINIX_API_TOKEN` evironment variable. The `client_id` and `client_secret` arguments will be ignored in the presence of a `token` argument. + +When testing against the [Equinix Sandbox API](https://developer.equinix.com/environment/sandbox), tokens must be used. + +{{tffile "examples/example_3.tf"}} + +## Argument Reference + +The Equinix provider requires a few basic parameters. While the authentication arguments are individually optionally, either `token` or `client_id` and `client_secret` must be defined through arguments or environment settings to interact with Equinix Fabric and Network Edge services, and `auth_token` to interact with Equinix Metal. + +These parameters can be provided in [Terraform variable files](https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files) or as environment variables. Nevertheless, please note that it is [not recommended to keep sensitive data in plain text files](https://www.terraform.io/docs/state/sensitive-data.html). + +{{ .SchemaMarkdown | trimspace }} diff --git a/templates/resources.md.tmpl b/templates/resources.md.tmpl new file mode 100644 index 000000000..0923c64ed --- /dev/null +++ b/templates/resources.md.tmpl @@ -0,0 +1,27 @@ +--- +{{ if eq (index (split .Name "_") 1) "network" -}} +subcategory: "Network Edge" +{{- else -}} +subcategory: "{{ title (index (split .Name "_") 1) }}" +{{- end }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +{{tffile .ExampleFile }} +{{- end }} + +{{ .SchemaMarkdown | trimspace }} +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} +{{- end }} diff --git a/templates/resources/fabric_cloud_router.md.tmpl b/templates/resources/fabric_cloud_router.md.tmpl new file mode 100644 index 000000000..488a2a39b --- /dev/null +++ b/templates/resources/fabric_cloud_router.md.tmpl @@ -0,0 +1,150 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_cloud_router Resource - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric Cloud Router +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_cloud_router (Resource) + +Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks). + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers + +## Example Usage + +{{tffile "examples/resources/fabric_cloud_router/example_1.tf"}} + + + +## Schema + +### Required + +- `account` (Block Set, Min: 1, Max: 1) Customer account information that is associated with this Fabric Cloud Router (see [below for nested schema](#nestedblock--account)) +- `location` (Block Set, Min: 1, Max: 1) Fabric Cloud Router location (see [below for nested schema](#nestedblock--location)) +- `name` (String) Fabric Cloud Router name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `notifications` (Block List, Min: 1) Preferences for notifications on Fabric Cloud Router configuration or status changes (see [below for nested schema](#nestedblock--notifications)) +- `package` (Block Set, Min: 1, Max: 1) Fabric Cloud Router Package Type (see [below for nested schema](#nestedblock--package)) +- `project` (Block Set, Min: 1, Max: 1) Customer resource hierarchy project information. Applicable to customers onboarded to Equinix Identity and Access Management. For more information see Identity and Access Management: Projects (see [below for nested schema](#nestedblock--project)) +- `type` (String) Defines the FCR type like; XF_ROUTER + +### Optional + +- `description` (String) Customer-provided Fabric Cloud Router description +- `href` (String) Fabric Cloud Router URI information +- `order` (Block Set, Min: 1, Max: 1) Order information related to this Fabric Cloud Router (see [below for nested schema](#nestedblock--order)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `uuid` (String) Equinix-assigned Fabric Cloud Router identifier + +### Read-Only + +- `bgp_ipv4_routes_count` (Number) Number of IPv4 BGP routes in use (including non-distinct prefixes) +- `bgp_ipv6_routes_count` (Number) Number of IPv6 BGP routes in use (including non-distinct prefixes) +- `change_log` (Set of Object) Captures Fabric Cloud Router lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `connections_count` (Number) Number of connections associated with this Fabric Cloud Router instance +- `distinct_ipv4_prefixes_count` (Number) Number of distinct IPv4 routes +- `distinct_ipv6_prefixes_count` (Number) Number of distinct IPv6 routes +- `equinix_asn` (Number) Equinix ASN +- `id` (String) The ID of this resource. +- `state` (String) Fabric Cloud Router overall state + + + +### Nested Schema for `account` + +Optional: + +- `account_number` (Number) Account Number + + + +### Nested Schema for `location` + +Optional: + +- `ibx` (String) IBX Code +- `metro_code` (String) Access point metro code +- `metro_name` (String) Access point metro name +- `region` (String) Access point region + + + +### Nested Schema for `notifications` + +Required: + +- `emails` (List of String) Array of contact emails +- `type` (String) Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS + +Optional: + +- `send_interval` (String) Send interval + + + +### Nested Schema for `order` + +Optional: + +- `purchase_order_number` (String) Purchase order number + +Read-Only: + +- `billing_tier` (String) Billing tier for connection bandwidth +- `order_id` (String) Order Identification +- `order_number` (String) Order Reference Number + + + +### Nested Schema for `package` + +Required: + +- `code` (String) Fabric Cloud Router package code + + + +### Nested Schema for `project` + +Optional: + +- `href` (String) Unique Resource URL +- `project_id` (String) Project Id + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) diff --git a/templates/resources/fabric_connection.md.tmpl b/templates/resources/fabric_connection.md.tmpl new file mode 100644 index 000000000..0851bdb35 --- /dev/null +++ b/templates/resources/fabric_connection.md.tmpl @@ -0,0 +1,667 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_connection Resource - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_connection (Resource) + +Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections + +## Supporting Modules + +The direct usage of the resources is given in the next section "Example Usage". We also have supporting Terraform Modules that can be used to assist you with common Fabric Connection use cases. + +You can find those modules along with their usage examples on the [Terraform Registry: (Fabric Terraform Modules)](https://registry.terraform.io/modules/equinix/fabric/equinix/latest) + +## Example Usage + +Port to Port EVPL_VC Connection: + +{{tffile "examples/resources/fabric_connection/example_1.tf"}} + +Port to AWS EVPL_VC Connection: + +{{tffile "examples/resources/fabric_connection/example_2.tf"}} + +Port to Port EPL Connection: + +{{tffile "examples/resources/fabric_connection/example_3.tf"}} + +Port to Port ACCESS_EPL_VC Connection: + +{{tffile "examples/resources/fabric_connection/example_4.tf"}} + +Virtual Device to Port Connection: + +{{tffile "examples/resources/fabric_connection/example_5.tf"}} + +Virtual Device to Service Token Connection: + +{{tffile "examples/resources/fabric_connection/example_6.tf"}} + +Service Token to AWS Connection: + +{{tffile "examples/resources/fabric_connection/example_7.tf"}} + +Cloud Router to Port Connection: + +{{tffile "examples/resources/fabric_connection/example_8.tf"}} + +Cloud Router to Azure Connection: + +{{tffile "examples/resources/fabric_connection/example_9.tf"}} + +Virtual Device to Azure Connection: + +{{tffile "examples/resources/fabric_connection/example_10.tf"}} + +Virtual Device to Azure Redundant Connection: + +{{tffile "examples/resources/fabric_connection/example_11.tf"}} + +Cloud Router to Network Connection: + +{{tffile "examples/resources/fabric_connection/example_12.tf"}} + +Virtual Device to Network Connection: + +{{tffile "examples/resources/fabric_connection/example_13.tf"}} + +EPLAN Port to Network Connection: + +{{tffile "examples/resources/fabric_connection/example_14.tf"}} + +EVPLAN Port to Network Connection: + +{{tffile "examples/resources/fabric_connection/example_15.tf"}} + +### Notes: + +Port to IBM Connections could be modified from IBM Service Provider Side by using parameters passed to additional_info field: +* `{"key": "ASN", "value": "1111"}` +* `{"key": "Global", "value": "false"}` +* `{"key": "BGP_IBM_CIDR", "value": "172.16.0.18/30"}` +* `{"key": "BGP_CER_CIDR", "value": "172.16.0.19/30"}` + +To accept, delete, or upgrade bandwidth for IBM Connections using the 'ibm_dl_gateway_action' resource, you must update the following attribute: For Connection Approval: +- Use action = "create_gateway_approve" For Bandwidth Upgrade/Downgrade: +- Use action = "update_attributes_approve" For Connection Deletion: +- Use action = "delete_gateway_approve" + + + +## Schema + +### Required + +- `a_side` (Block Set, Min: 1, Max: 1) Requester or Customer side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedblock--a_side)) +- `bandwidth` (Number) Connection bandwidth in Mbps +- `name` (String) Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `notifications` (Block List, Min: 1) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedblock--notifications)) +- `type` (String) Defines the connection type like EVPL_VC, EPL_VC, IPWAN_VC, IP_VC, ACCESS_EPL_VC, EVPLAN_VC, EPLAN_VC, EIA_VC, EC_VC +- `z_side` (Block Set, Min: 1, Max: 1) Destination or Provider side connection configuration object of the multi-segment connection (see [below for nested schema](#nestedblock--z_side)) + +### Optional + +- `additional_info` (List of Map of String) Connection additional information +- `description` (String) Customer-provided connection description +- `order` (Block Set, Min: 1, Max: 1) Order details (see [below for nested schema](#nestedblock--order)) +- `project` (Block Set, Max: 1) Project information (see [below for nested schema](#nestedblock--project)) +- `redundancy` (Block Set, Max: 1) Connection Redundancy Configuration (see [below for nested schema](#nestedblock--redundancy)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `account` (Set of Object) Customer account information that is associated with this connection (see [below for nested schema](#nestedatt--account)) +- `change_log` (Set of Object) Captures connection lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `direction` (String) Connection directionality from the requester point of view +- `href` (String) Connection URI information +- `id` (String) The ID of this resource. +- `is_remote` (Boolean) Connection property derived from access point locations +- `operation` (Set of Object) Connection type-specific operational data (see [below for nested schema](#nestedatt--operation)) +- `state` (String) Connection overall state +- `uuid` (String) Equinix-assigned connection identifier + + + +### Nested Schema for `a_side` + +Optional: + +- `access_point` (Block Set, Max: 1) Point of access details (see [below for nested schema](#nestedblock--a_side--access_point)) +- `additional_info` (Block List) Connection side additional information (see [below for nested schema](#nestedblock--a_side--additional_info)) +- `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--a_side--service_token)) + + + +### Nested Schema for `a_side.access_point` + +Optional: + +- `authentication_key` (String) Authentication key for provider based connections +- `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--a_side--access_point--gateway)) +- `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--a_side--access_point--interface)) +- `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--a_side--access_point--link_protocol)) +- `location` (Block Set, Max: 1) Access point location (see [below for nested schema](#nestedblock--a_side--access_point--location)) +- `network` (Block Set, Max: 1) network access point information (see [below for nested schema](#nestedblock--a_side--access_point--network)) +- `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL +- `port` (Block Set, Max: 1) Port access point information (see [below for nested schema](#nestedblock--a_side--access_point--port)) +- `profile` (Block Set, Max: 1) Service Profile (see [below for nested schema](#nestedblock--a_side--access_point--profile)) +- `provider_connection_id` (String) Provider assigned Connection Id +- `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--a_side--access_point--router)) +- `seller_region` (String) Access point seller region +- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK +- `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--a_side--access_point--virtual_device)) + +Read-Only: + +- `account` (Block Set) Account (see [below for nested schema](#nestedblock--a_side--access_point--account)) + + + +### Nested Schema for `a_side.access_point.gateway` + +Optional: + +- `uuid` (String) Equinix-assigned virtual gateway identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `a_side.access_point.interface` + +Optional: + +- `id` (Number) id +- `type` (String) Interface type +- `uuid` (String) Equinix-assigned interface identifier + + + +### Nested Schema for `a_side.access_point.link_protocol` + +Optional: + +- `type` (String) Type of the link protocol - UNTAGGED, DOT1Q, QINQ, EVPN_VXLAN +- `vlan_c_tag` (Number) Vlan Customer Tag information, vlanCTag value specified for QINQ connections +- `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections +- `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections + + + +### Nested Schema for `a_side.access_point.location` + +Optional: + +- `ibx` (String) IBX Code +- `metro_code` (String) Access point metro code +- `metro_name` (String) Access point metro name +- `region` (String) Access point region + + + +### Nested Schema for `a_side.access_point.network` + +Optional: + +- `uuid` (String) Equinix-assigned Network identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `a_side.access_point.port` + +Optional: + +- `uuid` (String) Equinix-assigned Port identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier +- `name` (String) Port name +- `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--a_side--access_point--port--redundancy)) + + + +### Nested Schema for `a_side.access_point.port.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `a_side.access_point.profile` + +Required: + +- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE +- `uuid` (String) Equinix assigned service profile identifier + +Read-Only: + +- `access_point_type_configs` (List of Object) Access point config information (see [below for nested schema](#nestedatt--a_side--access_point--profile--access_point_type_configs)) +- `description` (String) User-provided service description +- `href` (String) Service Profile URI response attribute +- `name` (String) Customer-assigned service profile name + + + +### Nested Schema for `a_side.access_point.profile.access_point_type_configs` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `a_side.access_point.router` + +Optional: + +- `uuid` (String) Equinix-assigned virtual gateway identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `a_side.access_point.virtual_device` + +Optional: + +- `name` (String) Customer-assigned Virtual Device Name +- `type` (String) Virtual Device type +- `uuid` (String) Equinix-assigned Virtual Device identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `a_side.access_point.account` + +Read-Only: + +- `account_name` (String) Legal name of the accountholder. +- `account_number` (Number) Equinix-assigned account number. +- `global_cust_id` (String) Equinix-assigned ID of the subscriber's parent organization. +- `global_org_id` (String) Equinix-assigned ID of the subscriber's parent organization. +- `global_organization_name` (String) Equinix-assigned name of the subscriber's parent organization. +- `org_id` (Number) Equinix-assigned ID of the subscriber's organization. +- `organization_name` (String) Equinix-assigned name of the subscriber's organization. +- `ucm_id` (String) Enterprise datastore id + + + +### Nested Schema for `a_side.additional_info` + +Optional: + +- `key` (String) Additional information key +- `value` (String) Additional information value + + + +### Nested Schema for `a_side.service_token` + +Optional: + +- `type` (String) Token type - VC_TOKEN +- `uuid` (String) Equinix-assigned service token identifier + +Read-Only: + +- `description` (String) Service token description +- `href` (String) An absolute URL that is the subject of the link's context + + + +### Nested Schema for `notifications` + +Required: + +- `emails` (List of String) Array of contact emails +- `type` (String) Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS + +Optional: + +- `send_interval` (String) Send interval + + + +### Nested Schema for `order` + +Optional: + +- `purchase_order_number` (String) Purchase order number + +Read-Only: + +- `billing_tier` (String) Billing tier for connection bandwidth +- `order_id` (String) Order Identification +- `order_number` (String) Order Reference Number + + + +### Nested Schema for `z_side` + +Optional: + +- `access_point` (Block Set, Max: 1) Point of access details (see [below for nested schema](#nestedblock--z_side--access_point)) +- `additional_info` (Block List) Connection side additional information (see [below for nested schema](#nestedblock--z_side--additional_info)) +- `service_token` (Block Set, Max: 1) For service token based connections, Service tokens authorize users to access protected resources and services. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets (see [below for nested schema](#nestedblock--z_side--service_token)) + + + +### Nested Schema for `z_side.access_point` + +Optional: + +- `authentication_key` (String) Authentication key for provider based connections +- `gateway` (Block Set, Max: 1, Deprecated) **Deprecated** `gateway` Use `router` attribute instead (see [below for nested schema](#nestedblock--z_side--access_point--gateway)) +- `interface` (Block Set, Max: 1) Virtual device interface (see [below for nested schema](#nestedblock--z_side--access_point--interface)) +- `link_protocol` (Block Set, Max: 1) Connection link protocol (see [below for nested schema](#nestedblock--z_side--access_point--link_protocol)) +- `location` (Block Set, Max: 1) Access point location (see [below for nested schema](#nestedblock--z_side--access_point--location)) +- `network` (Block Set, Max: 1) network access point information (see [below for nested schema](#nestedblock--z_side--access_point--network)) +- `peering_type` (String) Peering Type- PRIVATE,MICROSOFT,PUBLIC, MANUAL +- `port` (Block Set, Max: 1) Port access point information (see [below for nested schema](#nestedblock--z_side--access_point--port)) +- `profile` (Block Set, Max: 1) Service Profile (see [below for nested schema](#nestedblock--z_side--access_point--profile)) +- `provider_connection_id` (String) Provider assigned Connection Id +- `router` (Block Set, Max: 1) Cloud Router access point information that replaces `gateway` (see [below for nested schema](#nestedblock--z_side--access_point--router)) +- `seller_region` (String) Access point seller region +- `type` (String) Access point type - COLO, VD, VG, SP, IGW, SUBNET, CLOUD_ROUTER, NETWORK +- `virtual_device` (Block Set, Max: 1) Virtual device (see [below for nested schema](#nestedblock--z_side--access_point--virtual_device)) + +Read-Only: + +- `account` (Block Set) Account (see [below for nested schema](#nestedblock--z_side--access_point--account)) + + + +### Nested Schema for `z_side.access_point.gateway` + +Optional: + +- `uuid` (String) Equinix-assigned virtual gateway identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `z_side.access_point.interface` + +Optional: + +- `id` (Number) id +- `type` (String) Interface type +- `uuid` (String) Equinix-assigned interface identifier + + + +### Nested Schema for `z_side.access_point.link_protocol` + +Optional: + +- `type` (String) Type of the link protocol - UNTAGGED, DOT1Q, QINQ, EVPN_VXLAN +- `vlan_c_tag` (Number) Vlan Customer Tag information, vlanCTag value specified for QINQ connections +- `vlan_s_tag` (Number) Vlan Provider Tag information, vlanSTag value specified for QINQ connections +- `vlan_tag` (Number) Vlan Tag information, vlanTag value specified for DOT1Q connections + + + +### Nested Schema for `z_side.access_point.location` + +Optional: + +- `ibx` (String) IBX Code +- `metro_code` (String) Access point metro code +- `metro_name` (String) Access point metro name +- `region` (String) Access point region + + + +### Nested Schema for `z_side.access_point.network` + +Optional: + +- `uuid` (String) Equinix-assigned Network identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `z_side.access_point.port` + +Optional: + +- `uuid` (String) Equinix-assigned Port identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier +- `name` (String) Port name +- `redundancy` (Set of Object) Redundancy Information (see [below for nested schema](#nestedatt--z_side--access_point--port--redundancy)) + + + +### Nested Schema for `z_side.access_point.port.redundancy` + +Read-Only: + +- `enabled` (Boolean) +- `group` (String) +- `priority` (String) + + + +### Nested Schema for `z_side.access_point.profile` + +Required: + +- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE +- `uuid` (String) Equinix assigned service profile identifier + +Read-Only: + +- `access_point_type_configs` (List of Object) Access point config information (see [below for nested schema](#nestedatt--z_side--access_point--profile--access_point_type_configs)) +- `description` (String) User-provided service description +- `href` (String) Service Profile URI response attribute +- `name` (String) Customer-assigned service profile name + + + +### Nested Schema for `z_side.access_point.profile.access_point_type_configs` + +Read-Only: + +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `z_side.access_point.router` + +Optional: + +- `uuid` (String) Equinix-assigned virtual gateway identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `z_side.access_point.virtual_device` + +Optional: + +- `name` (String) Customer-assigned Virtual Device Name +- `type` (String) Virtual Device type +- `uuid` (String) Equinix-assigned Virtual Device identifier + +Read-Only: + +- `href` (String) Unique Resource Identifier + + + +### Nested Schema for `z_side.access_point.account` + +Read-Only: + +- `account_name` (String) Legal name of the accountholder. +- `account_number` (Number) Equinix-assigned account number. +- `global_cust_id` (String) Equinix-assigned ID of the subscriber's parent organization. +- `global_org_id` (String) Equinix-assigned ID of the subscriber's parent organization. +- `global_organization_name` (String) Equinix-assigned name of the subscriber's parent organization. +- `org_id` (Number) Equinix-assigned ID of the subscriber's organization. +- `organization_name` (String) Equinix-assigned name of the subscriber's organization. +- `ucm_id` (String) Enterprise datastore id + + + +### Nested Schema for `z_side.additional_info` + +Optional: + +- `key` (String) Additional information key +- `value` (String) Additional information value + + + +### Nested Schema for `z_side.service_token` + +Optional: + +- `type` (String) Token type - VC_TOKEN +- `uuid` (String) Equinix-assigned service token identifier + +Read-Only: + +- `description` (String) Service token description +- `href` (String) An absolute URL that is the subject of the link's context + + + +### Nested Schema for `project` + +Optional: + +- `project_id` (String) Project Id + +Read-Only: + +- `href` (String) Unique Resource URL + + + +### Nested Schema for `redundancy` + +Optional: + +- `group` (String) Redundancy group identifier (Use the redundancy.0.group UUID of primary connection; e.g. one(equinix_fabric_connection.primary_port_connection.redundancy).group or equinix_fabric_connection.primary_port_connection.redundancy.0.group) +- `priority` (String) Connection priority in redundancy group - PRIMARY, SECONDARY + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + + + +### Nested Schema for `account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `equinix_status` (String) +- `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) +- `provider_status` (String) + + + +### Nested Schema for `operation.errors` + +Read-Only: + +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors--additional_info)) +- `correlation_id` (String) +- `details` (String) +- `error_code` (String) +- `error_message` (String) +- `help` (String) + + + +### Nested Schema for `operation.errors.additional_info` + +Read-Only: + +- `property` (String) +- `reason` (String) diff --git a/templates/resources/fabric_network.md.tmpl b/templates/resources/fabric_network.md.tmpl new file mode 100644 index 000000000..ca03babcd --- /dev/null +++ b/templates/resources/fabric_network.md.tmpl @@ -0,0 +1,131 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_network Resource - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric Network +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_network (Resource) + +Fabric V4 API compatible resource allows creation and management of Equinix Fabric Network + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks + +## Example Usage + +{{tffile "examples/resources/fabric_network/example_1.tf"}} + + + +## Schema + +### Required + +- `name` (String) Fabric Network name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `notifications` (Block List, Min: 1) Preferences for notifications on Fabric Network configuration or status changes (see [below for nested schema](#nestedblock--notifications)) +- `project` (Block Set, Min: 1) Fabric Network project (see [below for nested schema](#nestedblock--project)) +- `scope` (String) Fabric Network scope +- `type` (String) Supported Network types - EVPLAN, EPLAN, IPWAN + +### Optional + +- `location` (Block Set, Max: 1) Fabric Network location (see [below for nested schema](#nestedblock--location)) +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `change` (Set of Object) Information on asset change operation (see [below for nested schema](#nestedatt--change)) +- `change_log` (Set of Object) A permanent record of asset creation, modification, or deletion (see [below for nested schema](#nestedatt--change_log)) +- `connections_count` (Number) Number of connections associated with this network +- `href` (String) Fabric Network URI information +- `id` (String) The ID of this resource. +- `operation` (Set of Object) Network operation information that is associated with this Fabric Network (see [below for nested schema](#nestedatt--operation)) +- `state` (String) Fabric Network overall state +- `uuid` (String) Equinix-assigned network identifier + + + +### Nested Schema for `notifications` + +Required: + +- `emails` (List of String) Array of contact emails +- `type` (String) Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS + +Optional: + +- `send_interval` (String) Send interval + + + +### Nested Schema for `project` + +Required: + +- `project_id` (String) Customer project identifier + + + +### Nested Schema for `location` + +Optional: + +- `ibx` (String) IBX Code +- `metro_code` (String) Access point metro code +- `metro_name` (String) Access point metro name +- `region` (String) Access point region + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + + + +### Nested Schema for `change` + +Read-Only: + +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `equinix_status` (String) diff --git a/templates/resources/fabric_routing_protocol.md.tmpl b/templates/resources/fabric_routing_protocol.md.tmpl new file mode 100644 index 000000000..28e70b4f1 --- /dev/null +++ b/templates/resources/fabric_routing_protocol.md.tmpl @@ -0,0 +1,196 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_routing_protocol Resource - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_routing_protocol (Resource) + +Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols + +## Example Usage + +Direct Routing Protocol + +{{tffile "examples/resources/fabric_routing_protocol/example_1.tf"}} + +BGP Routing Protocol (Requires Direct Routing Protocol Created First): + +{{tffile "examples/resources/fabric_routing_protocol/example_2.tf"}} + +Direct and BGP Routing Protocol (Requires Depends On to Handle Synchronization): + +{{tffile "examples/resources/fabric_routing_protocol/example_3.tf"}} + + + +## Schema + +### Required + +- `connection_uuid` (String) Connection URI associated with Routing Protocol + +### Optional + +- `bfd` (Block Set) Bidirectional Forwarding Detection (see [below for nested schema](#nestedblock--bfd)) +- `bgp_auth_key` (String) BGP authorization key +- `bgp_ipv4` (Block Set) Routing Protocol BGP IPv4 (see [below for nested schema](#nestedblock--bgp_ipv4)) +- `bgp_ipv6` (Block Set) Routing Protocol BGP IPv6 (see [below for nested schema](#nestedblock--bgp_ipv6)) +- `customer_asn` (Number) Customer-provided ASN +- `description` (String) Customer-provided Fabric Routing Protocol description +- `direct_ipv4` (Block Set) Routing Protocol Direct IPv4 (see [below for nested schema](#nestedblock--direct_ipv4)) +- `direct_ipv6` (Block Set) Routing Protocol Direct IPv6 (see [below for nested schema](#nestedblock--direct_ipv6)) +- `name` (String) Routing Protocol name. An alpha-numeric 24 characters string which can include only hyphens and underscores +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `type` (String) Defines the routing protocol type like BGP or DIRECT +- `uuid` (String) Equinix-assigned routing protocol identifier + +### Read-Only + +- `change` (Set of Object) Routing Protocol configuration Changes (see [below for nested schema](#nestedatt--change)) +- `change_log` (Set of Object) Captures Routing Protocol lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `equinix_asn` (Number) Equinix ASN +- `href` (String) Routing Protocol URI information +- `id` (String) The ID of this resource. +- `operation` (Set of Object) Routing Protocol type-specific operational data (see [below for nested schema](#nestedatt--operation)) +- `state` (String) Routing Protocol overall state + + + +### Nested Schema for `bfd` + +Required: + +- `enabled` (Boolean) Bidirectional Forwarding Detection enablement + +Optional: + +- `interval` (String) Interval range between the received BFD control packets + + + +### Nested Schema for `bgp_ipv4` + +Required: + +- `customer_peer_ip` (String) Customer side peering ip + +Optional: + +- `enabled` (Boolean) Admin status for the BGP session + +Read-Only: + +- `equinix_peer_ip` (String) Equinix side peering ip + + + +### Nested Schema for `bgp_ipv6` + +Required: + +- `customer_peer_ip` (String) Customer side peering ip + +Optional: + +- `enabled` (Boolean) Admin status for the BGP session + +Read-Only: + +- `equinix_peer_ip` (String) Equinix side peering ip + + + +### Nested Schema for `direct_ipv4` + +Required: + +- `equinix_iface_ip` (String) Equinix side Interface IP address + + + +### Nested Schema for `direct_ipv6` + +Optional: + +- `equinix_iface_ip` (String) Equinix side Interface IP address + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + + + +### Nested Schema for `change` + +Read-Only: + +- `href` (String) +- `type` (String) +- `uuid` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) + + + +### Nested Schema for `operation` + +Read-Only: + +- `errors` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors)) + + + +### Nested Schema for `operation.errors` + +Read-Only: + +- `additional_info` (List of Object) (see [below for nested schema](#nestedobjatt--operation--errors--additional_info)) +- `correlation_id` (String) +- `details` (String) +- `error_code` (String) +- `error_message` (String) +- `help` (String) + + + +### Nested Schema for `operation.errors.additional_info` + +Read-Only: + +- `property` (String) +- `reason` (String) diff --git a/templates/resources/fabric_service_profile.md.tmpl b/templates/resources/fabric_service_profile.md.tmpl new file mode 100644 index 000000000..0b5495242 --- /dev/null +++ b/templates/resources/fabric_service_profile.md.tmpl @@ -0,0 +1,290 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "equinix_fabric_service_profile Resource - terraform-provider-equinix" +subcategory: "Fabric" +description: |- + Fabric V4 API compatible resource allows creation and management of Equinix Fabric Service Profile +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_fabric_service_profile (Resource) + +Fabric V4 API compatible resource allows creation and management of Equinix Fabric Service Profile + +Additional documentation: +* Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm +* API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles + +## Example Usage + +{{tffile "examples/resources/fabric_service_profile/example_1.tf"}} + + + +## Schema + +### Required + +- `description` (String) User-provided service description +- `name` (String) Customer-assigned service profile name +- `type` (String) Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE + +### Optional + +- `access_point_type_configs` (Block List) Access point config information (see [below for nested schema](#nestedblock--access_point_type_configs)) +- `allowed_emails` (List of String) Array of contact emails +- `custom_fields` (Block List) Custom Fields (see [below for nested schema](#nestedblock--custom_fields)) +- `marketing_info` (Block Set, Max: 1) Marketing Info (see [below for nested schema](#nestedblock--marketing_info)) +- `metros` (Block List) Access point config information (see [below for nested schema](#nestedblock--metros)) +- `notifications` (Block List) Preferences for notifications on connection configuration or status changes (see [below for nested schema](#nestedblock--notifications)) +- `ports` (Block List) Ports (see [below for nested schema](#nestedblock--ports)) +- `project` (Block Set, Max: 1) Project information (see [below for nested schema](#nestedblock--project)) +- `self_profile` (Boolean) Self Profile indicating if the profile is created for customer's self use +- `state` (String) Service profile state - ACTIVE, PENDING_APPROVAL, DELETED, REJECTED +- `tags` (List of String) Tags attached to the connection +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) +- `virtual_devices` (Block List) Virtual Devices (see [below for nested schema](#nestedblock--virtual_devices)) +- `visibility` (String) Service profile visibility - PUBLIC, PRIVATE + +### Read-Only + +- `account` (Set of Object) Service Profile Owner Account Information (see [below for nested schema](#nestedatt--account)) +- `change_log` (Set of Object) Captures connection lifecycle change information (see [below for nested schema](#nestedatt--change_log)) +- `href` (String) Service Profile URI response attribute +- `id` (String) The ID of this resource. +- `uuid` (String) Equinix assigned service profile identifier + + + +### Nested Schema for `access_point_type_configs` + +Required: + +- `type` (String) Type of access point type config - VD, COLO + +Optional: + +- `allow_bandwidth_auto_approval` (Boolean) Setting to enable or disable the ability of the buyer to change connection bandwidth without approval of the seller +- `allow_bandwidth_upgrade` (Boolean) Availability of a bandwidth upgrade. The default is false +- `allow_custom_bandwidth` (Boolean) Setting to enable or disable the ability of the buyer to customize the bandwidth +- `allow_remote_connections` (Boolean) Setting to allow or prohibit remote connections to the service profile +- `api_config` (Block Set, Max: 1) Api configuration details (see [below for nested schema](#nestedblock--access_point_type_configs--api_config)) +- `authentication_key` (Block Set, Max: 1) Authentication key details (see [below for nested schema](#nestedblock--access_point_type_configs--authentication_key)) +- `bandwidth_alert_threshold` (Number) Percentage of port bandwidth at which an allocation alert is generated +- `connection_label` (String) Custom name for Connection +- `connection_redundancy_required` (Boolean) Mandate redundant connections +- `enable_auto_generate_service_key` (Boolean) Enable auto generate service key +- `link_protocol_config` (Block Set, Max: 1) Link protocol configuration details (see [below for nested schema](#nestedblock--access_point_type_configs--link_protocol_config)) +- `supported_bandwidths` (List of Number) Supported bandwidths + +Read-Only: + +- `uuid` (String) Colo/Port Uuid + + + +### Nested Schema for `access_point_type_configs.api_config` + +Optional: + +- `allow_over_subscription` (Boolean) Setting showing that oversubscription support is available (true) or not (false). The default is false +- `api_available` (Boolean) Indicates if it's possible to establish connections based on the given service profile using the Equinix Fabric API. +- `bandwidth_from_api` (Boolean) Indicates if the connection bandwidth can be obtained directly from the cloud service provider. +- `equinix_managed_port` (Boolean) Setting indicating that the port is managed by Equinix (true) or not (false) +- `equinix_managed_vlan` (Boolean) Setting indicating that the VLAN is managed by Equinix (true) or not (false) +- `integration_id` (String) A unique identifier issued during onboarding and used to integrate the customer's service profile with the Equinix Fabric API. +- `over_subscription_limit` (Number) Port bandwidth multiplier that determines the total bandwidth that can be allocated to users creating connections to your services. For example, a 10 Gbps port combined with an overSubscriptionLimit parameter value of 10 allows your subscribers to create connections with a total bandwidth of 100 Gbps. + + + +### Nested Schema for `access_point_type_configs.authentication_key` + +Optional: + +- `description` (String) Description of authorization key +- `label` (String) Name of the parameter that must be provided to authorize the connection. +- `required` (Boolean) Requirement to configure an authentication key. + + + +### Nested Schema for `access_point_type_configs.link_protocol_config` + +Optional: + +- `encapsulation` (String) Data frames encapsulation standard.UNTAGGED - Untagged encapsulation for EPL connections. DOT1Q - DOT1Q encapsulation standard. QINQ - QINQ encapsulation standard. +- `encapsulation_strategy` (String) Additional tagging information required by the seller profile. +- `reuse_vlan_s_tag` (Boolean) Automatically accept subsequent DOT1Q to QINQ connections that use the same authentication key. These connections will have the same VLAN S-tag assigned as the initial connection. + + + +### Nested Schema for `custom_fields` + +Required: + +- `data_type` (String) Data type +- `label` (String) Label +- `required` (Boolean) Required field + +Optional: + +- `capture_in_email` (Boolean) Required field +- `description` (String) Description +- `options` (List of String) Options + + + +### Nested Schema for `marketing_info` + +Optional: + +- `logo` (String) Logo +- `process_step` (Block List) Process Step (see [below for nested schema](#nestedblock--marketing_info--process_step)) +- `promotion` (Boolean) Promotion + + + +### Nested Schema for `marketing_info.process_step` + +Optional: + +- `description` (String) Description +- `sub_title` (String) Sub Title +- `title` (String) Title + + + +### Nested Schema for `metros` + +Optional: + +- `code` (String) Metro Code - Example SV +- `display_name` (String) Display Name +- `ibxs` (List of String) IBX- Equinix International Business Exchange list +- `in_trail` (Boolean) In Trail +- `name` (String) Metro Name +- `seller_regions` (Map of String) Seller Regions + + + +### Nested Schema for `notifications` + +Required: + +- `emails` (List of String) Array of contact emails +- `type` (String) Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS + +Optional: + +- `send_interval` (String) Send interval + + + +### Nested Schema for `ports` + +Required: + +- `type` (String) Colo/Port Type +- `uuid` (String) Colo/Port Uuid + +Optional: + +- `cross_connect_id` (String) Cross Connect Id +- `location` (Block Set, Max: 1) Colo/Port Location (see [below for nested schema](#nestedblock--ports--location)) +- `seller_region` (String) Seller Region +- `seller_region_description` (String) Seller Region details + + + +### Nested Schema for `ports.location` + +Optional: + +- `ibx` (String) IBX Code +- `metro_code` (String) Access point metro code +- `metro_name` (String) Access point metro name +- `region` (String) Access point region + + + +### Nested Schema for `project` + +Optional: + +- `project_id` (String) Project Id + +Read-Only: + +- `href` (String) Unique Resource URL + + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) +- `delete` (String) +- `read` (String) +- `update` (String) + + + +### Nested Schema for `virtual_devices` + +Required: + +- `type` (String) Virtual Device Type +- `uuid` (String) Virtual Device Uuid + +Optional: + +- `interface_uuid` (String) Device Interface Uuid +- `location` (Block Set, Max: 1) Device Location (see [below for nested schema](#nestedblock--virtual_devices--location)) + + + +### Nested Schema for `virtual_devices.location` + +Optional: + +- `ibx` (String) IBX Code +- `metro_code` (String) Access point metro code +- `metro_name` (String) Access point metro name +- `region` (String) Access point region + + + +### Nested Schema for `account` + +Read-Only: + +- `account_name` (String) +- `account_number` (Number) +- `global_cust_id` (String) +- `global_org_id` (String) +- `global_organization_name` (String) +- `org_id` (Number) +- `organization_name` (String) +- `ucm_id` (String) + + + +### Nested Schema for `change_log` + +Read-Only: + +- `created_by` (String) +- `created_by_email` (String) +- `created_by_full_name` (String) +- `created_date_time` (String) +- `deleted_by` (String) +- `deleted_by_email` (String) +- `deleted_by_full_name` (String) +- `deleted_date_time` (String) +- `updated_by` (String) +- `updated_by_email` (String) +- `updated_by_full_name` (String) +- `updated_date_time` (String) diff --git a/templates/resources/metal_bgp_session.md.tmpl b/templates/resources/metal_bgp_session.md.tmpl new file mode 100644 index 000000000..b292be525 --- /dev/null +++ b/templates/resources/metal_bgp_session.md.tmpl @@ -0,0 +1,40 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_bgp_session (Resource) + +Provides a resource to manage BGP sessions in Equinix Metal Host. Refer to [Equinix Metal BGP documentation](https://metal.equinix.com/developers/docs/networking/local-global-bgp/) for more details. + +You need to have BGP config enabled in your project. + +BGP session must be linked to a device running [BIRD](https://bird.network.cz) or other BGP routing daemon which will control route advertisements via the session to Equinix Metal's upstream routers. + +## Example Usage + +Following HCL illustrates usage of the BGP features in Equinix Metal. It will + +* spawn a device in a new BGP-enabled project +* reserve a floating IPv4 address in the project in the same location as the device +* configure the floating IPv4 statically in the device +* install and configure [BIRD](https://bird.network.cz) in the device, and make it announce the floating IPv4 locally + +{{tffile "examples/resources/metal_bgp_session/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `device_id` - (Required) ID of device. +* `address_family` - (Required) `ipv4` or `ipv6`. +* `default_route` - (Optional) Boolean flag to set the default route policy. False by default. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `status`: Status of the session - `up` or `down` diff --git a/templates/resources/metal_connection.md.tmpl b/templates/resources/metal_connection.md.tmpl new file mode 100644 index 000000000..c8890c8db --- /dev/null +++ b/templates/resources/metal_connection.md.tmpl @@ -0,0 +1,59 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_connection (Resource) + +Use this resource to request the creation an Interconnection asset to connect with other parties using [Equinix Fabric - software-defined interconnections](https://metal.equinix.com/developers/docs/networking/fabric/). + +~> Equinix Metal connection with with Service Token A-side / Z-side (service_token_type) is not generally available and may not be enabled yet for your organization. + +## Example Usage + +### Shared Connection with a_side token - Redundant Connection from Equinix Metal to a Cloud Service Provider + +{{tffile "examples/resources/metal_connection/example_1.tf"}} + +-> NOTE: There are multiple [Equinix Fabric L2 Connection Terraform modules](https://registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection) available with full-fledged examples of connections from Fabric Ports, Network Edge Devices or Service Token to most popular Cloud Service Providers. Check out the examples for Equinix Metal shared connection with A-side Service Token included in each of them: [AWS](https://registry.terraform.io/modules/equinix-labs/fabric-connection-aws/equinix/latest/examples/service-token-metal-to-aws-connection), [Azure](https://registry.terraform.io/modules/equinix-labs/fabric-connection-azure/equinix/latest/examples/service-token-metal-to-azure-connection), [Google Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-gcp/equinix/latest/examples/service-token-metal-to-gcp-connection), [IBM Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-ibm/equinix/latest/examples/service-token-metal-to-ibm-connection), [Oracle Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-oci/equinix/latest/examples/service-token-metal-to-oci-connection), [Alibaba Cloud](https://registry.terraform.io/modules/equinix-labs/fabric-connection-alibaba/equinix/latest/examples/service-token-metal-to-alibaba-connection). + +### Shared Connection with z_side token - Non-redundant Connection from your own Equinix Fabric Port to Equinix Metal + +{{tffile "examples/resources/metal_connection/example_2.tf"}} + +-> NOTE: There is an [Equinix Fabric L2 Connection To Equinix Metal Terraform module](https://registry.terraform.io/modules/equinix-labs/fabric-connection-metal/equinix/latest) available with full-fledged examples of connections from Fabric Ports, Network Edge Devices or Service Tokens. Check out the [example for shared connection with Z-side Service Token](https://registry.terraform.io/modules/equinix-labs/fabric-connection-metal/equinix/0.2.0/examples/fabric-port-connection-with-zside-token). + +### Shared Connection for organizations without Connection Services Token feature enabled + +{{tffile "examples/resources/metal_connection/example_3.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Name of the connection resource +* `metro` - (Optional) Metro where the connection will be created. +* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `redundancy` - (Required) Connection redundancy - redundant or primary. +* `type` - (Required) Connection type - dedicated or shared. +* `contact_email` - (Optional) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. +* `project_id` - (Optional) ID of the project where the connection is scoped to, must be set for. +* `speed` - (Required) Connection speed - Values must be in the format 'Mbps' or 'Gpbs', for example '100Mbps' or '50Gbps'. Actual supported values will depend on the connection type and whether the connection uses VLANs or VRF. +* `description` - (Optional) Description for the connection resource. +* `mode` - (Optional) Mode for connections in IBX facilities with the dedicated type - standard or tunnel. Default is standard. +* `tags` - (Optional) String list of tags. +* `vlans` - (Optional) Only used with shared connection. Vlans to attach. Pass one vlan for Primary/Single connection and two vlans for Redundant connection. +* `service_token_type` - (Optional) Only used with shared connection. Type of service token to use for the connection, a_side or z_side. (**NOTE: To support the legacy non-automated way to create connections, terraform will not check if `service_token_type` is specified. If your organization already has `service_token_type` enabled, be sure to specify it or the connection will return a legacy connection token instead of a service token**) + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `organization_id` - ID of the organization where the connection is scoped to. +* `status` - Status of the connection resource. +* `ports` - List of connection ports - primary (`ports[0]`) and secondary (`ports[1]`). Schema of port is described in documentation of the [equinix_metal_connection datasource](../data-sources/equinix_metal_connection.md). +* `service_tokens` - List of connection service tokens with attributes required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./equinix_fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). Scehma of service_token is described in documentation of the [equinix_metal_connection datasource](../data-sources/equinix_metal_connection.md). +* `token` - (Deprecated) Fabric Token required to configure the connection in Equinix Fabric with the [equinix_fabric_connection](./equinix_fabric_connection.md) resource or from the [Equinix Fabric Portal](https://fabric.equinix.com/dashboard). If your organization already has connection service tokens enabled, use `service_tokens` instead. diff --git a/templates/resources/metal_device.md.tmpl b/templates/resources/metal_device.md.tmpl new file mode 100644 index 000000000..32e1ded8b --- /dev/null +++ b/templates/resources/metal_device.md.tmpl @@ -0,0 +1,39 @@ +--- +subcategory: "Metal" +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +Create a device and add it to cool_project + +{{tffile "examples/resources/metal_device/example_1.tf"}} + +Same as above, but boot via iPXE initially, using the Ignition Provider for provisioning + +{{tffile "examples/resources/metal_device/example_2.tf"}} + +Create a device without a public IP address in metro ny, with only a /30 private IPv4 subnet (4 IP addresses) + +{{tffile "examples/resources/metal_device/example_3.tf"}} + +Deploy device on next-available reserved hardware and do custom partitioning. + +{{tffile "examples/resources/metal_device/example_4.tf"}} + +Create a device and allow the `user_data` and `custom_data` attributes to change in-place (i.e., without destroying and recreating the device): + +{{tffile "examples/resources/metal_device/example_5.tf"}} + +{{ .SchemaMarkdown | trimspace }} +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} +{{- end }} diff --git a/templates/resources/metal_device_network_type.md.tmpl b/templates/resources/metal_device_network_type.md.tmpl new file mode 100644 index 000000000..1f6056aad --- /dev/null +++ b/templates/resources/metal_device_network_type.md.tmpl @@ -0,0 +1,43 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_device_network_type (Resource) + +This resource controls network type of Equinix Metal devices. + +To learn more about Layer 2 networking in Equinix Metal, refer to + +* https://metal.equinix.com/developers/docs/networking/layer2/ +* https://metal.equinix.com/developers/docs/networking/layer2-configs/ + +If you are attaching VLAN to a device (i.e. using equinix_metal_port_vlan_attachment), link the device ID from this resource, in order to make the port attachment implicitly dependent on the state of the network type. If you link the device ID from the equinix_metal_device resource, Terraform will not wait for the network type change. See examples in [equinix_metal_port_vlan_attachment](port_vlan_attachment). + +## Example Usage + +-> **NOTE:** This resource takes a named network type with any mode required parameters and converts a device to the named network type. This resource simulated the network type interface for Devices in the Equinix Metal Portal. That interface changed when additional network types were introduced with more diverse port configurations and it is not guaranteed to work in devices with more than two ethernet ports. See the [Network Types Guide](../guides/network_types.md) for examples of this resource and to learn about the recommended `equinix_metal_port` alternative. + +## Import + +This resource can also be imported using existing device ID: + +```sh +terraform import equinix_metal_device_network_type {existing device_id} +``` + +## Argument Reference + +The following arguments are supported: + +* `device_id` - (Required) The ID of the device on which the network type should be set. +* `type` - (Required) Network type to set. Must be one of `layer3`, `hybrid`, `hybrid-bonded`, `layer2-individual` and `layer2-bonded`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the controlled device. Use this in linked resources, if you need to wait for the network type change. It is the same as `device_id`. diff --git a/templates/resources/metal_gateway.md.tmpl b/templates/resources/metal_gateway.md.tmpl new file mode 100644 index 000000000..4c0ba2e7d --- /dev/null +++ b/templates/resources/metal_gateway.md.tmpl @@ -0,0 +1,41 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_gateway (Resource) + +Use this resource to create Metal Gateway resources in Equinix Metal. + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +{{tffile "examples/resources/metal_gateway/example_1.tf"}} + +{{tffile "examples/resources/metal_gateway/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) UUID of the project where the gateway is scoped to. +* `vlan_id` - (Required) UUID of the VLAN where the gateway is scoped to. +* `ip_reservation_id` - (Optional) UUID of Public or VRF IP Reservation to associate with the gateway, the reservation must be in the same metro as the VLAN, conflicts with `private_ipv4_subnet_size`. +* `private_ipv4_subnet_size` - (Optional) Size of the private IPv4 subnet to create for this metal gateway, must be one of `8`, `16`, `32`, `64`, `128`. Conflicts with `ip_reservation_id`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `state` - Status of the gateway resource. +* `vrf_id` - UUID of the VRF associated with the IP Reservation + +## Timeouts + +[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts): + +* `delete` - (Default `20m`) diff --git a/templates/resources/metal_ip_attachment.md.tmpl b/templates/resources/metal_ip_attachment.md.tmpl new file mode 100644 index 000000000..8903a3675 --- /dev/null +++ b/templates/resources/metal_ip_attachment.md.tmpl @@ -0,0 +1,42 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_ip_attachment (Resource) + +Provides a resource to attach elastic IP subnets to devices. + +To attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR belonging to one of your reserved blocks in the same project and metro as the target device. + +For example, you have reserved IPv4 address block `147.229.10.152/30`, you can choose to assign either the whole block as one subnet to a device; or 2 subnets with CIDRs `147.229.10.152/31` and `147.229.10.154/31`; or 4 subnets with mask prefix length `32`. More about the elastic IP subnets is [here](https://metal.equinix.com/developers/docs/networking/elastic-ips/). + +Device and reserved block must be in the same metro. + +## Example Usage + +{{tffile "examples/resources/metal_ip_attachment/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `device_id` - (Required) ID of device to which to assign the subnet. +* `cidr_notation` - (Required) CIDR notation of subnet from block reserved in the same project and metro as the device. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the assignment. +* `device_id` - ID of device to which subnet is assigned. +* `cidr_notation` - Assigned subnet in CIDR notation, e.g., `147.229.15.30/31` +* `gateway` - IP address of gateway for the subnet. +* `network` - Subnet network address. +* `netmask` - Subnet mask in decimal notation, e.g., `255.255.255.0`. +* `cidr` - Length of CIDR prefix of the subnet as integer. +* `address_family` - Address family as integer. One of `4` or `6`. +* `public` - Boolean flag whether subnet is reachable from the Internet. diff --git a/templates/resources/metal_organization.md.tmpl b/templates/resources/metal_organization.md.tmpl new file mode 100644 index 000000000..420fe9f60 --- /dev/null +++ b/templates/resources/metal_organization.md.tmpl @@ -0,0 +1,52 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_organization (Resource) + +Provides a resource to manage organization resource in Equinix Metal. + +## Example Usage + +{{tffile "examples/resources/metal_organization/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the Organization. +* `address` - (Required) An object that has the address information. See [Address](#address) below for more details. +* `description` - (Optional) Description string. +* `website` - (Optional) Website link. +* `twitter` - (Optional) Twitter handle. +* `logo` - (Optional) Logo URL. + +### Address + +The `address` block contains: + +* `address` - (Required) Postal address. +* `city` - (Required) City name. +* `country` - (Required) Two letter country code (ISO 3166-1 alpha-2), e.g. US. +* `zip_code` - (Required) Zip Code. +* `state` - (Optional) State name. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the organization. +* `created` - The timestamp for when the organization was created. +* `updated` - The timestamp for the last time the organization was updated. + +## Import + +This resource can be imported using an existing organization ID: + +```sh +terraform import equinix_metal_organization {existing_organization_id} +``` diff --git a/templates/resources/metal_organization_member.md.tmpl b/templates/resources/metal_organization_member.md.tmpl new file mode 100644 index 000000000..53764a996 --- /dev/null +++ b/templates/resources/metal_organization_member.md.tmpl @@ -0,0 +1,50 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_organization_member (Resource) + +Manage the membership of existing and new invitees within an Equinix Metal organization and its projects. + +## Example Usage + +Add a member to an organization to collaborate on given projects: + +{{tffile "examples/resources/metal_organization_member/example_1.tf"}} + +Add a member to an organization as an organization administrator: + +{{tffile "examples/resources/metal_organization_member/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `invitee` - (Required) The email address of the user to invite +* `organization_id` - (Required) The organization to invite the user to +* `projects_ids` - (Required) Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty. +* `roles` - (Required) Organization roles (admin, collaborator, limited_collaborator, billing) +* `message` - A message to include in the emailed invitation. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the membership. +* `nonce` - The nonce for the invitation (only known in the invitation stage) +* `invited_by` - The user_id of the user that sent the invitation (only known in the invitation stage) +* `created` - When the invitation was created (only known in the invitation stage) +* `updated` - When the invitation was updated (only known in the invitation stage) +* `state` - The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member) + +## Import + +This resource can be imported using the `invitee` and `organization_id` as colon separated arguments: + +```sh +terraform import equinix_metal_organization_member.resource_name {invitee}:{organization_id} +``` diff --git a/templates/resources/metal_port.md.tmpl b/templates/resources/metal_port.md.tmpl new file mode 100644 index 000000000..da856ac0d --- /dev/null +++ b/templates/resources/metal_port.md.tmpl @@ -0,0 +1,51 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_port (Resource) + +Use this resource to configure network ports on an Equinix Metal device. This resource can control both physical and bond ports. + +This Terraform resource doesn't create an API resource in Equinix Metal, but rather provides finer control for [Layer 2 networking](https://metal.equinix.com/developers/docs/layer2-networking/). + +The port resource referred is created together with device and accessible either via the device resource or over `/port/` API path. + +-> To achieve the network configurations available in the portal it may require the creation and combination of various `equinix_metal_port` resources. See the [Network Types Guide](../guides/network_types.md) for examples of this resource. + +## Argument Reference + +The following arguments are supported: + +* `port_id` - (Required) ID of the port to read. +* `bonded` - (Required) Whether the port should be bonded. +* `layer2` - (Optional) Whether to put the port to Layer 2 mode, valid only for bond ports. +* `vlan_ids` - (Optional) List of VLAN UUIDs to attach to the port, valid only for L2 and Hybrid ports. +* `vxlan_ids` - (Optional) List of VXLAN IDs to attach to the port, valid only for L2 and Hybrid ports. +* `native_vlan_id` - (Optional) UUID of a VLAN to assign as a native VLAN. It must be one of attached VLANs (from `vlan_ids` parameter). +* `reset_on_delete` - (Optional) Behavioral setting to reset the port to default settings (layer3 bonded mode without any vlan attached) before delete/destroy. + +### Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/configuration/resources#operation-timeouts) for certain actions: + +These timeout includes the time to disbond, convert to L2/L3, bond and update native vLAN. + +* `create` - (Defaults to 30 mins) Used when creating the Port. +* `update` - (Defaults to 30 mins) Used when updating the Port. +* `delete` - (Defaults to 30 mins) Used when deleting the Port. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `name` - Name of the port, e.g. `bond0` or `eth0`. +* `network_type` - One of layer2-bonded, layer2-individual, layer3, hybrid and hybrid-bonded. This attribute is only set on bond ports. +* `type` - Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports. +* `mac` - MAC address of the port. +* `bond_id` - UUID of the bond port. +* `bond_name` - Name of the bond port. +* `disbond_supported` - Flag indicating whether the port can be removed from a bond. diff --git a/templates/resources/metal_port_vlan_attachment.md.tmpl b/templates/resources/metal_port_vlan_attachment.md.tmpl new file mode 100644 index 000000000..04ede0841 --- /dev/null +++ b/templates/resources/metal_port_vlan_attachment.md.tmpl @@ -0,0 +1,48 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_port_vlan_attachment (Resource) + +Provides a resource to attach device ports to VLANs. + +Device and VLAN must be in the same metro. + +If you need this resource to add the port back to bond on removal, set `force_bond = true`. + +To learn more about Layer 2 networking in Equinix Metal, refer to + +* https://metal.equinix.com/developers/docs/networking/layer2/ +* https://metal.equinix.com/developers/docs/networking/layer2-configs/ + +## Example Usage + +### Hybrid network type + +{{tffile "examples/resources/metal_port_vlan_attachment/example_1.tf"}} + +### Layer 2 network + +{{tffile "examples/resources/metal_port_vlan_attachment/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `device_id` - (Required) ID of device to be assigned to the VLAN. +* `port_name` - (Required) Name of network port to be assigned to the VLAN. +* `vlan_vnid` - (Required) VXLAN Network Identifier. +* `force_bond` - (Optional) Add port back to the bond when this resource is removed. Default is `false`. +* `native` - (Optional) Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use `depends_on` pointing to another `equinix_metal_port_vlan_attachment`, just like in the layer2-individual example above. + +## Attribute Referece + +In addition to all arguments above, the following attributes are exported: + +* `id` - UUID of device port used in the assignment. +* `vlan_id` - UUID of VLAN API resource. +* `port_id` - UUID of device port. diff --git a/templates/resources/metal_project.md.tmpl b/templates/resources/metal_project.md.tmpl new file mode 100644 index 000000000..e26dbe675 --- /dev/null +++ b/templates/resources/metal_project.md.tmpl @@ -0,0 +1,78 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_project (Resource) + +Provides an Equinix Metal project resource to allow you manage devices in your projects. + +-> **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix_metal_project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects. + +## Example Usage + +### Create a new project + +{{tffile "examples/resources/metal_project/example_1.tf"}} + +### Example with BGP config + +{{tffile "examples/resources/metal_project/example_2.tf"}} + +### Enabling BGP in an existing project + +If you want to enable BGP in an existing Equinix Metal project, you should first create a resource in your TF config for the existing projects. Set your BGP configuration. + +{{tffile "examples/resources/metal_project/example_3.tf"}} + +Then, find out the UUID of the existing project, and import it to your TF state. + +```sh +terraform import equinix_metal_project.existing_project e188d7db-46a7-46cb-8969-e63ec22695d5 +``` + +Your existing project is now loaded in your local TF state, and linked to the resource with given name. + +After running `terraform apply`, the project will be updated with configuration provided in the TF template. + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the project. The maximum length is 80 characters +* `organization_id` - (Required) The UUID of organization under which you want to create the project. If you leave it out, the project will be created under your the default organization of your account. +* `payment_method_id` - The UUID of payment method for this project. The payment method and the project need to belong to the same organization (passed with `organization_id`, or default). +* `backend_transfer` - Enable or disable [Backend Transfer](https://metal.equinix.com/developers/docs/networking/backend-transfer/), default is `false`. +* `bgp_config` - Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/). + +-> **NOTE:** Once you set the BGP config in a project, it can't be removed (due to a limitation in the Equinix Metal API). It can be updated. + +The `bgp_config` block supports: + +* `asn` - (Required) Autonomous System Number for local BGP deployment. +* `deployment_type` - (Required) `local` or `global`, the `local` is likely to be usable immediately, the `global` will need to be reviewed by Equinix Metal engineers. +* `md5` - (Optional) Password for BGP session in plaintext (not a checksum). + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the project. +* `created` - The timestamp for when the project was created. +* `updated` - The timestamp for the last time the project was updated. + +The `bgp_config` block additionally exports: + +* `status` - status of BGP configuration in the project. +* `max_prefix` - The maximum number of route filters allowed per server. + +## Import + +This resource can be imported using an existing project ID: + +```sh +terraform import equinix_metal_project {existing_project_id} +``` diff --git a/templates/resources/metal_project_api_key.md.tmpl b/templates/resources/metal_project_api_key.md.tmpl new file mode 100644 index 000000000..726b3ffda --- /dev/null +++ b/templates/resources/metal_project_api_key.md.tmpl @@ -0,0 +1,31 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_project_api_key (Resource) + +Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can be used to create and read resources in a single project. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`). + +Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources. + +## Example Usage + +{{tffile "examples/resources/metal_project_api_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) UUID of the project where the API key is scoped to. +* `description` - (Required) Description string for the Project API Key resource. +* `read-only` - (Optional) Flag indicating whether the API key shoud be read-only. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `token` - API token which can be used in Equinix Metal API clients diff --git a/templates/resources/metal_project_ssh_key.md.tmpl b/templates/resources/metal_project_ssh_key.md.tmpl new file mode 100644 index 000000000..cc30f1b5c --- /dev/null +++ b/templates/resources/metal_project_ssh_key.md.tmpl @@ -0,0 +1,34 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_project_ssh_key (Resource) + +Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys. + +## Example Usage + +{{tffile "examples/resources/metal_project_ssh_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the SSH key for identification. +* `public_key` - (Required) The public key. If this is a file, it can be read using the file interpolation function. +* `project_id` - (Required) The ID of parent project. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the key. +* `name` - The name of the SSH key. +* `owner_id` - The ID of parent project (same as project_id). +* `fingerprint` - The fingerprint of the SSH key. +* `created` - The timestamp for when the SSH key was created. +* `updated` - The timestamp for the last time the SSH key was updated. diff --git a/templates/resources/metal_reserved_ip_block.md.tmpl b/templates/resources/metal_reserved_ip_block.md.tmpl new file mode 100644 index 000000000..31e810f66 --- /dev/null +++ b/templates/resources/metal_reserved_ip_block.md.tmpl @@ -0,0 +1,72 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_reserved_ip_block (Resource) + +Provides a resource to create and manage blocks of reserved IP addresses in a project. + +When a user provisions first device in a metro, Equinix Metal API automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and metro will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks. + +Public blocks are allocated in a metro. Addresses from public blocks can only be assigned to devices in the metro. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the metro argument. + +Addresses from global blocks can be assigned in any metro. Global blocks can have mask from /30 (4 addresses), to /32 (1 address). If you create global block with this resource, you must specify type = "global_ipv4" and you must omit the metro argument. + +Once IP block is allocated or imported, an address from it can be assigned to device with the `equinix_metal_ip_attachment` resource. + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +Allocate reserved IP blocks: + +{{tffile "examples/resources/metal_reserved_ip_block/example_1.tf"}} + +Allocate a block and run a device with public IPv4 from the block + +{{tffile "examples/resources/metal_reserved_ip_block/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) The metal project ID where to allocate the address block. +* `quantity` - (Optional) The number of allocated `/32` addresses, a power of 2. Required when `type` is not `vrf`. +* `type` - (Optional) One of `global_ipv4`, `public_ipv4`, or `vrf`. Defaults to `public_ipv4` for backward compatibility. +* `facility` - (**Deprecated**) Facility where to allocate the public IP address block, makes sense only if type is `public_ipv4` and must be empty if type is `global_ipv4`. Conflicts with `metro`. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Metro where to allocate the public IP address block, makes sense only if type is `public_ipv4` and must be empty if type is `global_ipv4`. Conflicts with `facility`. +* `description` - (Optional) Arbitrary description. +* `tags` - (Optional) String list of tags. +* `vrf_id` - (Optional) Only valid and required when `type` is `vrf`. VRF ID for type=vrf reservations. +* `wait_for_state` - (Optional) Wait for the IP reservation block to reach a desired state on resource creation. One of: `pending`, `created`. The `created` state is default and recommended if the addresses are needed within the configuration. An error will be returned if a timeout or the `denied` state is encountered. +* `custom_data` - (Optional) Custom Data is an arbitrary object (submitted in Terraform as serialized JSON) to assign to the IP Reservation. This may be helpful for self-managed IPAM. The object must be valid JSON. +* `network` - (Optional) Only valid as an argument and required when `type` is `vrf`. An unreserved network address from an existing `ip_range` in the specified VRF. +* `cidr` - (Optional) Only valid as an argument and required when `type` is `vrf`. The size of the network to reserve from an existing VRF ip_range. `cidr` can only be specified with `vrf_id`. Range is 22-31. Virtual Circuits require 30-31. Other VRF resources must use a CIDR in the 22-29 range. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the block. +* `cidr_notation` - Address and mask in CIDR notation, e.g. `147.229.15.30/31`. +* `network` - Network IP address portion of the block specification. +* `netmask` - Mask in decimal notation, e.g. `255.255.255.0`. +* `cidr` - length of CIDR prefix of the block as integer. +* `address_family` - Address family as integer. One of `4` or `6`. +* `public` - Boolean flag whether addresses from a block are public. +* `global` - Boolean flag whether addresses from a block are global (i.e. can be assigned in any metro). +* `vrf_id` - VRF ID of the block when type=vrf + +-> **NOTE:** Idempotent reference to a first `/32` address from a reserved block might look like `join("/", [cidrhost(metal_reserved_ip_block.myblock.cidr_notation,0), "32"])`. + +## Import + +This resource can be imported using an existing IP reservation ID: + +```sh +terraform import equinix_metal_reserved_ip_block {existing_ip_reservation_id} +``` diff --git a/templates/resources/metal_spot_market_request.md.tmpl b/templates/resources/metal_spot_market_request.md.tmpl new file mode 100644 index 000000000..ee7916b3a --- /dev/null +++ b/templates/resources/metal_spot_market_request.md.tmpl @@ -0,0 +1,50 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_spot_market_request (Resource) + +Provides an Equinix Metal Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see [this article in Equinix Metal documentation](https://metal.equinix.com/developers/docs/deploy/spot-market/). + +## Example Usage + +{{tffile "examples/resources/metal_spot_market_request/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `devices_max` - (Required) Maximum number devices to be created. +* `devices_min` - (Required) Miniumum number devices to be created. +* `max_bid_price` - (Required) Maximum price user is willing to pay per hour per device. +* `project_id` - (Required) Project ID. +* `wait_for_devices` - (Optional) On resource creation wait until all desired devices are active. On resource destruction wait until devices are removed. +* `facilities` - (**Deprecated**) Facility IDs where devices should be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `metro` - (Optional) Metro where devices should be created. +* `locked` - (Optional) Blocks deletion of the SpotMarketRequest device until the lock is disabled. +* `instance_parameters` - (Required) Key/Value pairs of parameters for devices provisioned from this request. Valid keys are: `billing_cycle`, `plan`, `operating_system`, `hostname`, `termination_time`, `always_pxe`, `description`, `features`, `locked`, `project_ssh_keys`, `user_ssh_keys`, `userdata`, `customdata`, `ipxe_script_url`, `tags`. You can find each parameter description in [equinix_metal_device](equinix_metal_device.md) docs. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The ID of the Spot Market Request. + +### Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/configuration/resources#operation-timeouts) for certain actions: + +* `create` - (Defaults to 60 mins) Used when creating the Spot Market Request and `wait_for_devices` is set to `true`. +* `delete` - (Defaults to 60 mins) Used when destroying the Spot Market Request and `wait_for_devices` is set to `true`. + +## Import + +This resource can be imported using an existing spot market request ID: + +```sh +terraform import equinix_metal_spot_market_request {existing_spot_market_request_id} +``` diff --git a/templates/resources/metal_ssh_key.md.tmpl b/templates/resources/metal_ssh_key.md.tmpl new file mode 100644 index 000000000..34316e567 --- /dev/null +++ b/templates/resources/metal_ssh_key.md.tmpl @@ -0,0 +1,44 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_ssh_key (Resource) + +Provides a resource to manage User SSH keys on your Equinix Metal user account. If you create a new device in a project, all the keys of the project's collaborators will be injected to the device. + +The link between User SSH key and device is implicit. If you want to make sure that a key will be copied to a device, you must ensure that the device resource `depends_on` the key resource. + +## Example Usage + +{{tffile "examples/resources/metal_ssh_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the SSH key for identification +* `public_key` - (Required) The public key. If this is a file, it can be read using the file interpolation function + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The unique ID of the key. +* `name` - The name of the SSH key. +* `public_key` - The text of the public key. +* `fingerprint` - The fingerprint of the SSH key. +* `owner_id` - The UUID of the Equinix Metal API User who owns this key. +* `created` - The timestamp for when the SSH key was created. +* `updated` - The timestamp for the last time the SSH key was updated. + +## Import + +This resource can be imported using an existing SSH Key ID: + +```sh +terraform import equinix_metal_ssh_key {existing_sshkey_id} +``` diff --git a/templates/resources/metal_user_api_key.md.tmpl b/templates/resources/metal_user_api_key.md.tmpl new file mode 100644 index 000000000..7eea36218 --- /dev/null +++ b/templates/resources/metal_user_api_key.md.tmpl @@ -0,0 +1,31 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_user_api_key (Resource) + +Use this resource to create Metal User API Key resources in Equinix Metal. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header `X-Auth-Token`). + +Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources. + +## Example Usage + +{{tffile "examples/resources/metal_user_api_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `description` - (Required) Description string for the User API Key resource. +* `read-only` - (Required) Flag indicating whether the API key shoud be read-only. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `user_id` - UUID of the owner of the API key. +* `token` - API token which can be used in Equinix Metal API clients. diff --git a/templates/resources/metal_virtual_circuit.md.tmpl b/templates/resources/metal_virtual_circuit.md.tmpl new file mode 100644 index 000000000..5631be83f --- /dev/null +++ b/templates/resources/metal_virtual_circuit.md.tmpl @@ -0,0 +1,57 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_virtual_circuit (Resource) + +Use this resource to associate VLAN with a Dedicated Port from [Equinix Fabric - software-defined interconnections](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/#associating-a-vlan-with-a-dedicated-port). + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +Pick an existing Project and dedicated Connection, create a VLAN and use `equinix_metal_virtual_circuit` to associate it with a Primary Port of the Connection. + +{{tffile "examples/resources/metal_virtual_circuit/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) UUID of Connection where the VC is scoped to. +* `project_id` - (Required) UUID of the Project where the VC is scoped to. +* `port_id` - (Required) UUID of the Connection Port where the VC is scoped to. +* `nni_vlan` - (Required) Equinix Metal network-to-network VLAN ID. +* `vlan_id` - (Required) UUID of the VLAN to associate. +* `name` - (Optional) Name of the Virtual Circuit resource. +* `description` - (Optional) Description for the Virtual Circuit resource. +* `tags` - (Optional) Tags for the Virtual Circuit resource. +* `speed` - (Optional) Speed of the Virtual Circuit resource. +* `vrf_id` - (Optional) UUID of the VRF to associate. +* `peer_asn` - (Optional, required with `vrf_id`) The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF. +* `subnet` - (Optional, required with `vrf_id`) A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. + * For a /31 block, it will only have two IP addresses, which will be used for the metal_ip and customer_ip. + * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip. +* `metal_ip` - (Optional, required with `vrf_id`) The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet. +* `customer_ip` - (Optional, required with `vrf_id`) The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet. +* `md5` - (Optional, only valid with `vrf_id`) The password that can be set for the VRF BGP peer + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `status` - Status of the virtal circuit. +* `vnid` - VNID VLAN parameter, see the [documentation for Equinix Fabric](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/). +* `nni_vnid` - NNI VLAN parameters, see the [documentation for Equinix Fabric](https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/). + +## Import + +This resource can be imported using an existing Virtual Circuit ID: + +```sh +terraform import equinix_metal_virtual_circuit {existing_id} +``` diff --git a/templates/resources/metal_vlan.md.tmpl b/templates/resources/metal_vlan.md.tmpl new file mode 100644 index 000000000..288a04bdb --- /dev/null +++ b/templates/resources/metal_vlan.md.tmpl @@ -0,0 +1,44 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_vlan (Resource) + +Provides a resource to allow users to manage Virtual Networks in their projects. + +To learn more about Layer 2 networking in Equinix Metal, refer to + +* https://metal.equinix.com/developers/docs/networking/layer2/ +* https://metal.equinix.com/developers/docs/networking/layer2-configs/ + +## Example Usage + +{{tffile "examples/resources/metal_vlan/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) ID of parent project. +* `metro` - (Optional) Metro in which to create the VLAN +* `facility` - (**Deprecated**) Facility where to create the VLAN. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) +* `description` - (Optional) Description string. +* `vxlan` - (Optional) VLAN ID, must be unique in metro. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the virtual network. + +## Import + +This resource can be imported using an existing VLAN ID (UUID): + +```sh +terraform import equinix_metal_vlan {existing_vlan_id} +``` diff --git a/templates/resources/metal_vrf.md.tmpl b/templates/resources/metal_vrf.md.tmpl new file mode 100644 index 000000000..4d7e4732a --- /dev/null +++ b/templates/resources/metal_vrf.md.tmpl @@ -0,0 +1,50 @@ +--- +subcategory: "Metal" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_metal_vrf (Resource) + +Use this resource to manage a VRF. + +See the [Virtual Routing and Forwarding documentation](https://deploy.equinix.com/developers/docs/metal/layer2-networking/vrf/) for product details and API reference material. + +## Example Usage + +Create a VRF in your desired metro and project with any IP ranges that you want the VRF to route and forward. + +{{tffile "examples/resources/metal_vrf/example_1.tf"}} + +Create IP reservations and assign them to a Metal Gateway resources. The Gateway will be assigned the first address in the block. + +{{tffile "examples/resources/metal_vrf/example_2.tf"}} + +Attach a Virtual Circuit from a Dedicated Metal Connection to the Metal Gateway. + +{{tffile "examples/resources/metal_vrf/example_3.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) User-supplied name of the VRF, unique to the project +* `metro` - (Required) Metro ID or Code where the VRF will be deployed. +* `project_id` - (Required) Project ID where the VRF will be deployed. +* `description` - (Optional) Description of the VRF. +* `local_asn` - (Optional) The 4-byte ASN set on the VRF. +* `ip_ranges` - (Optional) All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF. + +## Attributes Reference + +No additional attributes are exported. + +## Import + +This resource can be imported using an existing VRF ID: + +```sh +terraform import equinix_metal_vrf {existing_id} +``` diff --git a/templates/resources/network_acl_template.md.tmpl b/templates/resources/network_acl_template.md.tmpl new file mode 100644 index 000000000..d5e263a5e --- /dev/null +++ b/templates/resources/network_acl_template.md.tmpl @@ -0,0 +1,59 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_acl_template (Resource) + +Resource `equinix_network_acl_template` allows creation and management of Equinix Network Edge device Access Control List templates. + +Device ACL templates give possibility to define set of rules will allowed inbound traffic. Templates can be assigned to the network devices. + +## Example Usage + +{{tffile "examples/resources/network_acl_template/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) ACL template name. +* `project_id` - (Optional) Unique Identifier for the project resource where the acl template is scoped to.If you leave it out, the ACL template will be created under the default project id of your organization. +* `description` - (Optional) ACL template description, up to 200 characters. +* `metro_code` - (Deprecated) ACL template location metro code. +* `inbound_rule` - (Required) One or more rules to specify allowed inbound traffic. Rules are ordered, matching traffic rule stops processing subsequent ones. + +The `inbound_rule` block has below fields: + +* `subnets` - (Deprecated) Inbound traffic source IP subnets in CIDR format. +* `subnet` - (Required) Inbound traffic source IP subnet in CIDR format. +* `protocol` - (Required) Inbound traffic protocol. One of `IP`, `TCP`, `UDP`. +* `src_port` - (Required) Inbound traffic source ports. Allowed values are a comma separated list of ports, e.g., `20,22,23`, port range, e.g., `1023-1040` or word `any`. +* `dst_port` - (Required) Inbound traffic destination ports. Allowed values are a comma separated list of ports, e.g., `20,22,23`, port range, e.g., `1023-1040` or word `any`. +* `description` - (Optional) Inbound rule description, up to 200 characters. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - Unique identifier of ACL template resource. +* `device_id` - (Deprecated) Identifier of a network device where template was applied. +* `device_acl_status` - Status of ACL template provisioning process, where template was applied. One of `PROVISIONING`, `PROVISIONED`. +* `device_details` - List of the devices where the ACL template is applied. + +The `device_details` block has below fields: + +* `uuid` - Device uuid. +* `name` - Device name. +* `acl_status` - Device ACL provisioning status where template was applied. One of `PROVISIONING`, `PROVISIONED`. + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_acl_template.example {existing_id} +``` diff --git a/templates/resources/network_bgp.md.tmpl b/templates/resources/network_bgp.md.tmpl new file mode 100644 index 000000000..2442c3c72 --- /dev/null +++ b/templates/resources/network_bgp.md.tmpl @@ -0,0 +1,43 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_bgp (Resource) + +Resource `equinix_network_bgp` allows creation and management of Equinix Network Edge BGP peering configurations. + +## Example Usage + +{{tffile "examples/resources/network_bgp/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) identifier of a connection established between. network device and remote service provider that will be used for peering. +* `local_ip_address` - (Required) IP address in CIDR format of a local device. +* `local_asn` - (Required) Local ASN number. +* `remote_ip_address` - (Required) IP address of remote peer. +* `remote_asn` - (Required) Remote ASN number. +* `authentication_key` - (Optional) shared key used for BGP peer authentication. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - BGP peering configuration unique identifier. +* `device_id` - unique identifier of a network device that is a local peer in a given BGP peering configuration. +* `state` - BGP peer state, one of `Idle`, `Connect`, `Active`, `OpenSent`, `OpenConfirm`, `Established`. +* `provisioning_status` - BGP peering configuration provisioning status, one of `PROVISIONING`, `PENDING_UPDATE`, `PROVISIONED`, `FAILED`. + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_bgp.example {existing_id} +``` diff --git a/templates/resources/network_device.md.tmpl b/templates/resources/network_device.md.tmpl new file mode 100644 index 000000000..387127ebd --- /dev/null +++ b/templates/resources/network_device.md.tmpl @@ -0,0 +1,186 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_device (Resource) + +Resource `equinix_network_device` allows creation and management of Equinix Network Edge virtual network devices. + +Network Edge virtual network devices can be created in two modes: + +* **managed** - (default) Where Equinix manages connectivity and services in the device and customer gets limited access to the device. +* **self-configured** - Where customer provisions and manages own services in the device with less restricted access. Some device types are offered only in this mode. + +In addition to management modes, there are two software license modes available: + +* **subscription** - Where Equinix provides software license, including end-to-end support, and bills for the service respectively. +* **BYOL** - [bring your own license] Where customer brings his own, already procured device software license. There are no charges associated with such license. It is the only licensing mode for `self-configured` devices. + +## Example Usage + +{{tffile "examples/resources/network_device/example_1.tf"}} + +{{tffile "examples/resources/network_device/example_2.tf"}} + +{{tffile "examples/resources/network_device/example_3.tf"}} + +{{tffile "examples/resources/network_device/example_4.tf"}} + +{{tffile "examples/resources/network_device/example_5.tf"}} + +{{tffile "examples/resources/network_device/example_6.tf"}} + +{{tffile "examples/resources/network_device/example_7.tf"}} + +{{tffile "examples/resources/network_device/example_8.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Device name. +* `type_code` - (Required) Device type code. +* `metro_code` - (Required) Device location metro code. +* `hostname` - (Optional) Device hostname prefix. +* `package_code` - (Required) Device software package code. +* `version` - (Required) Device software software version. +* `core_count` - (Required) Number of CPU cores used by device. (**NOTE: Use this field to resize your device. When resizing your HA devices, primary device will be upgraded first. If the upgrade failed, device will be automatically rolled back to the previous state with original core number.**) +* `term_length` - (Required) Device term length. +* `self_managed` - (Optional) Boolean value that determines device management mode, i.e., `self-managed` or `Equinix-managed` (default). +* `byol` - (Optional) Boolean value that determines device licensing mode, i.e., `bring your own license` or `subscription` (default). +* `license_token` - (Optional, conflicts with `license_file`) License Token applicable for some device types in BYOL licensing mode. +* `license_file` - (Optional) Path to the license file that will be uploaded and applied on a device. Applicable for some device types in BYOL licensing mode. +* `license_file_id` - (Optional, conflicts with `license_file`) Identifier of a license file that will be applied on the device. +* `cloud_init_file_id` - (Optional) Identifier of a cloud init file that will be applied on the device. +* `throughput` - (Optional) Device license throughput. +* `throughput_unit` - (Optional) License throughput unit. One of `Mbps` or `Gbps`. +* `account_number` - (Required) Billing account number for a device. +* `notifications` - (Required) List of email addresses that will receive device status notifications. +* `purchase_order_number` - (Optional) Purchase order number associated with a device order. +* `order_reference` - (Optional) Name/number used to identify device order on the invoice. +* `acl_template_id` - (Optional) Identifier of a WAN interface ACL template that will be applied on the device. +* `mgmt_acl_template_uuid` - (Optional) Identifier of an MGMT interface ACL template that will be applied on the device. +* `additional_bandwidth` - (Optional) Additional Internet bandwidth, in Mbps, that will be allocated to the device (in addition to default 15Mbps). +* `interface_count` - (Optional) Number of network interfaces on a device. If not specified, default number for a given device type will be used. +* `wan_interafce_id` - (Optional) Specify the WAN/SSH interface id. If not specified, default WAN/SSH interface for a given device type will be used. +* `vendor_configuration` - (Optional) Map of vendor specific configuration parameters for a device (controller1, activationKey, managementType, siteId, systemIpAddress, privateAddress, privateCidrMask, privateGateway, licenseKey, licenseId) +* `ssh-key` - (Optional) Definition of SSH key that will be provisioned on a device (max one key). See [SSH Key](#ssh-key) below for more details. +* `secondary_device` - (Optional) Definition of secondary device for redundant device configurations. See [Secondary Device](#secondary-device) below for more details. +* `cluster_details` - (Optional) An object that has the cluster details. See [Cluster Details](#cluster-details) below for more details. +* `connectivity` - (Optional) Device accessibility (INTERNET-ACCESS or PRIVATE or INTERNET-ACCESS-WITH-PRVT-MGMT). If not specified, default will be INTERNET-ACCESS +* `project_id` - (Optional) Unique Identifier for the project resource where the device is scoped to.If you leave it out, the device will be created under the default project id of your organization. +* `diverse_device_id` - (Optional) Unique ID of an existing device. Use this field to let Equinix know if you want your new device to be in a different location from any existing virtual device. This field is only meaningful for single devices. + +### Secondary Device + +-> **NOTE:** Network Edge provides different High Availability (HA) options. By defining a `secondary_device` block, terraform will deploy [Redundant Devices](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm#:~:text=Redundant%20Devices%20(Active/Active)), useful for customers that require two actively forwarding data planes (Active/Active) on separate hardware stacks. See [Architecting for Resiliency](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/NE-architecting-resiliency.htm) documentation to know more about the fault-tolerant solutions that you can achieve. + +The `secondary_device` block supports the following arguments: + +* `name` - (Required) Secondary device name. +* `metro_code` - (Required) Metro location of a secondary device. +* `hostname` - (Optional) Secondary device hostname. +* `license_token` - (Optional, conflicts with `license_file`) License Token can be provided for some device types o the device. +* `license_file` - (Optional) Path to the license file that will be uploaded and applied on a secondary device. Applicable for some device types in BYOL licensing mode. +* `license_file_id` - (Optional, conflicts with `license_file`) Identifier of a license file that will be applied on a secondary device. +* `cloud_init_file_id` - (Optional) Identifier of a cloud init file that will be applied on a secondary device. +* `account_number` - (Required) Billing account number for secondary device. +* `notifications` - (Required) List of email addresses that will receive notifications about secondary device. +* `additional_bandwidth` - (Optional) Additional Internet bandwidth, in Mbps, for a secondary device. +* `vendor_configuration` - (Optional) Key/Value pairs of vendor specific configuration parameters for a secondary device. Key values are `controller1`, `activationKey`, `managementType`, `siteId`, `systemIpAddress`, `privateAddress`, `privateCidrMask`, `privateGateway`, `licenseKey`, `licenseId`. +* `acl_template_id` - (Optional) Identifier of a WAN interface ACL template that will be applied on a secondary device. +* `mgmt_acl_template_uuid` - (Optional) Identifier of an MGMT interface ACL template that will be applied on a secondary device. +* `ssh-key` - (Optional) Up to one definition of SSH key that will be provisioned on a secondary device. + +### SSH Key + +The `ssh_key` block supports the following arguments: + +* `username` - (Required) username associated with given key. +* `name` - (Required) reference by name to previously provisioned public SSH key. + +### Cluster Details + +-> **NOTE:** Network Edge provides different High Availability (HA) options. By defining a `cluster_details` block, terraform will deploy a `Device Clustering`. This option, based on vendor-specific features, allows customers to deploy more advanced resilient configurations than `secondary_device`. See [Network Edge HA Options](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm) documentation to know which vendors support clustered devices. See [Architecting for Resiliency](https://docs.equinix.com/en-us/Content/Interconnection/NE/deploy-guide/NE-architecting-resiliency.htm) documentation to know more about the fault-tolerant solutions that you can achieve. + +The `cluster_details` block supports the following arguments: + +* `cluster_name` - (Required) The name of the cluster device +* `node0` - (Required) An object that has `node0` configuration. See [Cluster Details - Nodes](#cluster-details---nodes) below for more details. +* `node1` - (Required) An object that has `node1` configuration. See [Cluster Details - Nodes](#cluster-details---nodes) below for more details. + +### Cluster Details - Nodes + +The `node0` and `node1` blocks supports the following arguments: + +* `vendor_configuration` - (Optional) An object that has fields relevant to the vendor of the cluster device. See [Cluster Details - Nodes - Vendor Configuration](#cluster-details---nodes---vendor-configuration) below for more details. +* `license_file_id` - (Optional) License file id. This is necessary for Fortinet and Juniper clusters. +* `license_token` - (Optional) License token. This is necessary for Palo Alto clusters. + +### Cluster Details - Nodes - Vendor Configuration + +The `vendor_configuration` block supports the following arguments: + +* `hostname` - (Optional) Hostname. This is necessary for Palo Alto, Juniper, and Fortinet clusters. +* `admin_password` - (Optional) The administrative password of the device. You can use it to log in to the console. This field is not available for all device types. +* `controller1` - (Optional) System IP Address. Mandatory for the Fortinet SDWAN cluster device. +* `activation_key` - (Optional) Activation key. This is required for Velocloud clusters. +* `controller_fqdn` - (Optional) Controller fqdn. This is required for Velocloud clusters. +* `root_password` - (Optional) The CLI password of the device. This field is relevant only for the Velocloud SDWAN cluster. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - Device unique identifier. +* `status` - Device provisioning status. Possible values are `INITIALIZING`, `PROVISIONING`, `WAITING_FOR_PRIMARY`, `WAITING_FOR_SECONDARY`, `WAITING_FOR_REPLICA_CLUSTER_NODES`, `CLUSTER_SETUP_IN_PROGRESS`, `FAILED`, `PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `RESOURCE_UPGRADE_IN_PROGRESS`, `RESOURCE_UPGRADE_FAILED`. +* `license_status` - Device license registration status. Possible values are `APPLYING_LICENSE`, `REGISTERED`, `APPLIED`, `WAITING_FOR_CLUSTER_SETUP`, `REGISTRATION_FAILED`. +* `license_file_id` - Unique identifier of applied license file. +* `ibx` - Device location Equinix Business Exchange name. +* `region` - Device location region. +* `acl_template_id` - Unique identifier of applied ACL template. +* `ssh_ip_address` - IP address of SSH enabled interface on the device. +* `ssh_ip_fqdn` - FQDN of SSH enabled interface on the device. +* `redundancy_type` - Device redundancy type applicable for HA devices, either primary or secondary. +* `redundant_id` - Unique identifier for a redundant device applicable for HA devices. +* `interface` - List of device interfaces. See [Interface Attribute](#interface-attribute) below for more details. +* `asn` - (Autonomous System Number) Unique identifier for a network on the internet. +* `zone_code` - Device location zone code. +* `cluster_id` - The ID of the cluster. +* `num_of_nodes` - The number of nodes in the cluster. +* `diverse_device_name` - Name of the device with diverse device UUID. This field is returned in device details if the device is created by passing diverse_device_id. + +### Interface Attribute + +Each interface attribute has below fields: + +* `id` - interface identifier. +* `name` - interface name. +* `status` - interface status. One of `AVAILABLE`, `RESERVED`, `ASSIGNED`. +* `operational_status` - interface operational status. One of `up`, `down`. +* `mac_address` - interface MAC address. +* `ip_address` - interface IP address. +* `assigned_type` - interface management type (Equinix Managed or empty). +* `type` - interface type. + +## Timeouts + +This resource provides the following [Timeouts configuration](https://www.terraform.io/language/resources/syntax#operation-timeouts) options: + +* create - Default is 90 minutes +* update - Default is 90 minutes +* delete - Default is 30 minutes + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_device.example {existing_id} +``` + +The `license_token`, `mgmt_acl_template_uuid` and `cloud_init_file_id` fields can not be imported. diff --git a/templates/resources/network_device_link.md.tmpl b/templates/resources/network_device_link.md.tmpl new file mode 100644 index 000000000..6a9372633 --- /dev/null +++ b/templates/resources/network_device_link.md.tmpl @@ -0,0 +1,84 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_device_link (Resource) + +Resource `equinix_network_device_link` allows creation and management of Equinix Network Edge virtual network device links. + +## Example Usage + +{{tffile "examples/resources/network_device_link/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) device link name. +* `subnet` - (Optional) device link subnet in CIDR format. Not required for link between self configured devices. +* `device` - (Required) definition of one or more devices belonging to the device link. See [Device](#device) section below for more details. +* `link` - (Deprecated) definition of one or more, inter metro, connections belonging to the device link. See [Link](#link) section below for more details. +* `metro_link` - (Optional) definition of one or more, inter metro, connections belonging to the device link. See [Metro Link](#Metro_Link) section below for more details. +* `redundancy_type` - (Optional) Whether the connection should be created through Fabric's primary or secondary port. Supported values: `PRIMARY` (Default), `SECONDARY`, `HYBRID` +* `project_id` - (Optional) Unique Identifier for the project resource where the device link is scoped to.If you leave it out, the device link will be created under the default project id of your organization. + +### Device + +The `device` block supports the following arguments: + +* `id` - (Required) Device identifier. +* `asn` - (Optional) Device ASN number. Not required for self configured devices. +* `interface_id` - (Optional) Device network interface identifier to use for device link connection. + +### Link + +The `link` block supports the following arguments: + +* `account_number` - (Required) billing account number to be used for connection charges +* `throughput` - (Required) connection throughput. +* `throughput_unit` - (Required) connection throughput unit (Mbps or Gbps). +* `src_metro_code` - (Required) connection source metro code. +* `dst_metro_code` - (Required) connection destination metro code. +* `src_zone_code` - (Deprecated) connection source zone code is not required. +* `dst_zone_code` - (Deprecated) connection destination zone code is not required. + +### Metro_Link + +The `Metro link` block supports the following arguments: + +* `account_number` - (Required) billing account number to be used for connection charges +* `throughput` - (Required) connection throughput. +* `throughput_unit` - (Required) connection throughput unit (Mbps or Gbps). +* `metro_code` - (Required) connection metro code. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - Device link unique identifier. +* `status` - Device link provisioning status. One of `PROVISIONING`, `PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `FAILED`. + +The `device` block attributes: + +* `ip_address` - IP address from device link subnet that was assigned to the device +* `status` - device link provisioning status on a given device. One of `PROVISIONING`, `PROVISIONED`, `DEPROVISIONING`, `DEPROVISIONED`, `FAILED`. + +## Timeouts + +This resource provides the following [Timeouts configuration](https://www.terraform.io/language/resources/syntax#operation-timeouts) options: + +* create - Default is 10 minutes +* update - Default is 10 minutes +* delete - Default is 10 minutes + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_device_link.example {existing_id} +``` diff --git a/templates/resources/network_file.md.tmpl b/templates/resources/network_file.md.tmpl new file mode 100644 index 000000000..911c1fe22 --- /dev/null +++ b/templates/resources/network_file.md.tmpl @@ -0,0 +1,44 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_file (Resource) + +Resource `equinix_network_file` allows creation and management of Equinix Network Edge files. + +## Example Usage + +{{tffile "examples/resources/network_file/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `file_name` - (Required) File name. +* `content` - (Required) Uploaded file content, expected to be a UTF-8 encoded string. +* `metro_code` - (Required) File upload location metro code. It should match the device location metro code. +* `type_code` - (Required) Device type code. +* `process_type` - (Required) File process type (LICENSE or CLOUD_INIT). +* `self_managed` - (Required) Boolean value that determines device management mode, i.e., `self-managed` or `Equinix-managed`. +* `byol` - (Required) Boolean value that determines device licensing mode, i.e., `bring your own license` or `subscription`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - Unique identifier of file resource. +* `status` - File upload status. + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_file.example {existing_id} +``` + +The `content`, `self_managed` and `byol` fields can not be imported. diff --git a/templates/resources/network_ssh_key.md.tmpl b/templates/resources/network_ssh_key.md.tmpl new file mode 100644 index 000000000..35419aca5 --- /dev/null +++ b/templates/resources/network_ssh_key.md.tmpl @@ -0,0 +1,38 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_ssh_key (Resource) + +Resource `equinix_network_ssh_key` allows creation and management of Equinix Network Edge SSH keys. + +## Example Usage + +{{tffile "examples/resources/network_ssh_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of SSH key used for identification. +* `public_key` - (Required) The SSH public key. If this is a file, it can be read using the file interpolation function. +* `type` - (Optional) The type of SSH key: `RSA` (default) or `DSA`. +* `project_id` - (Optional) Unique Identifier for the project resource where the SSH key is scoped to.If you leave it out, the ssh key will be created under the default project id of your organization. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - The unique identifier of the key + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_ssh_key.example {existing_id} +``` diff --git a/templates/resources/network_ssh_user.md.tmpl b/templates/resources/network_ssh_user.md.tmpl new file mode 100644 index 000000000..a71e5a7c7 --- /dev/null +++ b/templates/resources/network_ssh_user.md.tmpl @@ -0,0 +1,37 @@ +--- +subcategory: "Network Edge" +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# equinix_network_ssh_user (Resource) + +Resource `equinix_network_ssh_user` allows creation and management of Equinix Network Edge SSH users. + +## Example Usage + +{{tffile "examples/resources/network_ssh_user/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `username` - (Required) SSH user login name. +* `password` - (Required) SSH user password. +* `device_ids` - (Required) list of device identifiers to which user will have access. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - SSH user unique identifier. + +## Import + +This resource can be imported using an existing ID: + +```sh +terraform import equinix_network_ssh_user.example {existing_id} +```