Repository navigation
Stop Terraform apply from rolling back just deploy-dev images - #86
Merged
Merged
Conversation
Ignore the Pixel container image after first create so just tf-apply cannot replace the SHA just deploy-dev pinned. Document that az owns the running pin; keep min=max replicas at 1. Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
Terraform cannot condition lifecycle, so prod (#12) gets a second Container App resource that still sets container_image. Dev keeps the ignore plus a moved block so pixel-dev is not replaced. Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
CI plan failed because concat of the Container App objects marked the name output sensitive. Export local.name_prefix instead. Co-authored-by: NinjaLikesCheez <NinjaLikesCheez@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #73.
just deploy-devpins Azuredevto a GHCR SHA viaaz containerapp update. Terraform still hadcontainer_imageon the Container App, so a laterjust tf-apply devwith a stale gitignored tfvars SHA could roll the bot backward.Chosen approach: Terraform
lifecycle.ignore_changeson the dev Pixel container image only (azurerm_container_app.this). Apply still manages vault, volume, env and the replica pin. After first create,just deploy-dev/azowns the running dev image.Prod is not ignored. Terraform cannot condition
ignore_changes, so#12uses a second resource (azurerm_container_app.managed) with no image ignore. Prod apply will setcontainer_image. Amovedblock keeps livepixel-devasthis[0](address change only; not a replace).Not in this PR: no prod apply, no second running app, replica count stays
min = max = 1, CD still does not apply Terraform.Docs
just deploy-dev; first apply after merge movesthis→this[0]CHANGELOG.mdUnreleased (Fixed)This does not change
core/access*, identity, dispatcher, registry, or access-config.How to verify
With Azure login (does not apply):
Leftover human steps
just tf-plan dev/just tf-apply devuses this lifecycle (plan should omit the image rollback). Expect a state move, not a replace. Do not apply until a maintainer says so.just deploy-devoraz containerapp update(min=max=1).container_imageat the GHCR SHA; that apply will roll the prod app.