azurerm_service_plan - fix sku_name case difference issue#30907
azurerm_service_plan - fix sku_name case difference issue#30907sreallymatt merged 3 commits intohashicorp:mainfrom
azurerm_service_plan - fix sku_name case difference issue#30907Conversation
…alue in enum, this will address case difference issue
|
Thanks @mbfrahry , of course we can add the suppress diff func directly, I just think it might be better if we parse the api response to macth with the value that we allowed before setting it back to state? |
| if sku.Name != nil { | ||
| state.Sku = *sku.Name | ||
| for _, item := range helpers.AllKnownServicePlanSkus() { | ||
| if strings.EqualFold(*sku.Name, item) { |
There was a problem hiding this comment.
We tend to want to use DiffSuppressFunc rather than custom code in the read function. Could we do that here instead or is there a reason we're going this route?
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @xiaxyi LGTM ✅
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
…alue in enum, this will address case difference issue
Community Note
Description
Terraform provider defined a set of allowed sku value for the property
sku_name, however, the api ignored the case format. This PR will check the value in a case insensitive way then set the allowed format backPR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_resource- support for thething1property [GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #30745
AI Assistance Disclosure
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.