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_mssql_database support 0 for min_capacity #8308

Merged
merged 5 commits into from
Oct 4, 2020

Conversation

yupwei68
Copy link
Contributor

@yupwei68 yupwei68 commented Sep 1, 2020

Fix #8226

@ghost ghost added the size/XS label Sep 1, 2020
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hi @yupwei68

Thanks for this PR.

Taking a look through here it appears that we can add 0 as an allowed value here (as 1 and 2 are) - which should solve this and provide examples of valid values here; at the same time can we also add an acceptance test to cover this missing use-case? If we can fix those up then we should be able to take another look

Thanks!

azurerm/internal/services/mssql/mssql_database_resource.go Outdated Show resolved Hide resolved
@ghost ghost added size/S and removed size/XS labels Sep 1, 2020
@yupwei68
Copy link
Contributor Author

yupwei68 commented Sep 1, 2020

Hi @tombuildsstuff Thanks for your comments. Please continue reviewing.

@ghost ghost removed the waiting-response label Sep 1, 2020
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hi @yupwei68

Taking a look through the unit test looks good, but can we add an acceptance test to ensure that #8226 is fixed?

Thanks!

@@ -123,7 +122,7 @@ func resourceArmMsSqlDatabase() *schema.Resource {
Type: schema.TypeFloat,
Optional: true,
Computed: true,
ValidateFunc: azValidate.FloatInSlice([]float64{0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 3, 4, 5}),
ValidateFunc: validate.MsSqlDatabaseMinCapacity,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add an Acceptance Test to provision a Database with the Capacity of 0 to confirm the Basic SKU / #8226 is fixed

@ghost ghost added size/M and removed size/S labels Oct 4, 2020
@ghost ghost added size/S and removed size/M labels Oct 4, 2020
@katbyte katbyte changed the title azurerm_mssql_database min_capacity change validation azurerm_mssql_database support 0 for min_capacity Oct 4, 2020
@katbyte katbyte merged commit 534bcec into hashicorp:master Oct 4, 2020
katbyte added a commit that referenced this pull request Oct 4, 2020
@katbyte katbyte added this to the v2.30.0 milestone Oct 8, 2020
@ghost
Copy link

ghost commented Nov 4, 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 as resolved and limited conversation to collaborators Nov 4, 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.

azurerm_mssql_elasticpool - service tier 'Basic' must have whole numbers as their 'minCapacity'
3 participants