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_search_service: Issue with "hosting_mode" in azurerm 3.54. Forces replacement of Resource due to the API returning 'Default' with a capital and azurerm trying change this to 'default' without a capital #21630

Closed
a111792 opened this issue May 2, 2023 · 2 comments

Comments

@a111792
Copy link

a111792 commented May 2, 2023

          There seems to be an issue with the new argument: "hosting_mode" with azurerm 3.54. It is forcing a replacement of the search service due to the API returning 'Default' with a capital and azurerm trying change this to 'default' without a capital:

hosting_mode = "Default" -> "default" # forces replacement

I've checked the terraform state: terraform state show "azurerm_search_service.example"
And it returns:

resource "azurerm_search_service" "example" {
...
hosting_mode = "Default"
...

Removing the resource from state and re-importing does not help to resolve the issue.

Setting the argument in the Terraform code to: hosting_mode = "default" also forces the replacement.

Trying to use hosting_mode = "Default" errors out too.

I've had to lock the azurerm provider to 3.53 to allow the run to complete without forcing the replacement.

Here is the original Terrafrom code:

resource "azurerm_search_service" "example" {
name = local.cognitive_search_name
resource_group_name = local.resource_group_name
location = local.location
sku = "standard"
public_network_access_enabled = false
identity {
type = "SystemAssigned"
}
tags = local.common_tags
}

Originally posted by @njglenuk in #21323 (comment)

@a111792 a111792 changed the title There seems to be an issue with the new argument: "hosting_mode" with azurerm 3.54. It is forcing a replacement of the search service due to the API returning 'Default' with a capital and azurerm trying change this to 'default' without a capital: azurerm_search_service: Issue with "hosting_mode" in azurerm 3.54. Forces replacement of Resource due to the API returning 'Default' with a capital and azurerm trying change this to 'default' without a capital May 2, 2023
tombuildsstuff added a commit to hashicorp/pandora that referenced this issue May 3, 2023
@rcskosir
Copy link
Contributor

Thanks for taking the time to submit this issue. It looks like this has been resolved as of hashicorp/pandora#2468. As such, I am going to mark this issue as closed.

Copy link

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 have found a problem that seems similar to this, 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 May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants