Skip to content

Commit

Permalink
Align Terraform versions (#753)
Browse files Browse the repository at this point in the history
* turn on codeql for pr targeting develop too

* align terraform versions to 1.0.5

* add editor config file

Co-authored-by: Anders Lybecker <[email protected]>
  • Loading branch information
tamirkamara and Lybecker authored Sep 1, 2021
1 parent 2521800 commit 127f612
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 13 deletions.
12 changes: 8 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# Install terraform
ARG TERRAFORM_VERSION
RUN apt-get update && apt-get install -y gnupg software-properties-common curl \
&& curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - \
&& curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - \
&& apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
&& apt-get update && apt-get install -y terraform
&& apt-get update && apt-get install -y terraform "${TERRAFORM_VERSION}"

# Install Azure CLI
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Expand All @@ -22,7 +23,7 @@ RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
RUN groupadd --gid 1001 docker

# Install Docker
RUN apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release \
RUN apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
| tee /etc/apt/sources.list.d/docker.list > /dev/null \
Expand All @@ -38,7 +39,10 @@ RUN apt-get install -y python3 python3-venv libaugeas0 \
&& /opt/certbot/bin/pip install certbot

# Install Porter
RUN export PORTER_HOME=/home/vscode/.porter && curl -L https://cdn.porter.sh/latest/install-linux.sh | bash && /home/vscode/.porter/porter mixin install docker && chown -R vscode /home/vscode/.porter/
RUN export PORTER_HOME=/home/vscode/.porter \
&& curl -L https://cdn.porter.sh/latest/install-linux.sh | bash \
&& ${PORTER_HOME}/porter mixin install docker \
&& chown -R vscode ${PORTER_HOME}

ENV PATH /home/vscode/.porter/:$PATH

Expand Down
1 change: 1 addition & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
VARIANT: "3.8"
INSTALL_NODE: "false"
NODE_VERSION: "lts/*"
TERRAFORM_VERSION: "1.0.5"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
Expand Down
37 changes: 37 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{tf,tfvars}]
indent_size = 2
indent_style = space

[*.txt]
indent_style = tab
indent_size = 4

[*.{diff,md}]
trim_trailing_whitespace = false

[{*.yaml,*.yml}]
indent_size = 2

[Makefile]
indent_style = tab

[*.py]
indent_size = 4
indent_style = space
max_line_length = 120

[*.java]
max_line_length = 120
# disable wildcard imports
ij_java_class_count_to_use_import_on_demand = 99
ij_java_names_count_to_use_import_on_demand = 99
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
branches: [ main, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [ main, develop ]
schedule:
- cron: '41 3 * * 5'

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/deploy_tre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Install Terraform
uses: little-core-labs/install-terraform@v2.0.0
uses: hashicorp/setup-terraform@v1
with:
version: 0.15.4
terraform_version: 1.0.5

- name: Create Management Infrastructure
shell: bash
Expand Down Expand Up @@ -83,9 +83,10 @@ jobs:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Install Terraform
uses: little-core-labs/install-terraform@v2.0.0
uses: hashicorp/setup-terraform@v1
with:
version: 0.15.4
terraform_version: 1.0.5

- name: Deploy TRE
shell: bash
env:
Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/azureml/porter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ outputs:
mixins:
- exec
- terraform:
clientVersion: 0.15.4
clientVersion: 1.0.5

install:
- terraform:
Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/devtestlabs/porter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ parameters:
mixins:
- exec
- terraform:
clientVersion: 0.15.4
clientVersion: 1.0.5

install:
- terraform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ outputs:
mixins:
- exec
- terraform:
clientVersion: 0.15.4
clientVersion: 1.0.5

install:
- terraform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ parameters:
mixins:
- exec
- terraform:
clientVersion: 0.15.4
clientVersion: 1.0.5

install:
- terraform:
Expand Down

0 comments on commit 127f612

Please sign in to comment.