microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
387 stars 279 forks source link

terraform-provider-azuredevops_v1.3.0 plugin crashed while deploying 'azuredevops_agent_queue' #1182

Closed jrai-199 closed 1 month ago

jrai-199 commented 1 month ago

Community Note

Terraform (and Azure DevOps Provider) Version

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

This is the module call
module "managed_devops_pool" {
  source                         = "../core_module"
  resource_group_name            = azurerm_resource_group.this.name
  location                       = azurerm_resource_group.this.location
  name                           = var.managed_devops_pool_name
  dev_center_project_resource_id = azurerm_dev_center_project.this.id
  subnet_id                      = data.azurerm_subnet.mdp_subnet.id
  organization_profile = {
    organizations = [{
      name     = var.azure_devops_organization_name
      projects = [data.azuredevops_project.this.name]
    }]
  }
  #enable_telemetry = var.enable_telemetry
  /* diagnostic_settings = {
    sendToLogAnalytics = {
      name                           = "sendToLogAnalytics"
      workspace_resource_id          = azurerm_log_analytics_workspace.this.id
      log_analytics_destination_type = "Dedicated"
    }
  } */
  tags = local.tags
  depends_on = [
    azapi_resource_action.resource_provider_registration,
    #data.virtual_network
  ]
}

# #Use this for existing Devops Project #
data "azuredevops_project" "this" {
  name = var.azuredevops_project_name
}
**resource "azuredevops_agent_queue" "this" {
  project_id      = data.azuredevops_project.this.id
  name            = module.managed_devops_pool.name
  depends_on      = [module.managed_devops_pool]
}**

resource "azuredevops_pipeline_authorization" "this" {
  project_id  = data.azuredevops_project.this.id
  resource_id = azuredevops_agent_queue.this.id
  type        = "queue"
}

resource "azurerm_resource_group" "this" {
  location = local.selected_region
  name     = var.azurerm_resource_group_name
}

output "managed_devops_pool_id" {
  value = module.managed_devops_pool.resource_id
}

output "managed_devops_pool_name" {
  value = module.managed_devops_pool.name
}

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform plan
  2. terraform apply

Important Factoids

References

jrai-199 commented 1 month ago

Duplicate of #1183