Skip to content

Commit

Permalink
fix: terraform deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
just-mitch committed Dec 12, 2024
1 parent 00296fe commit 32a4e60
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/devnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/network-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions spartan/terraform/deploy-release/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions spartan/terraform/deploy-release/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
}

0 comments on commit 32a4e60

Please sign in to comment.