microsoft / cobalt

Infrastructure turn-key solution for app service workloads
MIT License
116 stars 78 forks source link

Ignore service principal password resources from Terraform state management #351

Closed erikschlegel closed 4 years ago

erikschlegel commented 4 years ago

All Submissions:


What is the current behavior?


Currently, all azure resource(s) state changes related to the service principal password are managed through Terraform. This results in state changes being triggered for Terraform incremental builds as the password is randomly generated on each run. The impact is Terraform attempts to delete and recreate the password and KV secrets on each incremental deployment, regardless of template changes. Terraform should only be responsible for creating resources like the SP password and keyvault secrets when bootstrapping the initial azure environment.

Issue Number: #330

What is the new behavior?


Terraform resource types such as service prinipal passwords and keyvault secrets capturing sp passwords are ignored from state change lifecycles events via

lifecycle {
    ignore_changes = ["value"]
  }

Does this introduce a breaking change?


erikschlegel commented 4 years ago

@iphilpot all checks are passing and ready for review