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

Resource azurerm_datadog_monitor_sso_configuration can't be used with certain enterprise_application_id values #25904

Open
1 task done
clowa opened this issue May 8, 2024 · 1 comment

Comments

@clowa
Copy link
Contributor

clowa commented May 8, 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.102.0

Affected Resource(s)/Data Source(s)

azurerm_datadog_monitor_sso_configuration

Terraform Configuration Files

terraform {
  required_version = "=1.8.3"

  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=3.102.0"
    }
  }
}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "datadog" {
  name     = "datadog-rg"
  location = "West US 2"
}

resource "azurerm_datadog_monitor" "datadog" {
  name                = "datadog-org"
  resource_group_name = azurerm_resource_group.datadog.name
  location            = azurerm_resource_group.datadog.location

  datadog_organization {
    api_key         = "XXXX"
    application_key = "XXXX"
  }

  user {
    name  = "datadog"
    email = "abc@xyz.com"
  }

  sku_name = "Linked"

  identity {
    type = "SystemAssigned"
  }
}

resource "azurerm_datadog_monitor_sso_configuration" "datadog" {
  datadog_monitor_id        = azurerm_datadog_monitor.datadog.id
  single_sign_on_enabled    = "Enable"
  enterprise_application_id = "15d6001c-80a6-471e-8e7a-1fa975336b2a"
}

Debug Output/Panic Output

╷
│ Error: expected value of enterprise_application_id not match regular expression, got 15d6001c-80a6-471e-8e7a-1fa975336b2a
│ 
│   with azurerm_datadog_monitor_sso_configuration.datadog,
│   on datadog.tf line 54, in resource "azurerm_datadog_monitor_sso_configuration" "datadog":
│   54:   enterprise_application_id = "15d6001c-80a6-471e-8e7a-1fa975336b2a"
│ 
╵
2024-05-08T12:37:24.554Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-08T12:37:24.570Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/azurerm/3.102.0/linux_arm64/terraform-provider-azurerm_v3.102.0_x5 pid=20279
2024-05-08T12:37:24.570Z [DEBUG] provider: plugin exited

Expected Behaviour

The resource should accept the value of a Entra ID Enterprise application Application ID field, containing a GUID.

Actual Behaviour

The provider validates the value with the regex [0-9-]$ wich doesn't allow letters as used by hex numbers.

For some reason I can't find out yet the provider accepts 3fa85f64-5717-4562-b3fc-2c963f66afa6, which is just another example Application ID I tried.

Steps to Reproduce

  1. Run terraform plan with the example code provided.

Important Factoids

no

References

No response

@clowa
Copy link
Contributor Author

clowa commented May 8, 2024

Just some more information:
Without special knowledge about the datadog background, the ARM API looks like there are no restrictions on the value of enterprise_application_id.

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

No branches or pull requests

1 participant