Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "plan" mode deployment #4029

Open
jonnyry opened this issue Jul 15, 2024 · 3 comments
Open

Support "plan" mode deployment #4029

jonnyry opened this issue Jul 15, 2024 · 3 comments
Labels

Comments

@jonnyry
Copy link
Contributor

jonnyry commented Jul 15, 2024

Support "plan" mode deployments so that you can evaluate the terraform plan before deciding to apply it.

Upgrading a TRE between versions may change a large number of Azure resources which introduces risk to a running TRE. Being able to evaluate the terraform plan before applying would reduce the risk of issues occuring during an upgrade, and the downtime required for an upgrade.

Ideally this would be a new build variable, e.g.

image

Also: a similar mode when upgrading components within the TRE.

@jonnyry jonnyry changed the title Support a "plan" mode deployment Support "plan" mode deployment Jul 15, 2024
@tim-allen-ck
Copy link
Collaborator

this would be great.

marrobi added a commit that referenced this issue Jul 31, 2024
Related to #4029

Add support for 'plan' mode deployments to evaluate the terraform plan before applying it.

* **devops/scripts/terraform_wrapper.sh**
  - Add a check for the `DEPLOY_MODE` variable.
  - Execute `terraform plan` without applying if `DEPLOY_MODE` is set to 'plan'.
  - Log the plan output to a file.

* **docs/tre-admins/setup-instructions/manual-deployment.md**
  - Add instructions on using the `DEPLOY_MODE` variable for 'plan' mode deployments.
  - Include examples of setting the `DEPLOY_MODE` variable to 'plan' and 'apply'.

* **.github/workflows/deploy_tre.yml**
  - Add an input for `DEPLOY_MODE` in the workflow.
  - Pass the `DEPLOY_MODE` input to the deployment script.

* **docs/tre-admins/setup-instructions/workflows.md**
  - Add instructions on using the `DEPLOY_MODE` variable for 'plan' mode deployments via the GitHub UI.
  - Include examples of setting the `DEPLOY_MODE` variable to 'plan' and 'apply'.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/4029?shareId=XXXX-XXXX-XXXX-XXXX).
@marrobi
Copy link
Member

marrobi commented Jul 31, 2024

@jonnyry been playing with GitHub Workspaces to fix issues. Created a PR, but haven't tested it. Let me know thoughts and if can find time to test, would be great.

@jonnyry
Copy link
Contributor Author

jonnyry commented Aug 1, 2024

@marrobi ah fantastic - thank you very much :-) just returned from holiday but will test it out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants