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_container_app_environment_custom_domain could not be created #26007

Closed
1 task done
tomas-blanarik opened this issue May 17, 2024 · 1 comment · Fixed by #26074
Closed
1 task done

azurerm_container_app_environment_custom_domain could not be created #26007

tomas-blanarik opened this issue May 17, 2024 · 1 comment · Fixed by #26074

Comments

@tomas-blanarik
Copy link

tomas-blanarik commented May 17, 2024

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 and review the contribution guide to help.

Terraform Version

1.8.3

AzureRM Provider Version

3.103.1

Affected Resource(s)/Data Source(s)

azurerm_container_app_environment_custom_domain

Terraform Configuration Files

resource "azurerm_container_app_environment" "azure_ca_environment" {
  name                                        = "cae-${module.label_unit_admin.id}"
  location                                    = var.location
  resource_group_name                         = azurerm_resource_group.this.name
  log_analytics_workspace_id                  = data.azurerm_log_analytics_workspace.shared.id
  infrastructure_subnet_id                    = data.azurerm_subnet.unit_admin.id
  infrastructure_resource_group_name          = "rg-${module.label_unit_admin.namespace}-${var.stage}-infra-vid"
  internal_load_balancer_enabled              = true
  dapr_application_insights_connection_string = azurerm_application_insights.dapr.connection_string

  workload_profile {
    name                  = local.is_prod_tier ? "MyProfile" : "Consumption"
    workload_profile_type = var.container_app_environment_workload_profile_type
    minimum_count         = var.container_app_environment_minimum_count
    maximum_count         = var.container_app_environment_maximum_count
  }

  timeouts {
    create = "40m"
    delete = "30m"
  }

  tags = module.label_unit_admin.tags

  lifecycle {
    ignore_changes = [
      infrastructure_subnet_id,
      workload_profile
    ]
  }
}

resource "azurerm_container_app_environment_custom_domain" "azure_ca_environment_custom_domain" {
  container_app_environment_id = azurerm_container_app_environment.azure_ca_environment.id
  certificate_blob_base64      = data.azurerm_key_vault_certificate.vipsenvs_shared.certificate_data_base64
  certificate_password         = var.certificate_password
  dns_suffix                   = "(ommitted)"
}

Debug Output/Panic Output

Error: retrieving Log Analytics Workspace: parsing ID or /subscriptions/(ommitted)/resourcegroups/(ommitted)/providers/microsoft.operationalinsights/workspaces/log-vips-dev-shared-vid: parsing "/subscriptions/(ommitted)/resourcegroups/(ommitted)/providers/microsoft.operationalinsights/workspaces/log-vips-dev-shared-vid": parsing segment "staticResourceGroups": parsing the Workspace ID: the segment at position 2 didn't match

Expected a Workspace ID that matched:

> /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.OperationalInsights/workspaces/workspaceValue

However this value was provided:

> /subscriptions/(ommitted)/resourcegroups/(ommitted)/providers/microsoft.operationalinsights/workspaces/log-vips-dev-shared-vid

The parsed Resource ID was missing a value for the segment at position 2
(which should be the literal value "resourceGroups").



  with azurerm_container_app_environment_custom_domain.azure_ca_environment_custom_domain,
  on container_app_environment.tf line 36, in resource "azurerm_container_app_environment_custom_domain" "azure_ca_environment_custom_domain":
  36: resource "azurerm_container_app_environment_custom_domain" "azure_ca_environment_custom_domain" {

Expected Behaviour

Custom DNS suffix resource is created.

Actual Behaviour

Cannot create custom DNS suffix

Steps to Reproduce

terraform apply

Note: I ommitted some values with '(ommitted)' due to security reasons.

Important Factoids

No response

References

No response

Copy link

This functionality has been released in v3.105.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

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