Skip to content

Commit 5267606

Browse files
Merge pull request #293034 from RoseHJM/ade-terraform-updates
ADE - terraform updates
2 parents dc9fc2b + 367a354 commit 5267606

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/deployment-environments/how-to-configure-extensibility-model-custom-image.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ RUN mv terraform /usr/bin/terraform
148148

149149
Within the standard images, operations are determined and executed based on the operation name. Currently, the two operation names supported are *deploy* and *delete*.
150150

151-
To set up your custom image to utilize this structure, specify a folder at the level of your Dockerfile named *scripts*, and specify two files, *deploy.sh*, and *delete.sh*. The deploy shell script runs when your environment is created or redeployed, and the delete shell script runs when your environment is deleted. You can see examples of shell scripts in the repository under the [Runner-Images folder for the ARM-Bicep](https://github.com/Azure/deployment-environments/tree/main/Runner-Images/ARM-Bicep) image.
151+
To set up your custom image to utilize this structure, specify a folder at the level of your Dockerfile named *scripts*, and specify two files, *deploy.sh*, and *delete.sh*. The deploy shell script runs when your environment is created or redeployed, and the delete shell script runs when your environment is deleted. You can see examples of shell scripts in the repository in the [scripts folder for Terraform](https://github.com/Azure/ade-extensibility-model-terraform/tree/main/scripts).
152152

153153
To ensure these shell scripts are executable, add the following lines to your Dockerfile:
154154

@@ -167,6 +167,7 @@ There are three steps to deploy infrastructure via Terraform:
167167

168168
During the core image's entrypoint, any existing state files are pulled into the container and the directory saved under the environment variable ```$ADE_STORAGE```. Additionally, any parameters set for the current environment stored under the variable ```$ADE_OPERATION_PARAMETERS```. In order to access the existing state file, and set your variables within a *.tfvars.json* file, run the following commands:
169169
```bash
170+
set -e #set script to exit on error
170171
EnvironmentState="$ADE_STORAGE/environment.tfstate"
171172
EnvironmentPlan="/environment.tfplan"
172173
EnvironmentVars="/environment.tfvars.json"

0 commit comments

Comments
 (0)