From 32a4e601bd2a619f125b5e72c0601101c431a9dd Mon Sep 17 00:00:00 2001 From: Mitch Date: Thu, 12 Dec 2024 16:40:02 -0500 Subject: [PATCH] fix: terraform deploy --- .github/workflows/devnet-deploy.yml | 6 ++++++ .github/workflows/network-deploy.yml | 2 +- spartan/terraform/deploy-release/main.tf | 5 +++++ spartan/terraform/deploy-release/variables.tf | 6 ++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/devnet-deploy.yml b/.github/workflows/devnet-deploy.yml index 31f710afe03..83496bc3be0 100644 --- a/.github/workflows/devnet-deploy.yml +++ b/.github/workflows/devnet-deploy.yml @@ -13,6 +13,11 @@ on: description: The name of the secret which holds the boot node's contract deployment mnemonic required: true default: testnet-deployment-mnemonic + deployment_salt: + description: The salt to use for this deployment. Defaults to random + required: false + type: string + default: "" respect_tf_lock: description: Whether to respect the Terraform lock required: false @@ -39,6 +44,7 @@ jobs: values_file: release-devnet.yaml aztec_docker_image: ${{ github.event.inputs.aztec_docker_image }} deployment_mnemonic_secret_name: ${{ github.event.inputs.deployment_mnemonic_secret_name }} + deployment_salt: ${{ github.event.inputs.deployment_salt }} respect_tf_lock: ${{ github.event.inputs.respect_tf_lock }} secrets: GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} diff --git a/.github/workflows/network-deploy.yml b/.github/workflows/network-deploy.yml index 4a43e80f2f0..de58c089398 100644 --- a/.github/workflows/network-deploy.yml +++ b/.github/workflows/network-deploy.yml @@ -163,7 +163,7 @@ jobs: -var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ -var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ -var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" \ - -var="L1_SALT=${DEPLOYMENT_SALT:-$RANDOM}" \ + -var="L1_DEPLOYMENT_SALT=${DEPLOYMENT_SALT:-$RANDOM}" \ -out=tfplan \ -lock=${{ inputs.respect_tf_lock }} diff --git a/spartan/terraform/deploy-release/main.tf b/spartan/terraform/deploy-release/main.tf index 73eba9e5b37..84d44bae93e 100644 --- a/spartan/terraform/deploy-release/main.tf +++ b/spartan/terraform/deploy-release/main.tf @@ -52,6 +52,11 @@ resource "helm_release" "aztec-gke-cluster" { value = var.L1_DEPLOYMENT_MNEMONIC } + set { + name = "aztec.l1Salt" + value = var.L1_DEPLOYMENT_SALT + } + # Setting timeout and wait conditions timeout = 1200 # 20 minutes in seconds wait = true diff --git a/spartan/terraform/deploy-release/variables.tf b/spartan/terraform/deploy-release/variables.tf index 0dff0d4509b..7a5fbc364aa 100644 --- a/spartan/terraform/deploy-release/variables.tf +++ b/spartan/terraform/deploy-release/variables.tf @@ -24,3 +24,9 @@ variable "L1_DEPLOYMENT_MNEMONIC" { type = string sensitive = true } + +variable "L1_DEPLOYMENT_SALT" { + description = "Salt to use for the L1 contract deployments" + type = string + default = "" +}