microsoft / PubSec-Info-Assistant

Information Assistant, built with Azure OpenAI Service, Industry Accelerator
MIT License
347 stars 783 forks source link

Redeployment of v1.2 shows 25 resources to change on each rerun #864

Closed ruandersMSFT closed 1 month ago

ruandersMSFT commented 2 months ago

Bug Details

Describe the bug A clear and concise description of what the bug is.

Steps To Reproduce

  1. Deploy v1.2
  2. Rerun make infrastructure or make deploy to observe upwards of 25 resources to change (even though deployment was just done and should match)

What is the expected behavior? 0 resources to change, as infrastructure was just deployed and should be in a matching state

Screenshots If applicable, add screenshots to help explain your problem.

image

Information Assistant details

Please provide the following details. You can simply include a screenshot of your Info panel as well.

GitHub branch: [e.g. main] main Version or Latest commit: [obtained by running git log -n 1 <branchname> commit df055a7155028b1d7b2bdda9b8a3ea1a7f96e5cb (tag: v1.2, origin/main, origin/HEAD, main) Merge: b6c3a3b8 a1e48677 Author: Lon Tierney 93607917+lon-tierney@users.noreply.github.com Date: Thu Sep 19 19:31:15 2024 -0700

Merge pull request #857 from microsoft/vNext-Dev

Merging 1.2 features into Main

What region is your Azure Open AI Service in? EastUS2

If the bug is confirmed, would you be willing to submit a PR?

dayland commented 2 months ago

This is due to the use of ARM templates to allow deployment to secured resources in some cases. Terraform can't validate the state of the Azure resources created by the ARM template, so it always tries to re-run the ARM scripts. The ARM templates themselves don't actually alter the resources if nothing has changed.

This is working as expected.

ruandersMSFT commented 2 months ago

Even after a failed partial deployment and attempting to resume, Terraform is already trying to change on redeployment.

image

image

image

In turn, this leads to errors changing the Key Vault Secret resources:

image