terraform
5 TopicsIssues deploying Equinix Connections
I have managed to use several terraform modules without problem. I have used the palo alto cloudgenix vm modules, palo alto firewalls modules, device link modules, and fabric cloud router module. All work okay on the lastest version of equinix/equinix. However as I dive into other connections I get a lot version issues. For example. Leveraging the cloud-router-port connection. https://registry.terraform.io/modules/equinix/fabric/equinix/latest/examples/cloud-router-2-port-connection This would be used to connect the cloud router to the pa firewall mgmt interface. Documentation covers the following version. required_providers { equinix = { source = "equinix/equinix" version = ">= 2.9.0" } } } But code doesnt work without this version terraform { required_providers { equinix = { source = "equinix/equinix" version = "~> 1.26.0" } } } When using new versions error occurs. Failure. Ive redone this several times in my code base. ephemeral.aws_secretsmanager_secret_version.equinix_iac_credentials: Opening... ephemeral.aws_secretsmanager_secret_version.equinix_iac_credentials: Opening complete after 0s module.equinix_deployment.module.fw-mgmt-to-fcr-connection-ch-1a.equinix_fabric_connection.this: Creating... ╷ │ Error: 400 Bad Request Code: EQ-3142558, Message: Json syntax error, please check request body, Details: Unknown json property : aSide.accessPoint.router.package.code. Unexpected value '' │ │ with module.equinix_deployment.module.fw-mgmt-to-fcr-connection-ch-1a.equinix_fabric_connection.this, │ on ..\..\modules\cloud-router-2-port-connection\main.tf line 1, in resource "equinix_fabric_connection" "this": │ 1: resource "equinix_fabric_connection" "this" { I can get past this error and deploy the connection with an older version but then run into version issues when attempting to leverage the virtual-device-2-eia-connection https://registry.terraform.io/modules/equinix/fabric/equinix/latest/examples/virtual-device-2-eia-connection here the primary problem is that on older versions. there is no resource virtual-device-connection. only fabric-device-connection. One thought is to completely separate the fabric cloud router to port module Here is the original cloud router to port module main.tf resource "equinix_fabric_connection" "this" { name = var.connection_name type = var.connection_type bandwidth = var.bandwidth notifications { type = var.notifications_type emails = var.notifications_emails } a_side { access_point { type = "CLOUD_ROUTER" router { uuid = var.aside_fcr_uuid } } } z_side { access_point { type = var.zside_ap_type virtual_device { type = var.zside_vd_type uuid = var.zside_vd_uuid } interface { type = var.zside_interface_type id = var.zside_interface_id } location { metro_code = var.zside_location } } } order { purchase_order_number = var.purchase_order_number } } variables variable "connection_name" { type = string description = "Name of the Fabric connection" } variable "connection_type" { type = string description = "Type of the Fabric connection (e.g., IP_VC)" } variable "bandwidth" { type = number description = "Connection bandwidth in Mbps" } variable "notifications_type" { type = string default = "ALL" description = "Notification type" } variable "notifications_emails" { type = list(string) description = "Emails for notifications" } variable "purchase_order_number" { type = string default = "" } variable "aside_fcr_uuid" { type = string description = "UUID of the FCR device" } variable "zside_ap_type" { type = string default = "VD" } variable "zside_vd_type" { type = string default = "EDGE" } variable "zside_vd_uuid" { type = string } variable "zside_interface_type" { type = string default = "NETWORK" } variable "zside_interface_id" { type = number } variable "zside_location" { type = string } versions.tf terraform { required_providers { equinix = { source = "equinix/equinix" version = "~> 1.26.0" } } } module module "fw-mgmt-to-fcr-connection-ch-1a" { #FCR Router to FW Management Interface Connection source = "../../modules/cloud-router-2-port-connection" connection_name = "fcr-2-fw-mgmt-ch" connection_type = "IP_VC" bandwidth = 50 notifications_type = "ALL" notifications_emails = var.notifications purchase_order_number = "mgmt-connection" #aside Fabric Cloud Router aside_fcr_uuid = module.fcr_ch.id #zside Palo aAlto Firewall zside_ap_type = "VD" #Virtual Device zside_vd_type = "EDGE" zside_vd_uuid = module.pa_vm_ch.id zside_interface_type = "NETWORK" zside_interface_id = 1 # Palo Alto Firewall Management Port zside_location = "CH" #metro code }Solved163Views1like5CommentsTerraform Module Equinix Internet Access. Does it exist?
I scavenged the terraform registry looking for a Equinix Internet Access Terraform module. ] I found an example of a connection to EIA.This is the only thing that comes up in the registry as EIA. https://github.com/equinix/terraform-equinix-fabric/tree/v0.22.0/examples/virtual-device-2-eia-connection But none that creates the EIA itself. Can anyone answer if this may or may not be supported in terraform and if so, what would the resource name be for it? The GUI terminology doesn't always translate one for one, so maybe I'm missing something.63Views0likes2CommentsCloud Infrastructure Made Easy: IaC Demo Day!
Hey everyone! We’re thrilled to be hosting our second Demo Day of 2024, this time all about Infracode! If you’re already an infrastructure expert slinging Terraform or just starting out, we’ve got experts from across the industry to share their experiences with you! We’ll have folks like Marino Wijay of Kong talking about Platform best practices for AI, Jared Watts talking about Crossplane, and Engin Diri to talk to us about Pulumi. We’ve even got two of our Equinix DevRel Engineers, Chris Privitere and Oscar Cobles to talk about Kubernetes Cluster API and using Terraform to interconnect Equinix Metal and your AWS cloud. See our Event Page for more information and/or join us live at the link below so you can post your questions for our speakers directly in the chat! Can’t wait to see you in the chat! P.S. -- if you can’t make it, or you’re getting this late, don’t panic! Our full session will be embedded below128Views6likes0CommentsRunning Terraform from a restricted environment
When running Terraform to provision and manage Equinix Fabric, Metal, and Network Edge, you may want to run Terraform from a restricted environment. Network filtering ACLs will need a predictable set of IP ranges to permit. This discussion will help you discover the IP services, ports, and address ranges your Terraform runner environment will need access to. We'll also discuss alternative ways to run Terraform configuration. If your ACLs permit the Terraform runner environment outbound HTTPS (TCP 443) and responses, that would cover everything Terraform needs to start provisioning infrastructure on Equinix. We'll assume we don't have unrestricted access and dig in a little further. Upon running, `terraform init`, Terraform will attempt to use DNS (UDP/TCP 53) services and HTTPS services to download provider plugins, such as the Equinix Terraform provider. The default host for fetching these plugins is registry.terraform.io, managed by Hashicorp. This is the defacto hub for public providers and published Terraform modules, although you may run your own local registry service. DNS for the Terraform registry points to CloudFront, a CDN whose addresses may change. If this presents a problem, there are options to download (or mirror) the necessary plugins in advance and use locally distributed copies. https://developer.hashicorp.com/terraform/cli/plugins Similarly, the DNS service for api.equinix.com, the one base domain that the Terraform Equinix provider will need for API access, resolves to Akamai, another CDN whose addresses may change or depend on where the request originates. As a Terraform configuration grows, you'll likely want to enable SSH access to the Metal and NE nodes being provisioned to automate OS provisioning. The SSH addresses will vary depending on the Metro where services are deployed. One way to ensure that the addresses are predictable in Metal is to provision the servers using Elastic IP addresses. A good follow-up question to this discussion is which ranges are assigned to NE devices and whether these IP addresses can be drawn from a predefined pool like Metal's Elastic IP Addresses. Terraform configurations typically include resources from multiple cloud providers. The node where the configuration is run would need to permit access to the APIs of these other providers. We'll leave the network filters needed by provisioned nodes to another discussion. Depending on your needs, cloud service providers offer managed services for Terraform or OpenTofu (a fork of Terraform persisting the original open-source license). These services can run your Terraform configuration predictably and reliably from a central location. Hashicorp provides the HCP service. https://developer.hashicorp.com/terraform/cloud-docs/run/run-environment Alternatives include: https://spacelift.io/ https://upbound.io https://www.env0.com/ https://www.scalr.com/ You can run similar CI/CD Terraform configuration control planes in your own backend with opensource tools such as: https://argoproj.github.io/cd/ https://www.crossplane.io/ https://docs.tofutf.io/ These SaaS providers or local solutions will also need access to the cloud provider APIs and nodes. With these providers you have full control of the configuration that is run and you can work these into a GitOps workflow. There are even more alternatives outside of the Terraform ecosystem. However, the Terraform ecosystem is your best option for the richest IaC integration experience with Equinix digital services. Equinix provides several Terraform modules to make it easy to get started. That extended ecosystem includes IaC tools that take advantage of the robust Equinix Terraform provider. These tools include Pulumi and Crossplane. TLDR; You'll want to expose select DNS, HTTPS, and SSH access from your Terraform runners. What alternative deployment strategies did I miss? What other network restrictions should be considered?673Views3likes0CommentsAnsible, Terraform, both?
Hi Community, I wanted to start a chat around some dev ops tools that we know many of our customers use. I'll throw a few questions below to get us started but feel free to go off topic if you want to discuss something outside of these questions. Does your organization use Ansible, Terraform, or both? Are there other automation tools that you use or prefer? What do you like/dislike about each of these tools? How can we improve the user experience when using these tools with Platform Equinix?5.2KViews2likes0Comments