DataDog / terraform-provider-datadog

Terraform Datadog provider
https://www.terraform.io/docs/providers/datadog/
Mozilla Public License 2.0
403 stars 380 forks source link

unable to import datadog_integration_azure #2663

Open dhduvall opened 1 week ago

dhduvall commented 1 week ago

Datadog Terraform Provider Version

v3.47.0

Terraform Version

tofu 1.8.5

What resources or data sources are affected?

datadog_integration_azure

Terraform Configuration Files

terraform {
    required_providers {
      datadog = {
        source  = "DataDog/datadog"
        version = "~> 3.47.0"
      }
    }

    required_version = ">= 1.1.0"
  }

  provider "datadog" {
    api_key = var.datadog_api_key
    app_key = var.datadog_app_key
  }

  variable "datadog_api_key" {
    type = string
  }

  variable "datadog_app_key" {
    type = string
  }

  resource "datadog_integration_azure" "testing" {
    tenant_name = "tenant-uuid"
    client_id = "client-app-uuid"
    client_secret = "mumble"
  }

Relevant debug or panic output

https://gist.github.com/dhduvall/4bdd469d9a9d8824550a479a35891282

Expected Behavior

The integration resource should have been imported into the state.

Actual Behavior

Error complaining about a non-existent object, despite the JSON representing the object having just been returned from the DataDog API.

Steps to Reproduce

Make sure you have an Azure integration, and all the variables populated

TF_LOG=TRACE tofu import -no-color -var datadog_app_key=$DD_APP_KEY -var datadog_api_key=$DD_API_KEY \
  datadog_integration_azure.testing tenant-uuid:client-app-uuid

Important Factoids

No response

References

No response