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

Provider produced inconsistent final plan when using azure_ad_user_principal_names #13

Open
akatasonov opened this issue Jun 22, 2022 · 0 comments

Comments

@akatasonov
Copy link

Hello and thank you for your module. It works great, however, if I enable the azure_ad_user_principal_names block in "access_policies" I'm getting the error:

Error: Provider produced an inconsistent final plan
│
│ When expanding the plan for module.key-vault.azurerm_key_vault.main to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/azurerm"  
│ produced an invalid new value for .access_policy: new element 2 has appeared.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

My terraform block:

terraform {

  required_version = ">=1.2.0"

  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "~>2.15.0"
    }
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~>3.9.0"
    }
  }

  # configure azure blob storage as state backend
  backend "azurerm" {}
}

# Configure the Microsoft Azure ActiveDirectory provider
provider "azuread" {
}

# Configure the Microsoft Azure Provider
provider "azurerm" {
  features {}
}

Everything works fine if I comment the block:

{
      azure_ad_user_principal_names = ["UPN goes here"]
      key_permissions               = ["Create", "Delete", "Get", "Backup", "Decrypt", "Encrypt", "Import", "List", "Purge", "Recover", "Restore", "Sign", "Update", "Verify"]
      secret_permissions            = ["Backup", "Delete", "Get", "List", "Purge", "Recover", "Restore", "Set"]
      certificate_permissions       = []
      storage_permissions           = []
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant