Skip to content

Commit

Permalink
Upgrade Terraform Mixing to 1.0.0-rc.1 (#2677)
Browse files Browse the repository at this point in the history
* terraform init in core/ops shouldn't use -upgrade

* update terraform in devcontainer

* always refresh

* tflint

* update changelog

* Remove doker env variables

* update changelog

* align bundles with new terraform mixin

* update changelog
  • Loading branch information
tamirkamara authored Oct 2, 2022
1 parent 4d25270 commit 1433311
Show file tree
Hide file tree
Showing 44 changed files with 26 additions and 163 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ENHANCEMENTS:
* Airlock requests with status "blocked_by_scan" have the reason for being blocked by the malware scanner in the status_message field ([#2666](https://github.com/microsoft/AzureTRE/pull/2666))
* Move admin-vm from core to a shared service ([#2624](https://github.com/microsoft/AzureTRE/pull/2624))
* Remove obsolete docker environment variables ([#2675](https://github.com/microsoft/AzureTRE/pull/2675))
* Using Porter's Terrform mixin 1.0.0-rc.1 where mirror in done internally ([#2677](https://github.com/microsoft/AzureTRE/pull/2677))

BUG FIXES:

Expand Down
2 changes: 1 addition & 1 deletion resource_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.7"
__version__ = "0.4.8"
2 changes: 1 addition & 1 deletion resource_processor/scripts/porter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ chmod +x "${PORTER_HOME}/porter"
ln -s "${PORTER_HOME}/porter" "${PORTER_HOME}/runtimes/porter-runtime"

"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_PKG_PERMALINK}"
4 changes: 3 additions & 1 deletion resource_processor/vmss_porter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.8-slim-buster
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install Azure CLI
ARG AZURE_CLI_VERSION=2.39.0-1~buster
ARG AZURE_CLI_VERSION=2.40.0-1~buster
COPY scripts/azure-cli.sh /tmp/
RUN export AZURE_CLI_VERSION=${AZURE_CLI_VERSION} \
&& /tmp/azure-cli.sh
Expand All @@ -12,11 +12,13 @@ RUN export AZURE_CLI_VERSION=${AZURE_CLI_VERSION} \
ARG PORTER_MIRROR=https://cdn.porter.sh
ARG PORTER_PERMALINK=v0.38.13
ARG PORTER_PKG_PERMALINK=latest
ARG PORTER_TERRAFORM_MIXIN_PKG_PERMALINK="v1.0.0-rc.1"
ARG PORTER_HOME=/root/.porter/
COPY scripts/porter.sh /tmp/
RUN export PORTER_MIRROR=${PORTER_MIRROR} \
PORTER_PERMALINK=${PORTER_PERMALINK} \
PORTER_PKG_PERMALINK=${PORTER_PKG_PERMALINK} \
PORTER_TERRAFORM_MIXIN_PKG_PERMALINK=${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK} \
PORTER_HOME=${PORTER_HOME} \
&& /tmp/porter.sh

Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/admin-vm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/shared_services/admin-vm/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-admin-vm
version: 0.1.0
version: 0.2.0
description: "An admin vm shared service"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/airlock_notifier/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,5 @@ RUN apt-get update \
# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins

WORKDIR $BUNDLE_DIR/app
RUN zip -r /cnab/app/LogicApp.zip .
2 changes: 1 addition & 1 deletion templates/shared_services/airlock_notifier/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-airlock-notifier
version: 0.1.2
version: 0.2.0
description: "A shared service notifying on Airlock Operations"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/certs/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,3 @@ RUN apt-get update \

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/shared_services/certs/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-certs
version: 0.1.4
version: 0.2.0
description: "An Azure TRE shared service to generate certificates for a specified internal domain using Letsencrypt"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/cyclecloud/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,3 @@ RUN apt-get update \

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/shared_services/cyclecloud/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-cyclecloud
version: 0.2.7
version: 0.3.0
description: "An Azure TRE Shared Service Template for Azure Cyclecloud"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/firewall/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/shared_services/firewall/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-firewall
version: 0.5.0
version: 0.6.0
description: "An Azure TRE Firewall shared service"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/gitea/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/shared_services/gitea/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-gitea
version: 0.3.14
version: 0.4.0
description: "A Gitea shared service"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/shared_services/sonatype-nexus-vm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/shared_services/sonatype-nexus-vm/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-sonatype-nexus
version: 2.1.7
version: 2.2.0
description: "A Sonatype Nexus shared service"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/workspace_services/azureml/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,3 @@ ARG BUNDLE_DIR
# Use the BUNDLE_DIR build argument to copy files into the bundle

COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspace_services/azureml/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-azureml
version: 0.4.12
version: 0.5.0
description: "An Azure TRE service for Azure Machine Learning"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ COPY . $BUNDLE_DIR

# PORTER_MIXINS

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& terraform providers mirror /usr/local/share/terraform/plugins

WORKDIR $BUNDLE_DIR
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-user-resource-aml-compute-instance
version: 0.3.2
version: 0.4.0
description: "Azure Machine Learning Compute Instance"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/workspace_services/gitea/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspace_services/gitea/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-workspace-service-gitea
version: 0.4.0
version: 0.5.0
description: "A Gitea workspace service"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/workspace_services/guacamole/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspace_services/guacamole/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-guacamole
version: 0.4.6
version: 0.5.0
description: "An Azure TRE service for Guacamole"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,3 @@ COPY . $BUNDLE_DIR

# Apply patch with the difference from the base workspace
RUN patch -p0 < $BUNDLE_DIR/windowsvm.diff

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-guacamole-import-reviewvm
version: 0.0.3
version: 0.1.0
description: "An Azure TRE User Resource Template for reviewing Airlock import requests"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-guacamole-linuxvm
version: 0.4.16
version: 0.5.0
description: "An Azure TRE User Resource Template for Guacamole (Linux)"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-guacamole-windowsvm
version: 0.4.14
version: 0.5.0
description: "An Azure TRE User Resource Template for Guacamole (Windows 10)"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/workspace_services/innereye/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,3 @@ ARG BUNDLE_DIR
# Use the BUNDLE_DIR build argument to copy files into the bundle

COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspace_services/innereye/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-innereye
version: 0.3.5
version: 0.4.0
description: "An Azure TRE service for InnerEye Deep Learning"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/workspace_services/mlflow/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspace_services/mlflow/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-service-mlflow
version: 0.3.8
version: 0.4.0
description: "An Azure TRE service for MLflow machine learning lifecycle"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/workspace_services/mysql/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ ARG BUNDLE_DIR

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspace_services/mysql/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-workspace-service-mysql
version: 0.1.2
version: 0.2.0
description: "A MySQL workspace service"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
7 changes: 0 additions & 7 deletions templates/workspaces/airlock-import-review/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,3 @@ COPY . $BUNDLE_DIR

# Apply patch with the difference from the base workspace
RUN patch -p0 < $BUNDLE_DIR/workspace_base.diff

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
2 changes: 1 addition & 1 deletion templates/workspaces/airlock-import-review/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-workspace-airlock-import-review
version: 0.3.30
version: 0.4.0
description: "A workspace to do Airlock Data Import Reviews for Azure TRE"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
7 changes: 0 additions & 7 deletions templates/workspaces/base/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,3 @@ RUN apt-get update && \

# Use the BUNDLE_DIR build argument to copy files into the bundle
COPY . $BUNDLE_DIR

# Mirror plugins to prevent network access at runtime
# Remove when available from https://github.com/getporter/terraform-mixin/issues/90
WORKDIR $BUNDLE_DIR/terraform
RUN terraform init -backend=false \
&& rm -fr $BUNDLE_DIR/terraform/.terraform/providers \
&& terraform providers mirror /usr/local/share/terraform/plugins
Loading

0 comments on commit 1433311

Please sign in to comment.