hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.35k stars 9.49k forks source link

terraform-provider-azurerm_v2.84.0_x5.exe plugin crashed on azurerm_storage_object_replication #29933

Closed woowil closed 2 years ago

woowil commented 2 years ago

Terraform Version

Terraform v1.0.11
on windows_amd64
...

Terraform Configuration Files


# MODULE: storage_account_replication

data "azurerm_client_config" "current" {}
data "azurerm_resource_group" "rg" {
  name = var.rg_name
}
data "azurerm_storage_account" "sa" {
  name                = var.sa_name
  resource_group_name = var.rg_name
}

data "azurerm_resource_group" "rg_dst" {
  provider = azurerm.secure
  count    = length(var.containers) > 0 ? 1 : 0

  name = var.rg_dst_name
}
data "azurerm_storage_account" "sa_dst" {
  provider = azurerm.secure
  count    = length(var.containers) > 0 ? 1 : 0

  name                = var.sa_dst_name
  resource_group_name = var.rg_dst_name
}
resource "azurerm_storage_object_replication" "repl" {
  depends_on = [data.azurerm_storage_account.sa, data.azurerm_storage_account.sa_dst]
  count      = length(var.containers) > 0 ? 1 : 0

  source_storage_account_id      = data.azurerm_storage_account.sa.id
  destination_storage_account_id = data.azurerm_storage_account.sa_dst[count.index].id

  dynamic "rules" {
    for_each = var.containers
    iterator = each

    content {
      source_container_name      = each.value.src_container
      destination_container_name = each.value.dst_container
    }
  }
}
variable "rg_name" {}
variable "sa_name" {}
variable "rg_dst_name" {}
variable "sa_dst_name" {}

variable "containers" {
  type = list(object({
    src_container = string
    dst_container = string
  }))
  description = "Storage containers to replicate"
  default     = []
}
terraform {
  required_providers {
    azurerm = {
      source                = "hashicorp/azurerm"
      configuration_aliases = [azurerm.secure]
    }
  }
}
...

Debug Output

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

References

jbardin commented 2 years ago

Hello,

This appears to be an issue or question with the AzureRM provider, not with Terraform itself. You can see existing issues and file a new one in their repository here: https://github.com/terraform-providers/terraform-provider-azurerm/issues. If you have questions about Terraform or the AzureRM provider, it's better to use the community forum where there are more people ready to help. The GitHub issues here are monitored only by a few core maintainers.

Thanks!

github-actions[bot] commented 2 years ago

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.