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

azurerm_synapse_workspace - remove sql password requirement for synapse #18850

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

RaphHaddad
Copy link
Contributor

Please excuse any major mistakes. This is my first PR.

This PR removes the requirement for a local SQL User on Synapse as per Azure's constraints.

I am not sure how to add a validation to check either AAD auth or local SQL user enabled. Any direction is appreciated.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @RaphHaddad! When properties are not required rather than setting the property Required to false we set Optional to true.

We would also still need to add a test to validate that this change works, you can probably just copy one of the existing tests and remove the values for sql_administrator_login and sql_administrator_login_password in the test config. Once that's done we can run the tests and get this merged.

Thanks!

@@ -73,14 +73,14 @@ func resourceSynapseWorkspace() *pluginsdk.Resource {

"sql_administrator_login": {
Type: pluginsdk.TypeString,
Required: true,
Required: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Required: false,
Optional: true,

ForceNew: true,
ValidateFunc: validate.SqlAdministratorLoginName,
},

"sql_administrator_login_password": {
Type: pluginsdk.TypeString,
Required: true,
Required: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Required: false,
Optional: true,

@RaphHaddad RaphHaddad changed the title Remove sql password requirement for synapse azurerm_synapse_workspace - remove sql password requirement for synapse Oct 20, 2022
@RaphHaddad
Copy link
Contributor Author

Hello @stephybun, thanks for the guidance.

I have made the changes necessary and added a new test. Can you confirm that the naming is correct for the test?

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RaphHaddad the tests are passing 🎉 . I forgot to mention the docs need to be updated to reflect this change too, but once that's done this will be good to go!

@RaphHaddad
Copy link
Contributor Author

@stephybun , done!

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @RaphHaddad LGTM 🌻

@stephybun stephybun merged commit 0007ad2 into hashicorp:main Oct 24, 2022
@github-actions github-actions bot added this to the v3.28.0 milestone Oct 24, 2022
stephybun added a commit that referenced this pull request Oct 24, 2022
@github-actions
Copy link

This functionality has been released in v3.28.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants