-
Notifications
You must be signed in to change notification settings - Fork 10.1k
backend/azure: Remove legacy helper/schema dependency [rebased] #37225
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
Conversation
This now uses the backendbase package's "SDK-like" helpers instead, which provide a much smaller subset of the former legacy SDK functionality but enough for what this backend needs.
|
@hashicorp/terraform-azure, could someone with Azure credentials run the acceptance tests for the azure backend to verify the changes? Thanks! |
|
Interesting - I believe this is because PrepareConfig in the old code would use the empty string default when the field isn't set. This would get around the required behaviour. The new code doesn't seem to accept a default value for a required field like the old code did. Arguably, that's a more correct behaviour. I think the test needs to be updated here, but I defer to the Azure team. |
jackofallops
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @SarahFrench - LGTM 👍
|
Hi @jackofallops - I'm only able to run the |
To the best of my knowledge it should be an optional field, it's an override for non-standard environments, so |
…h the current behavior of code
* backend/azure: Remove legacy helper/schema dependency This now uses the backendbase package's "SDK-like" helpers instead, which provide a much smaller subset of the former legacy SDK functionality but enough for what this backend needs. * remove unused replace directive * Fix go.mod file after rebase * Fix schema errors after self-review of code * Change `metadata_host` to be an optional field in the schema, to match the current behavior of code --------- Co-authored-by: Martin Atkins <[email protected]> Co-authored-by: James Bardin <[email protected]>
|
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. |

A rebased* version of #34990 :
*= I noticed that the schema had changed since the original PR so my approach was to re-do that work
NOTE: This PR changed metadata_host in the schema from Required to Optional. The legacy SDK allowed the required field to be set using a fallback value, so users never saw required behaviour. Moving off the legacy SDK made the field to begin behaving as required, which isn't correct. Therefore we swapped the schema to mark it as Optional, and this isn't a user-facing change as prior to this PR the field behaved as optional already.
Target Release
1.13.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry