Skip to content

Commit

Permalink
feat: upgrade Terraform Bridge to 3.86.0 (#11)
Browse files Browse the repository at this point in the history
* refactor: upgrade Terraform Bridge to 3.86.0 in go.mod

* fix: removed a couple of erroneously defined CSharpName properties for non existings resource fields

* chore: rebuild provider and schema

* chore: recreated language SDKs

* chore: updated go.mod and go.sum in provider directory

* fix: added missing resources for fortios_extensioncontroller_extendervap, fortios_firewall_ondemandsniffer, fortios_system_license_fortiflex, and fortios_system_sshconfig to provider

* chore: rebuild provider schema

* chore: recreated language SDKs

* fix: change 'rm -r' to 'rm -rf' to remove the bin directory recursively in Makefile

* chore: updated Dockefile for devcontainer

* chore: recreated provider schema

* cicd: updated all GitHub actions and NodeJS version to v18

* cicd: fetch complete history of repository with actions/checkout

---------

Co-authored-by: Thomas Meckel <[email protected]>
  • Loading branch information
tmeckel and tmeckel authored Jul 9, 2024
1 parent a053a02 commit 5db0d0b
Show file tree
Hide file tree
Showing 3,216 changed files with 48,157 additions and 46,974 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
129 changes: 85 additions & 44 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
ARG UBUNTU_VERSION=latest
FROM ubuntu:${UBUNTU_VERSION}
ARG UBUNTU_VERSION=22.04
FROM mcr.microsoft.com/devcontainers/base:ubuntu-${UBUNTU_VERSION}

# 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
RUN set -ex \
apt-get update \
&& apt-get install --no-install-recommends -y curl \
wget \
xz-utils \
make \
gcc \
git

# Install bridged provider prerequisites
# See README.md

# Install go
ARG GO_VERSION=1.21.7
RUN rm -rf /usr/local/go && \
wget -O- https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz | \
tar -C /usr/local -xzf -

ENV GOPATH=/root/go
ARG GO_VERSION=1.21.12
ENV PATH=$PATH:/usr/local/go/bin
RUN set -ex \
rm -rf /usr/local/go \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& curl -L "https://go.dev/dl/go${GO_VERSION}.linux-${arch}.tar.gz" | tar -C /usr/local/ -xzvf - \
&& which go \
&& go version

# Install go linter
RUN mkdir -p $GOPATH/bin && \
Expand All @@ -29,39 +31,78 @@ RUN mkdir -p $GOPATH/bin && \
ENV PATH=$PATH:$GOPATH/bin

# Install pulumictl
ARG PULUMICTL_VERSION=v0.0.46
RUN rm -rf /usr/local/bin/pulumictl && \
wget -O- https://github.com/pulumi/pulumictl/releases/download/${PULUMICTL_VERSION}/pulumictl-${PULUMICTL_VERSION}-linux-amd64.tar.gz | \
tar -C /usr/local/bin -xzf -
RUN set -ex \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export urlPulumiRelease="https://api.github.com/repos/pulumi/pulumictl/releases/latest" \
&& export urlPulumiVersion=$(curl -s ${urlPulumiRelease} | awk -F '["v,]' '/tag_name/{print $5}') \
&& export urlPulumiBase="https://github.com/pulumi/pulumictl/releases/download" \
&& export urlPulumiBin="pulumictl-v${urlPulumiVersion}-linux-${arch}.tar.gz" \
&& export urlPulumi="${urlPulumiBase}/v${urlPulumiVersion}/${urlPulumiBin}" \
&& curl -L ${urlPulumi} | tar xzvf - --directory /tmp \
&& chmod +x /tmp/pulumictl \
&& mv /tmp/pulumictl /usr/local/bin/ \
&& which pulumictl \
&& pulumictl version \
&& rm -rf /tmp/* \
&& true

# Install nodejs
ARG NODEJS_VERSION=v16.16.0
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
RUN set -ex \
&& export NODE_MAJOR=18 \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \
| tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install --no-install-recommends nodejs \
&& apt-get clean \
&& apt-get autoremove -y \
&& apt-get purge -y --auto-remove \
&& rm -rf \
/var/lib/{apt,dpkg,cache,log} \
/usr/share/{doc,man,locale} \
/var/cache/apt \
/root/.cache \
/var/tmp/* \
/tmp/* \
&& node --version \
&& npm --version \
&& npm install --global yarn \
&& yarn --version \
&& true

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

# 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
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-6.0 dotnet-runtime-6.0 \
&& apt-get clean \
&& apt-get autoremove -y \
&& apt-get purge -y --auto-remove \
&& rm -rf \
/var/lib/{apt,dpkg,cache,log} \
/usr/share/{doc,man,locale} \
/var/cache/apt \
/root/.cache \
/var/tmp/* \
/tmp/* \
&& true

# Install Pulumi
RUN curl -fsSL https://get.pulumi.com | sh
ENV PATH=$PATH:/root/.pulumi/bin
# Install pulumi
RUN set -ex \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "x64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export urlPulumiRelease="https://api.github.com/repos/pulumi/pulumi/releases/latest" \
&& export urlPulumiVersion=$(curl -s ${urlPulumiRelease} | awk -F '["v,]' '/tag_name/{print $5}') \
&& export urlPulumiBase="https://github.com/pulumi/pulumi/releases/download" \
&& export urlPulumiBin="pulumi-v${urlPulumiVersion}-linux-${arch}.tar.gz" \
&& export urlPulumi="${urlPulumiBase}/v${urlPulumiVersion}/${urlPulumiBin}" \
&& curl -L ${urlPulumi} | tar xzvf - --directory /tmp \
&& chmod +x /tmp/pulumi/* \
&& mv /tmp/pulumi/* /usr/local/bin/ \
&& which pulumi \
&& pulumi version \
&& rm -rf /tmp/* \
&& true
23 changes: 12 additions & 11 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
goversion:
- 1.21.x
nodeversion:
- 16.x
- 18.x
pythonversion:
- "3.9"
# javaversion:
Expand All @@ -33,45 +33,46 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{matrix.goversion}}

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.10.0
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: pulumi/pulumictl

- name: Install pulumi
uses: pulumi/actions@v4
uses: pulumi/actions@v5

- if: ${{ matrix.language == 'nodejs'}}
name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{matrix.nodeversion}}
registry-url: https://registry.npmjs.org

- if: ${{ matrix.language == 'dotnet'}}
name: Setup DotNet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{matrix.dotnetversion}}

- if: ${{ matrix.language == 'python'}}
name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pythonversion}}

- if: ${{ matrix.language == 'java'}}
name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@ jobs:
contents: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{matrix.goversion}}

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.10.0
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: pulumi/pulumictl

- name: Set PreRelease Version
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v6
with:
args: -p 3 release --rm-dist
version: latest
Expand All @@ -78,48 +78,48 @@ jobs:
needs: publish_binary
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goversion }}

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.10.0
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: pulumi/pulumictl

- name: Install pulumi
uses: pulumi/actions@v4
uses: pulumi/actions@v5

- if: ${{ matrix.language == 'nodejs'}}
name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{matrix.nodeversion}}
registry-url: ${{env.NPM_REGISTRY_URL}}

- if: ${{ matrix.language == 'dotnet'}}
name: Setup DotNet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{matrix.dotnetversion}}

- if: ${{ matrix.language == 'java'}}
name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{matrix.javaversion}}

- if: ${{ matrix.language == 'python'}}
name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pythonversion}}

Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
goversion:
- 1.21.x
nodeversion:
- 16.x
- 18.x
pythonversion:
- "3.9"
# javaversion:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ tidy:: upstream/.git # call go mod tidy in relevant directories
find ./provider -name go.mod -execdir go mod tidy \;

cleanup:: # cleans up the temporary directory
rm -r $(WORKING_DIR)/bin
rm -rf $(WORKING_DIR)/bin
rm -f provider/cmd/${PROVIDER}/schema.go

help::
Expand Down
2 changes: 1 addition & 1 deletion README-DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Ensure the following tools are installed and present in your `$PATH`:

* [`pulumictl`](https://github.com/pulumi/pulumictl#installation)
* [Go 1.17](https://golang.org/dl/) or 1.latest
* [NodeJS](https://nodejs.org/en/) 16.x. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations.
* [NodeJS](https://nodejs.org/en/) 18.x. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations.
* [Yarn](https://yarnpkg.com/)
* [TypeScript](https://www.typescriptlang.org/)
* [Python](https://www.python.org/downloads/) (called as `python3`). For recent
Expand Down
Loading

0 comments on commit 5db0d0b

Please sign in to comment.