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

Add support for updates to resource type(s) #196

Closed
wants to merge 2 commits into from

Conversation

owenfarrell
Copy link

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

Fixes #140

PR Checklist


  • I have read the CONTRIBUTING.MD instructions
  • I have changed the resourceDefinition.json
  • I have generated the resource model (there's a models_generated.go file in my PR)
  • I have updated the README.md#resource-status
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?

Description

Does this introduce a breaking change

  • YES
  • NO

While this doesn't inherently introduce a backwards-breaking change, I don't see a way to support auto-upgrades of the current version of the provider to support this change. Anyone who attempts to auto-upgrade will incur the existing behavior (a forced deletion/recreation of downstream resources) one more 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/10/13 15:40:19 File generated
go fmt ./...
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 22.411s
?       github.com/aztfmod/terraform-provider-azurecaf/completness      [no test files]

owenfarrell and others added 2 commits October 13, 2022 15:56
Signed-off-by: Owen Farrell <owen.farrell@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@owenfarrell
Copy link
Author

In stewing on this a bit more, I took a crack at what an "auto-upgrade" approach looks like as part of #203. The idea is that it reverse engineers the random suffix that was generated based on existing result(s) using a guess-and-check approach.

@arnaudlh
Copy link
Member

Closing as superseded by #203

@arnaudlh arnaudlh closed this Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

r/azurecaf_name: recreation of dependent resources on resource_types update
2 participants