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_kusto_script - Lock kusto cluster so multiple scripts can be applied #16690

Merged
merged 11 commits into from
May 12, 2022

Conversation

mojanas
Copy link
Contributor

@mojanas mojanas commented May 6, 2022

Fixes #16471

$ make acctests SERVICE='kusto' TESTARGS='-run=TestAccKustoScript_multiple' TESTTIMEOUT='30m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/kusto -run=TestAccKustoScript_multiple -timeout 30m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccKustoScript_multiple
=== PAUSE TestAccKustoScript_multiple
=== CONT  TestAccKustoScript_multiple
--- PASS: TestAccKustoScript_multiple (1412.46s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/kusto 1415.445s

Based off of #16649
The kusto scripts modify the underlying cluster configuration during apply, so we would want to lock the cluster instead of the database.

@mojanas mojanas marked this pull request as ready for review May 6, 2022 17:01
@github-actions github-actions bot added size/S and removed size/M labels May 9, 2022
@mojanas
Copy link
Contributor Author

mojanas commented May 9, 2022

Tagging @mbfrahry and @sinbai for visibility

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 @mojanas, this is nearly there but we need to lock the actual cluster id and not just the cluster name.

internal/services/kusto/kusto_database_script_resource.go Outdated Show resolved Hide resolved
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.

LGTM!

@mbfrahry mbfrahry changed the title azurerm_kusto_script - Lock kusto cluster so multiple scripts can be applied azurerm_kusto_script - Lock kusto cluster so multiple scripts can be applied May 12, 2022
@mbfrahry mbfrahry added this to the v3.6.0 milestone May 12, 2022
@mbfrahry mbfrahry merged commit f9fb933 into hashicorp:main May 12, 2022
mbfrahry added a commit that referenced this pull request May 12, 2022
@mojanas mojanas deleted the b-multiple-kusto-script-on-cluster branch May 12, 2022 15:54
@github-actions
Copy link

This functionality has been released in v3.6.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 Jun 17, 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.

Creating multiple azurerm_kusto_script resources at once causes [Conflict] errors on cluster
2 participants