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

Incorrect state of the Azure integration #1242

Closed
muellermatthias opened this issue Oct 20, 2021 · 0 comments · Fixed by #1255
Closed

Incorrect state of the Azure integration #1242

muellermatthias opened this issue Oct 20, 2021 · 0 comments · Fixed by #1255

Comments

@muellermatthias
Copy link

Terraform Version

I tested it with my local version and the latest Terraform version. The issue happens in both cases.

Affected Resource(s)

  • datadog_integration_azure

Terraform Configuration Files

provider "datadog" {
  api_key = "..."
  app_key = "..."
  api_url = "https://....datadoghq.eu"
}

terraform {
  required_providers {
    datadog = {
      source = "DataDog/datadog"
    }
  }
}

resource "datadog_integration_azure" "sandbox" {
  tenant_name   = "..."
  client_id     = "..."
  client_secret = "..."
}

Expected Behavior

After applying the code, further applys should show no changes.

Actual Behavior

The integration is created successfully, but running apply again shows a change for the client ID:

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # datadog_integration_azure.sandbox will be updated in-place
  ~ resource "datadog_integration_azure" "sandbox" {
      ~ client_id     = "bf12bf6f-ccce-45b0-b758-4aca3bac75cb" -> "3c140301-8e74-4313-810e-868ea45eb9c2"
        id            = "...:..."
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

The new ID is the correct one and the old/current ID is from another Azure integration.
Running the apply will make no changes.

I had a look at the state file and it's incorrect there.
Seems like the error happens, when the provider writes the state.

The host filters are also incorrect.

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

Successfully merging a pull request may close this issue.

1 participant