Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 37 additions & 0 deletions .ci-mgmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# REQUIRED: provider is the name of the provider without the pulumi-prefix e.g. "aws".
provider: equinix
# The name of the GitHub organization or username the repository lives in. Defaults to 'pulumi'
organization: equinix
# The external template only includes workflows relevant for non-Pulumi managed providers.
template: external-bridged-provider
# The name of the GitHub organisation or username where the upstream terraform provider lives.
upstreamProviderOrg: pulumi
# major version of the current provider - used in make files
# This should always be set by all providers as this is key to go module paths.
major-version: 0
# Enable using the terraform converter for example generation.
pulumiConvert: 1
# Set a GitHub username here for automatic upgrade PRs to be assigned to.
# pr-assign: pulumi-bot

# providerDefaultBranch is used to customise the default branch for the repo
providerDefaultBranch: main
# Explicit list of languages to support for SDKs. Java is currently excluded because it doesn't yet work well for non-internal providers.
languages:
- dotnet
- go
- nodejs
- python
- java
# Disable Java publishing and pushing the provider binary to the CDN as these only work internally within Pulumi.
publish:
sdk: "all"
cdn: false
# Enables automatic generation of basic docs pages for the registry.
# registryDocs: true

# Disables a pulumi-internal-only step for running create_docs_build during the release
publishRegistry: false
github-app:
enabled: false
mise-version: 2026.3.7
3 changes: 3 additions & 0 deletions .config/mise.test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi-labs/ci-mgmt

# Overrides for test workflows -- currently empty.
34 changes: 34 additions & 0 deletions .config/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi-labs/ci-mgmt
# You can create your own root-level mise.toml file to override/augment this. See https://mise.jdx.dev/configuration.html

[env]
_.vfox-pulumi = { module_path = "provider" } # Sets GO_VERSION_MISE and PULUMI_VERSION_MISE
PULUMI_HOME = "{{config_root}}/.pulumi"

[tools]

# Runtimes
go = "{{ env.GO_VERSION_MISE }}"
node = '20.19.5'
python = '3.11.8'
"vfox:version-fox/vfox-dotnet" = "8.0.20" # vfox backend doesn't work on Windows, gives "error converting Lua table to PreInstall (no version returned from vfox plugin)" https://github.com/jdx/mise/discussions/5876 https://github.com/jdx/mise/discussions/5550
# Corretto version used as Java SE/OpenJDK version no longer offered
java = 'corretto-11'

# Executable tools
"github:pulumi/pulumi" = "{{ env.PULUMI_VERSION_MISE }}"
"github:pulumi/pulumictl" = '0.0.50'
"github:pulumi/schema-tools" = "0.6.0"
"aqua:gradle/gradle-distributions" = '7.6.6'
golangci-lint = "2.5.0" # See note about about overrides if you need to customize this.
"npm:yarn" = "1.22.22"

[settings]
experimental = true # Required for Go binaries (e.g. pulumictl).
lockfile = false
http_retries = 3
pin = true # `mise use` should pin versions instead of defaulting to latest.
fetch_remote_versions_cache = "24h" # Mise queries versions even if they're pinned to confirm they exist. Reduce GitHub API calls by doing that less often.

[plugins]
vfox-pulumi = "https://github.com/pulumi/vfox-pulumi"
94 changes: 17 additions & 77 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,82 +1,22 @@
ARG UBUNTU_VERSION=latest
FROM ubuntu:${UBUNTU_VERSION}
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Update apt-get and install various needed utilities
RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y wget && \
apt-get install -y xz-utils && \
apt-get install -y make && \
apt-get install -y gcc && \
apt-get install -y git && \
apt-get install -y gh && \
apt-get install -y zip
COPY .devcontainer/pulumi-dev.crt /usr/local/share/ca-certificates/pulumi-dev.crt
RUN update-ca-certificates
ENV NODE_EXTRA_CA_CERTS="/usr/local/share/ca-certificates/pulumi-dev.crt"
ENV REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"
ENV SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"

# Install bridged provider prerequisites
# See README.md
# Install gh CLI
RUN apt-get update && apt-get install -y gh

# Install go
ARG GO_VERSION=1.21.3
RUN rm -rf /usr/local/go && \
wget -O ${GO_VERSION}.tar.gz https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf ${GO_VERSION}.tar.gz && \
rm ${GO_VERSION}.tar.gz
# Install mise
ENV MISE_VERSION=2026.3.7
RUN curl https://mise.run | sh
ENV PATH="/root/.local/bin:${PATH}"

ENV GOPATH=/root/go
ENV PATH=$PATH:/usr/local/go/bin
# Setup mise
WORKDIR /code
RUN mise install

# Install go linter
RUN mkdir -p $GOPATH/bin && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.46.2

ENV PATH=$PATH:$GOPATH/bin

# Install pulumictl
ARG PULUMICTL_VERSION=v0.0.46
RUN rm -rf /usr/local/bin/pulumictl && \
wget -O pulumictl.${PULUMICTL_VERSION}.tar.gz https://github.com/pulumi/pulumictl/releases/download/${PULUMICTL_VERSION}/pulumictl-${PULUMICTL_VERSION}-linux-amd64.tar.gz && \
tar -C /usr/local/bin -xzf pulumictl.${PULUMICTL_VERSION}.tar.gz

# Install nodejs
ARG NODEJS_VERSION=v22.13.1
ARG NODEJS_PKG=node-${NODEJS_VERSION}-linux-x64
ARG NODEJS_TARBALL=${NODEJS_PKG}.tar.xz
RUN rm -rf /usr/local/node && \
wget -O ${NODEJS_TARBALL} https://nodejs.org/dist/${NODEJS_VERSION}/${NODEJS_TARBALL} && \
tar -C /usr/local -xf ${NODEJS_TARBALL} && \
mv /usr/local/${NODEJS_PKG} /usr/local/node

ENV PATH=$PATH:/usr/local/node/bin

# Install yarn
RUN npm install --global yarn

# Install python and related items
RUN apt-get install -y python3 && \
apt-get install -y python3-setuptools

# Install .NET
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb

RUN apt-get update && \
apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-6.0

# Install Pulumi
RUN curl -fsSL https://get.pulumi.com | sh
ENV PATH=$PATH:/root/.pulumi/bin

# Install upgrade-provider
RUN go install github.com/pulumi/upgrade-provider@main

# Install sdkman
RUN curl -s "https://get.sdkman.io" | bash

# Install gradle
SHELL ["/bin/bash", "-c"]
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" && \
sdk install java 17.0.17-tem && \
sdk install gradle
# Activate mise in shell
RUN echo 'eval "$(mise activate bash)"' >> ~/.bashrc
24 changes: 16 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.3/containers/hugo
{
"name": "TFProvider",
"name": "Provider Dev Container",
"build": {
"dockerfile": "Dockerfile",
"options": ["--platform=linux/amd64" ]
"dockerfile": "./Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"settings": {},
"extensions": []
}
},
"runArgs": ["--platform=linux/amd64" ],
"mounts": [
"type=bind,source=${localEnv:HOME}/.ssh,target=/root/.ssh,readonly"
]
{
"source": "${localEnv:HOME}/.config/gh",
"target": "/root/.config/gh",
"type": "bind"
}
],
"remoteUser": "root",
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sdk/**/* linguist-generated=true
28 changes: 28 additions & 0 deletions .github/actions/download-prerequisites/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Download the code generator binary
description: Downloads the code generator binary to `bin/`.

runs:
using: "composite"
steps:
- name: Download the prerequisites bin
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: prerequisites-bin
path: bin

- name: Restore executable permissions
shell: bash
run: chmod +x $(< bin/executables.txt)

- name: Remove executables list
shell: bash
run: rm bin/executables.txt

- name: Download schema-embed.json
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
# Use a pattern to avoid failing if the artifact doesn't exist
pattern: schema-embed.*
# Avoid creating directories for each artifact
merge-multiple: true
path: provider/cmd/pulumi-resource-equinix
23 changes: 23 additions & 0 deletions .github/actions/download-provider/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Download the provider binary
description: Downloads the provider binary to `bin/`.

runs:
using: "composite"
steps:

- name: Download pulumi-resource-equinix
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: pulumi-resource-equinix-*-linux-amd64.tar.gz
path: ${{ github.workspace }}/bin
merge-multiple: true

- name: Untar pulumi-resource-equinix
shell: bash
run: |
tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin

- name: Mark pulumi-resource-equinix as executable
shell: bash
run: |
find ${{ github.workspace }} -name "pulumi-*-equinix" -print -exec chmod +x {} \;
19 changes: 19 additions & 0 deletions .github/actions/download-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Download SDK asset
description: Restores the SDK asset for a language.

inputs:
language:
required: true
description: One of nodejs, python, dotnet, go, java

runs:
using: "composite"
steps:
- name: Download ${{ inputs.language }} SDK
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ${{ inputs.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Uncompress SDK folder
shell: bash
run: tar -zxf ${{ github.workspace }}/sdk/${{ inputs.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ inputs.language }}
17 changes: 17 additions & 0 deletions .github/actions/download-tfgen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Download the tfgen binary
description: Downloads the tfgen binary to `bin/`.

runs:
using: "composite"
steps:

- name: Download pulumi-tfgen-equinix
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: pulumi-tfgen-equinix
path: ${{ github.workspace }}/bin

- name: Ensure pulumi-tfgen-equinix is executable
shell: bash
run: |
find ${{ github.workspace }} -name "pulumi-*-equinix" -print -exec chmod +x {} \;
12 changes: 12 additions & 0 deletions .github/actions/esc-action/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Load secrets"
description: |
This is a temporary action which assists with our migration to ESC. Instead
of surrounding every step that references secrets with an "if ESC" block, we
instead modify those steps to consume their secrets from this step's outputs.
Then, later, we can replace this action with esc-action to actually load
secrets from ESC.
inputs: {}
outputs: {}
runs:
using: "node20"
main: "index.js"
14 changes: 14 additions & 0 deletions .github/actions/esc-action/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const fs = require("fs");

const file = process.env["GITHUB_OUTPUT"];
var stream = fs.createWriteStream(file, { flags: "a" });

for (const [name, value] of Object.entries(process.env)) {
try {
stream.write(`${name}<<EEEOOOFFF\n${value}\nEEEOOOFFF\n`); // << syntax accommodates multiline strings.
} catch (err) {
console.log(`error: failed to set output for ${name}: ${err.message}`);
}
}

stream.end();
15 changes: 15 additions & 0 deletions .github/actions/upload-bin/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Upload bin assets
description: Uploads the provider and tfgen binaries to `bin/`.

runs:
using: "composite"
steps:
- name: Tar provider binaries
shell: bash
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-equinix pulumi-tfgen-equinix
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: equinix-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
retention-days: 30
23 changes: 23 additions & 0 deletions .github/actions/upload-prerequisites/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Upload SDK asset
description: Upload the SDK for a specific language as an asset for the workflow.

runs:
using: "composite"
steps:
- name: Capture executable permissions
shell: bash
run: find bin -type f -executable > bin/executables.txt

- name: Upload prerequisites bin
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: prerequisites-bin
path: bin/*
retention-days: 30

- name: Upload schema-embed.json
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: schema-embed.json
path: provider/cmd/pulumi-resource-equinix/schema-embed.json
retention-days: 30
20 changes: 20 additions & 0 deletions .github/actions/upload-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Upload SDK asset
description: Upload the SDK for a specific language as an asset for the workflow.

inputs:
language:
required: true
description: One of nodejs, python, dotnet, go, java

runs:
using: "composite"
steps:
- name: Compress SDK folder
shell: bash
run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} .
- name: Upload artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ inputs.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz
retention-days: 30
Loading
Loading