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

resource/azurerm_sql_database: Fix requested_service_objective_name updates #1503

Merged
merged 1 commit into from
Jul 6, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jul 6, 2018

Related: #590 (comment)

Previously, when attempting to update an azurerm_sql_database resource requested_service_objective_name argument without specifying a request_service_objective_id, the Azure would return an error because the resource was sending both the old (computed) ID and the new (updated) name:

$ make testacc TEST=./azurerm TESTARGS='-run=TestAccAzureRMSqlDatabase_requestedServiceObjectiveName'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run=TestAccAzureRMSqlDatabase_requestedServiceObjectiveName -timeout 180m
=== RUN   TestAccAzureRMSqlDatabase_requestedServiceObjectiveName
--- FAIL: TestAccAzureRMSqlDatabase_requestedServiceObjectiveName (195.12s)
	testing.go:513: Step 1 error: Error applying: 1 error(s) occurred:

		* azurerm_sql_database.test: 1 error(s) occurred:

		* azurerm_sql_database.test: Code="0" Message="The requested Service Objective Name does not match the requested Service Objective Id."
FAIL
FAIL	github.com/terraform-providers/terraform-provider-azurerm/azurerm	195.151s
make: *** [testacc] Error 1

This update allows the resource to successfully update:

$ make testacc TEST=./azurerm TESTARGS='-run=TestAccAzureRMSqlDatabase_requestedServiceObjectiveName'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run=TestAccAzureRMSqlDatabase_requestedServiceObjectiveName -timeout 180m
=== RUN   TestAccAzureRMSqlDatabase_requestedServiceObjectiveName
--- PASS: TestAccAzureRMSqlDatabase_requestedServiceObjectiveName (282.32s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	282.352s

@bflad bflad added bug service/mssql Microsoft SQL Server labels Jul 6, 2018
@bflad bflad requested a review from a team July 6, 2018 01:43
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.

@bflad,

Thank you for the PR, this LGTM! 👍

@katbyte katbyte added this to the 1.9.0 milestone Jul 6, 2018
@bflad bflad merged commit ab6192c into master Jul 6, 2018
@bflad bflad deleted the b-azurerm_sql_database-rson-updates branch July 6, 2018 01:59
bflad added a commit that referenced this pull request Jul 6, 2018
@ghost
Copy link

ghost commented Mar 30, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug service/mssql Microsoft SQL Server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants