Tags: equinix/terraform-provider-equinix
Tags
feat!: drop support for Equinix Metal (#1006) Equinix Metal is sunsetting on June 30, 2026. See https://docs.equinix.com/metal/ for more information. Terraform support for Equinix Metal resources is available in the v4 Terraform provider. When removing `equinix_metal_*` resources from Equinix Terraform configurations, provider configuration parameters specific to Equinix Metal, such as `auth_token` must also be removed. See https://registry.terraform.io/providers/equinix/equinix/latest/docs BREAKING CHANGE: equinix_metal_* resource support has been removed in Equinix Terraform provider v5
fix: Updating the commit message to trigger publish action for new re… …lease (#1018) The older release PR title was changed to Chore which resulted in slipping the publish action. Created this PR with a cosmetic change to just change the commit message to be able to publish a new release
feat: add .github/copilot-instructions.md for agent onboarding (#972) Closes: onboarding task for Copilot coding agent ## Overview Adds comprehensive development guide at `.github/copilot-instructions.md` to enable Copilot agents to work efficiently with this codebase without repeated exploration. ## Content Structure - **Repository Overview**: Go 1.23.0 Terraform provider, 64K LOC, muxed SDKv2/Framework architecture - **Project Layout**: Directory structure, configuration files, architectural boundaries (notably: no new files in `equinix/` package) - **Build Workflow**: Validated command sequences with timings ```bash make fmt && make fmtcheck && make build && make test && make lint && make docs ``` - **CI/CD Pipeline**: All 4 PR validation workflows, common failures with fixes - **Development Patterns**: Resource/data source conventions, testing strategy, documentation requirements - **Known Issues**: Network-dependent docs generation, API rate limits, acceptance test costs ## Key Details - Pre-commit checklist prevents common CI failures (incorrect PR titles, equinix package violations, uncommitted docs) - Command timings documented (build ~2s, test ~3min, lint ~5min) to set timeout expectations - File fits 2-page limit at 1,367 words while covering all build/test/validate workflows - All documented commands tested and verified in clean environment Agents can now reference this instead of searching codebase, reducing exploration overhead and bash command failures. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `checkpoint-api.hashicorp.com` > - Triggering command: `/tmp/go-build2832158625/b001/exe/tfplugindocs --rendered-provider-name=Equinix` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/equinix/terraform-provider-equinix/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> Your task is to "onboard" this repository to Copilot coding agent by adding a .github/copilot-instructions.md file in the repository that contains information describing how a coding agent seeing it for the first time can work most efficiently. You will do this task only one time per repository and doing a good job can SIGNIFICANTLY improve the quality of the agent's work, so take your time, think carefully, and search thoroughly before writing the instructions. <Goals> - Reduce the likelihood of a coding agent pull request getting rejected by the user due to generating code that fails the continuous integration build, fails a validation pipeline, or having misbehavior. - Minimize bash command and build failures. - Allow the agent to complete its task more quickly by minimizing the need for exploration using grep, find, str_replace_editor, and code search tools. </Goals> <Limitations> - Instructions must be no longer than 2 pages. - Instructions must not be task specific. </Limitations> <WhatToAdd> Add the following high level details about the codebase to reduce the amount of searching the agent has to do to understand the codebase each time: <HighLevelDetails> - A summary of what the repository does. - High level repository information, such as the size of the repo, the type of the project, the languages, frameworks, or target runtimes in use. </HighLevelDetails> Add information about how to build and validate changes so the agent does not need to search and find it each time. <BuildInstructions> - For each of bootstrap, build, test, run, lint, and any other scripted step, document the sequence of steps to take to run it successfully as well as the versions of any runtime or build tools used. - Each command should be validated by running it to ensure that it works correctly as well as any preconditions and postconditions. - Try cleaning the repo and environment and running commands in different orders and document errors and and misbehavior observed as well as any steps used to mitigate the problem. - Run the tests and document the order of steps required to run the tests. - Make a change to the codebase. Document any unexpected build issues as well as the workarounds. - Document environment setup steps that seem optional but that you have validated are actually required. - Document the time required for commands that failed due to timing out. - When you find a sequence of commands that work for a particular purpose, document them in detail. - Use language to indicate when something should always be done. For example: "always run npm install before building". - Record any validation steps from documentation. </BuildInstructions> List key facts about the layout and architecture of the codebase to help the agent find where to make changes with minimal searching. <ProjectLayout> - A description of the major architectural elements of the project, including the relative paths to the main project files, the location of configuration files for linting, compilation, testing, and preferences. - A description of the checks run prior to check in, including any GitHub workflows, continuous integration builds, or other validation pipelines. - Document the steps so that the agent can replicate these itself. - Any explicit validation steps that the agent can consider to have further confidence in its changes. - Dependencies that aren't obvious from the layout or file structure. - Finally, fill in any remaining space with detailed lists of the following, in order of priority: the list of files in the repo root, the contents of the README, the contents of any key source files, the list of files in the next level down of directories, giving priority to the more structurally important and snippets of code from key source files, such as the one containing the main method. </ProjectLayout> </WhatToAdd> <StepsToFollow> - Perform a comprehensive inventory of the codebase. Search for and view: - README.md, CONTRIBUTING.md, and all other documentation files. - Search the codebase for build steps and indications of workarounds like 'HACK', 'TODO', etc. - All scripts, particularly those pertaining to build and repo or environment setup. - All build and actions pipelines. - All project files. - All configuration and linting files. - For each file: - think: are the contents or the existence of the file information that the coding agent will need to implement, build, test, validate, or demo a code change? - If yes: - Document the command or information in detail. - Explicitly indicate which commands work and which do not and the order in which commands should be run. - Document any errors encountered as well as the steps taken to workaround them. - Document any other steps or information that the agent can use to reduce time spent exploring or trying and failing to run bash commands. - Finally, explicitly instruct the agent to trust the instructions and only perform a search if the information in the instruction... </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Signed-off-by: Marques Johansson <317653+displague@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: displague <317653+displague@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
docs: fix broken links in Go source and template files (#998) Many documentation links throughout the provider were 404ing due to domain migrations (metal.equinix.com → docs.equinix.com, developer.equinix.com → docs.equinix.com) and URL restructuring. Additionally, `www.terraform.io` links and deprecated `equinix-labs` Terraform Registry module links needed updating. All fixes are made in the authoritative sources (`.go` schema descriptions and `.tmpl` templates); `docs/` reflects what `make docs` regenerates from those sources. ## URL Migrations **Equinix Metal** - `metal.equinix.com/developers/docs/*` → `docs.equinix.com/metal/*` - `metal.equinix.com/developers/api/*` → `docs.equinix.com/api-catalog/metalv1/*` - `metal/networking/local-global-bgp/` → `metal/bgp/bgp-on-equinix-metal/` - `metal/networking/fabric/` → `metal/interconnections/introduction/` - `metal/networking/layer2*` → `metal/layer2-networking/overview/` - `metal/accounts/(projects|users)/#api-keys` → `metal/identity-access-management/api-keys/` - `metal/servers/custom-partitioning-raid/` → `metal/storage/custom-partitioning-raid/` - `feedback.equinixmetal.com/changelog/*` → `docs.equinix.com/metal/locations/` - `api-catalog/metalv1/facilities/` — link removed (facilities API endpoint was removed) - `api-catalog/metalv1/operatingsystems` → `api-catalog/metalv1/#tag/Operating-Systems` **Equinix Fabric & FCR** - `developer.equinix.com/catalog/fabricv4#tag/*` → `docs.equinix.com/api-catalog/fabricv4/#tag/*` - `developer.equinix.com/dev-docs/fabric/api-reference/*#<section>` → `docs.equinix.com/api-catalog/fabricv4/#tag/<Tag>` - `developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token` → `docs.equinix.com/equinix-api/api-authentication/` - `docs.equinix.com/en-us/Content/Interconnection/Fabric/*` → `docs.equinix.com/fabric/*` or `docs.equinix.com/api-catalog/fabricv4/` - `docs.equinix.com/en-us/Content/Interconnection/FCR/*` → `docs.equinix.com/fabric-cloud-router/` - `fabric/fabric-api/` (bare) → `api-catalog/fabricv4/` - `fabric/ports/` (bare) → `fabric/ports/managing-fabric-ports/` - `fabric/service-providers/` (bare) → `fabric/service-providers/fabric-spo-intro/` - `KnowledgeCenter/.../IntegrateWithSink.htm` → `docs.equinix.com/observability/streaming-data/integratewithsink/` **Network Edge** - `docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-vendors-devices.htm` → `docs.equinix.com/network-edge/create-devices/ne-vendor-device-index/` - `en-us/Content/Interconnection/NE/deploy-guide/Reference%20Architecture/NE-High-Availability-Options.htm` → `docs.equinix.com/network-edge/reference-architecture/ne-streamline-network-integration/` **Terraform** - `www.terraform.io/*` → `developer.hashicorp.com/terraform/*` - `language/settings#specifying-a-required-terraform-version` → `language/providers/requirements` **Terraform Registry** - `registry.terraform.io/modules/equinix-labs/fabric-connection-*` (retired) → equivalent `registry.terraform.io/modules/equinix/fabric/equinix/latest` examples - `registry.terraform.io/search/modules?namespace=equinix-labs&q=fabric-connection` → `registry.terraform.io/modules/equinix/fabric/equinix/latest` ## Other - Removed duplicate `layer2-networking/overview/` bullet in `metal_device_network_type`, `metal_vlan`, and `metal_port_vlan_attachment` resource docs (both templates and generated docs) - Cleaned up stale "visit Facilities API docs" instruction in `metal_device` `facilities` schema description > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `checkpoint-api.hashicorp.com` > - Triggering command: `/tmp/go-build702628820/b001/exe/tfplugindocs /tmp/go-build702628820/b001/exe/tfplugindocs --rendered-provider-name=Equinix httpcookiemaxnum-t: ux_amd64/compile-k P6/p�� se 297002/b060/vet.cfg x64/pkg/tool/linux_amd64/vet t.go ternal/resources--norc -lang=go1.23 x64/pkg/tool/linux_amd64/vet -p k/terraform-provider-equinix/terraform-provider--p k/terraform-provider-equinix/terraform-provider-main x64/pkg/tool/linux_amd64/compile /validators/timebash /tmp/go-build235--norc -I x64/pkg/tool/linux_amd64/compile` (dns block) > - `developer.hashicorp.com` > - Triggering command: `/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js` (dns block) > - `docs.equinix.com` > - Triggering command: `/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/equinix/terraform-provider-equinix/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> ---- *This section details on the original issue you should resolve* <issue_title>[Docs]: broken links found throughout the docs</issue_title> <issue_description>The broken links were discovered using `markdown-link-check`. These links mostly refer to the old developer.equinix.com which has docs.equinix.com equivalents, to metal.equinix.com which has been retired, and to the Terraform registry which has changed URL bases and formats over the years. ``` $ npx markdown-link-check docs/**/*.md | grep '✖' | cut -d\ -f 4 | sort -u #Metal-Device-Network-Type #Metal-Port #Metro_Link https://bird.network.cz https://developer.equinix.com https://developer.equinix.com/catalog/accesstokenv1#operation/GetOAuth2AccessToken https://developer.equinix.com/catalog/fabricv4#operation/createPort https://developer.equinix.com/catalog/fabricv4#tag/Precision-Time https://developer.equinix.com/catalog/fabricv4#tag/Route-Aggregations https://developer.equinix.com/catalog/fabricv4#tag/Stream-Alert-Rules https://developer.equinix.com/catalog/fabricv4#tag/Stream-Subscriptions https://developer.equinix.com/catalog/fabricv4#tag/Streams https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#connections https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-networks https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#ports https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#route-filter-rules https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#route-filters https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#generating-client-id-and-client-secret https://developer.equinix.com/dev-docs/fabric/getting-started/getting-access-token#request-access-and-refresh-tokens https://developer.equinix.com/docs?page=/dev-docs/fabric/overview https://developer.equinix.com/environment/sandbox https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials/workload-identity-tokens https://developer.hashicorp.com/terraform/language/providers/configuration#alias-multiple-provider-configurations https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts https://developer.hashicorp.com/terraform/language/state/sensitive-data https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-connections-implement.htm https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-networks-implement.htm https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-ports-implement.htm https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm https://docs.equinix.com/en-us/Content/Interconnection/Fabric/service%20tokens/Fabric-Service-Tokens.htm https://docs.equinix.com/en-us/Content/KnowledgeCenter/Fabric/API-Reference/API-Precision-Time.htm https://docs.equinix.com/en-us/Content/KnowledgeCenter/Fabric/GettingStarted/Integrating-with-Fabric-V4-APIs/ConnectUsingServiceToken.htm https://docs.equinix.com/metal/layer2-networking/layer2-mode/#:~:text=Layer%202%20Unbonded%20Mode https://fabric.equinix.com/dashboard https://feedback.equinixmetal.com/changelog/bye-facilities-hello-again-metros https://feedback.equinixmetal.com/changelog/new-metros-feature-live https://metal.equinix.com/ https://metal.equinix.com/developers/api/facilities/ https://metal.equinix.com/developers/api/operatingsystems https://metal.equinix.com/developers/docs/accounts/projects/#api-keys https://metal.equinix.com/developers/docs/accounts/users/#api-keys https://metal.equinix.com/developers/docs/deploy/reserved/ https://metal.equinix.com/developers/docs/layer2-networking/ https://metal.equinix.com/developers/docs/layer2-networking/hybrid-bonded-mode/ https://metal.equinix.com/developers/docs/layer2-networking/hybrid-unbonded-mode/ https://metal.equinix.com/developers/docs/locations/metros/ https://metal.equinix.com/developers/docs/networking/backend-transfer/ https://metal.equinix.com/developers/docs/networking/elastic-ips/ https://metal.equinix.com/developers/docs/networking/fabric/ https://metal.equinix.com/developers/docs/networking/layer2-configs/ https://metal.equinix.com/developers/docs/networking/layer2/ https://metal.equinix.com/developers/docs/networking/local-global-bgp/ https://metal.equinix.com/developers/docs/servers/custom-partitioning-raid/ https://pkg.go.dev/time#ParseDuration https://registry.terraform.io/modules/equinix-labs/fabric-connection-alibaba/equinix/latest/examples/service-token-metal-to-alibaba-connection https://registry.terraform.io/modules/equinix-labs/fabric-connection-aws... </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #992 <!-- START COPILOT CODING AGENT TIPS --> --- 📍 Connect Copilot coding agent with [Jira](https://gh.io/cca-jira-docs), [Azure Boards](https://gh.io/cca-azure-boards-docs) or [Linear](https://gh.io/cca-linear-docs) to delegate work to Copilot in one click without leaving your project management tool. --------- Signed-off-by: Marques Johansson <317653+displague@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: displague <317653+displague@users.noreply.github.com>
feat: Add advertised routes data source (#987) This pull request introduces two new Fabric data sources for Equinix Terraform Provider: advertised routes and received routes. It includes their schema definitions, implementation, and acceptance tests, along with necessary updates to the provider registration and SDK version. New Fabric data sources: * Added `equinix_fabric_advertised_routes` and `equinix_fabric_received_routes` data sources, allowing users to query advertised and received BGP routes for a Fabric connection. [[1]](diffhunk://#diff-d6083ce835fe18b129247d5bcf03b0c7604650a08031b31c41d51531cb456bf0R1-R140) [[2]](diffhunk://#diff-74efa1a6202c7c59f70cd8ef12be57923e31107c352310c15d4a18e0ef4b27d4R1-R233) [[3]](diffhunk://#diff-66f26874e00c638bc1f76f9a264bba13d5e1c6102dc224d4fc5066d6e3458db3R1-R68) [[4]](diffhunk://#diff-2b2147047709d7348ce626c7699f4acf7ffb1fbc9157ce2f0bcd7cbae16a0fb5R5-R10) [[5]](diffhunk://#diff-2b2147047709d7348ce626c7699f4acf7ffb1fbc9157ce2f0bcd7cbae16a0fb5R58-R59) * Provided detailed schema documentation for both data sources, including nested attributes for filtering, pagination, sorting, and route details. [[1]](diffhunk://#diff-d11405d71a384de7e6d13f893d2e5f8c721419eb481aaeeda0b03c8b494e629cR1-R108) [[2]](diffhunk://#diff-6d8e59fe96e2660ea7411bdaf5bb94305bc6a162d1b7173528858aead837bb59R1-R108) Provider registration and SDK update: * Registered the new data sources in the Fabric provider service, enabling their use in Terraform configurations. [[1]](diffhunk://#diff-2b2147047709d7348ce626c7699f4acf7ffb1fbc9157ce2f0bcd7cbae16a0fb5R5-R10) [[2]](diffhunk://#diff-2b2147047709d7348ce626c7699f4acf7ffb1fbc9157ce2f0bcd7cbae16a0fb5R58-R59) * Updated `go.mod` to use `github.com/equinix/equinix-sdk-go v0.63.0`, ensuring compatibility with new API features required by the data sources. Testing: * Added acceptance tests for the advertised routes data source, verifying its integration and correctness in real-world scenarios.
fix: Port resource was missing required include parameters (#984) In the port resource, there's a set of functions that iteratively update the port's state. Some of those functions return the port after the state has been updated in Metal. For example, after converting to L2 or L3, the port would be returned without including "virtual_networks", which meant that we'd get incorrect diffs for the VLANs that need to be attached to the port. ``` func resourceMetalPortUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { cpr, _, err := getClientPortResource(ctx, d, meta) if err != nil { return diag.FromErr(err) } for _, f := range [](func(context.Context, *clientPortResource) error){ portSanityChecks, batchVlans(true), makeDisbond, convertToL2, makeBond, convertToL3, batchVlans(false), updateNativeVlan, } { if err := f(ctx, cpr); err != nil { return diag.FromErr(err) } } return resourceMetalPortRead(ctx, d, meta) } ``` ``` func convertToL2(ctx context.Context, cpr *clientPortResource) error { l2, l2Ok := cpr.Resource.GetOkExists("layer2") isLayer2 := slices.Contains(l2Types, cpr.Port.GetNetworkType()) if l2Ok && l2.(bool) && !isLayer2 { port, _, err := cpr.Client.PortsApi.ConvertLayer2(ctx, cpr.Port.GetId()). PortAssignInput(dummy). Include(defaultPortIncludes).Execute() if err != nil { return err } // without the include, the port object won't be in the correct state here. *(cpr.Port) = *port } return nil } ```
fix: Handle equinix_metal_port updates properly if no changes to VLANs ( #977) In #976, there was a bug introduced when refactoring the batch logic to be shared between the metal_port and metal_port_vlan_attachment resources. The previous code for the port resource always called the batch endpoints but was a no-op if there were no assignments. I've updated the VLAN Batch logic to do the same here.
PreviousNext