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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform suggest to change default_identity_type for azurerm_cosmosdb_account indefinitely #21951

Open
1 task done
lra opened this issue May 26, 2023 · 6 comments 路 May be fixed by #26525
Open
1 task done

Terraform suggest to change default_identity_type for azurerm_cosmosdb_account indefinitely #21951

lra opened this issue May 26, 2023 · 6 comments 路 May be fixed by #26525

Comments

@lra
Copy link

lra commented May 26, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.4.6

AzureRM Provider Version

3.58.0

Affected Resource(s)/Data Source(s)

azurerm_cosmosdb_account

Terraform Configuration Files

resource "azurerm_cosmosdb_account" "db" {
  name                = "test"
  location            = "westus"
  resource_group_name = azurerm_resource_group.this.name
  offer_type          = "Standard"
  kind                = "GlobalDocumentDB"
  enable_automatic_failover = true
  consistency_policy {
    consistency_level       = "BoundedStaleness"
    max_interval_in_seconds = 300
    max_staleness_prefix    = 100000
  }
  geo_location {
    location          = lookup(each.value, "failover_location", local.int_gr.cloud_region)
    failover_priority = 1
  }

  geo_location {
    location          = local.int_gr.cloud_region
    failover_priority = 0
  }
}

Debug Output/Panic Output

n/a

Expected Behaviour

Empty change plan

Actual Behaviour

  + default_identity_type                 = "FirstPartyIdentity"

Steps to Reproduce

terraform apply

Important Factoids

No response

References

This is the same problem as #16706
This happens since azurerm 3.58.0 which has changes related to the azurerm_cosmosdb_account resource: https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.58.0

@egorshulga
Copy link

I found out that at least for some of the Cosmos Accounts the property defaultIdentity is actually set to an empty string in json view in Azure Portal. I am not sure yet when and how that happened

@masterphenix
Copy link

Hello, same issue here with provider version 3.70.0 (and terraform version 1.3.9)

@bPhysicist
Copy link
Contributor

bPhysicist commented Feb 13, 2024

This seems to have been reintroduced by 6a4518b after having been fixed by 0cc6548f24e4e0b3915f8d497d1447c4470d736a

I would like to work on this if this is still relevant. From my first impression of the PRs above this might turn out to be a upstream bug which can not be caught downstream in all its edge cases.

@landintrees
Copy link

We are also seeing this issue on 3.93.0

@richard-sistern
Copy link

Seeing this on 3.99.0 also

@Apokalypt
Copy link
Contributor

Same here on 3.109.0... It's kinda annoying but not major if someone can found a final fix it will be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment