Skip to main content
  • Labs / 
  • Pulumi Provider

Pulumi Provider

Ideal for provisioning Equinix infrastructure using general programming languages with continuous deployment as well as unit and functional testing.

Version v0.8.0 was released on 02 April, 2024 View changelog
Pulumi Provider

An open-source infrastructure as code tool that enables developers to create, deploy, and manage cloud infrastructure using familiar programming languages.

What is it?

Pulumi is a cloud infrastructure management platform that allows developers and engineers to create, deploy, and manage cloud infrastructure using familiar programming languages and frameworks. It provides a single tool for managing infrastructure across multiple cloud providers, including AWS, Azure, Google Cloud, and Kubernetes. Pulumi also supports a range of programming languages, including Python, JavaScript, TypeScript, and Go, making it easy for developers to write infrastructure code using their preferred language. With Pulumi, teams can automate their infrastructure provisioning and management, enabling faster and more reliable deployments.

Why do we love it?

  • Infrastructure as Code: Pulumi enables you to define your infrastructure as code, meaning you can write, test, and manage your infrastructure using familiar programming languages such as Python, JavaScript, TypeScript, and Go, rather than using proprietary languages.

  • Multi-Cloud Support: Pulumi supports multiple cloud platforms, including AWS, Azure, GCP, and Kubernetes, allowing you to manage your infrastructure in a consistent manner across cloud providers.

  • Cost Optimization: Pulumi provides a cost estimation feature that enables you to estimate the cost of your infrastructure before it is deployed, helping you to optimize your infrastructure and avoid unnecessary expenses.

  • Collaboration: Pulumi allows you to collaborate with other team members in real-time, making it easy to share infrastructure code, track changes, and resolve issues.

  • Automation: Pulumi automates the deployment process, making it easy to deploy and manage your infrastructure with minimal manual intervention.

  • Security: Pulumi provides built-in security features, such as role-based access control, encryption, and compliance checks, that help to ensure your infrastructure is secure.

  • Extensible: Pulumi is highly extensible, meaning you can add your own custom resources and modules to support your specific infrastructure needs.

How do you use it?

Pulumi providers are versatile. Choose your preferred language from any of the generated bindings.

The Pulumi Equinix provider is available as a package in all Pulumi supported languages:

  • JavaScript/TypeScript: @equinix-labs/pulumi-equinix
  • Python: pulumi_equinix
  • Go: github.com/equinix/pulumi-equinix/sdk/go/equinix
  • .NET: Pulumi.Equinix
  • Java: com.equinix.pulumi

For example, to use from Python:

You need to install Pulumi and the language runtime (in this case python)

Create a new Pulumi Project

mkdir my-equinix-infra && cd my-equinix-infra
pulumi new python -y

Edit the generated requirements.txt file to add the pulumi_equinix package and install the dependencies

echo "pulumi_equinix>=0.2.1" >> requirements.txt
python3 -m venv venv
venv/bin/pip install -r requirements.txt

Add your code in __main__.py, for example to create an Equinix Metal Project

import pulumi
import pulumi_equinix as equinix

config = pulumi.Config()
organization_id = config.require("organizationId")
name = config.get("name")
if name is None:
    name = "Default Project"
project_resource = equinix.metal.Project("project",
    name=name,
    organization_id=organization_id)
pulumi.export("projectId", project_resource.id)

create a new Pulumi stack

pulumi stack init

Configure the Equinix Credentials

pulumi config set equinix:authToken <<METAL_API_TOKEN>>

Deploy the Pulumi stack:

pulumi up -c organizationId="<<METAL_ORG>>"

For detailed reference documentation, please visit Equinix API Docs in the Pulumi Registry.

More info and examples can be found at the main Pulumi Equinix GitHub repository.

Last updated

30 April, 2024

Category

Tagged

Plugins
Subscribe to our newsletter

A monthly digest of the latest news, articles, and resources.