aztfmod / terraform-provider-azurecaf

Terraform provider for the Terraform platform engineering for Azure
MIT License
174 stars 93 forks source link

Add support for updates to resource type(s) with auto-upgrade support #203

Open owenfarrell opened 1 year ago

owenfarrell commented 1 year ago

Signed-off-by: Owen Farrell owen.farrell@gmail.com

Fixes #140 Supercedes: #196

PR Checklist


Description

Does this introduce a breaking change

While this doesn't inherently introduce a backwards-breaking change, I'm not sure that my attempt at an auto-upgrade is a sure thing. The approach that I used was a bit of a "guess and check" based on the existing outputs. In a worst case scenarios, anyone who attempts to auto-upgrade will incur the existing behavior (a forced deletion/recreation of downstream resources) one last time. Any suggestions on how to mitigate this issue would be appreciated.

Testing

In addition to local unit testing, I've exercised these updates via a local provider override and it seems to meet the need.

$ make build
go generate

2022/11/02 12:22:28 File generated
go fmt ./...
azurecaf/data_environment_variable.go
azurecaf/models_generated.go
azurecaf/provider_test.go
go build -o ./terraform-provider-azurecaf
go test ./...
?       github.com/aztfmod/terraform-provider-azurecaf  [no test files]
ok      github.com/aztfmod/terraform-provider-azurecaf/azurecaf 24.284s
?       github.com/aztfmod/terraform-provider-azurecaf/completness      [no test files]
sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
26.7% 26.7% Duplication

patpicos commented 1 year ago

any update on this enhancement? this would save a lot of headaches for folks who didnt notice this behavior and encountered significant cascading impacts (resource re-creation)

sonarcloud[bot] commented 6 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
20.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud