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

New Resource & Data Source: azurerm_netapp_pool #4889

Merged
merged 6 commits into from
Nov 19, 2019

Conversation

neil-yechenwei
Copy link
Contributor

This PR is code implement for issue #3936

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @neil-yechenwei, thanks for opening this PR. It's mostly there and the main thing to discuss would be size and making it a little more user friendly

azurerm/resource_arm_netapp_pool.go Outdated Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Show resolved Hide resolved
azurerm/resource_arm_netapp_pool_test.go Show resolved Hide resolved
azurerm/resource_arm_netapp_pool_test.go Show resolved Hide resolved
website/docs/d/netapp_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/r/netapp_pool.html.markdown Outdated Show resolved Hide resolved
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi @neil-yechenwei,

Looking pretty good here, i've left some comments in addition to matthews tht should be addressed.

Comment on lines 21 to 24
ValidateFunc: validation.StringMatch(
regexp.MustCompile(`^[\da-zA-Z_-]{4,64}$`),
`The name must be between 4 and 64 characters in length and contain only letters, numbers, underscore or hyphens.`,
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we make this a shared function in the netapp package and share it with the resource?

Copy link
Contributor Author

@neil-yechenwei neil-yechenwei Nov 18, 2019

Choose a reason for hiding this comment

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

Fixed. Moved this validation to netapp package as shared function.

"account_name": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringMatch(
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we make this a shared function in the netapp package and share it with the resource and netapp account resource?

Copy link
Contributor Author

@neil-yechenwei neil-yechenwei Nov 18, 2019

Choose a reason for hiding this comment

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

Fixed. Moved this validation to netapp package as shared function.

azurerm/data_source_netapp_pool.go Outdated Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Outdated Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Outdated Show resolved Hide resolved
azurerm/resource_arm_netapp_pool_test.go Show resolved Hide resolved
website/docs/d/netapp_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/r/netapp_pool.html.markdown Outdated Show resolved Hide resolved
website/docs/r/netapp_pool.html.markdown Outdated Show resolved Hide resolved
@neil-yechenwei
Copy link
Contributor Author

@katbyte , @mbfrahry , Thanks for your comments. I've updated code per your comments.

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

This is close! We just have a couple nil checks to add (so we don't panic) and then we'll do one last pass on tests and we're good.

azurerm/data_source_netapp_pool.go Outdated Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Outdated Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Show resolved Hide resolved
azurerm/resource_arm_netapp_pool.go Show resolved Hide resolved
website/docs/r/netapp_pool.html.markdown Outdated Show resolved Hide resolved
@neil-yechenwei
Copy link
Contributor Author

@mbfrahry , Thanks for your comments. I've updated code.

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

These changes look great! Thanks for opening this PR. We'll get it into the next release!

@mbfrahry mbfrahry changed the title Add new resource & data source: azurerm_netapp_pool New Resource & Data Source: azurerm_netapp_pool Nov 19, 2019
@mbfrahry mbfrahry merged commit 43f35dd into hashicorp:master Nov 19, 2019
mbfrahry added a commit that referenced this pull request Nov 19, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
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.

3 participants