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

datadog_monitor - Removal of 'tags' from resource has no effect #43

Closed
MattHodge opened this issue Dec 29, 2017 · 1 comment
Closed

Comments

@MattHodge
Copy link
Contributor

Terraform Version

  • Terraform v0.11.1
  • provider.datadog v1.0.2

Affected Resource(s)

  • datadog_monitor

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "datadog_monitor" "foo" {
  name = "..."
  type = "metric alert"
  ...

  # The significant bit.
  tags = [ "foo:bar"]
}

Then remove the tags block:

resource "datadog_monitor" "foo" {
  name = "..."
  type = "metric alert"
  ...
}

Expected Behavior

  • Terraform removes the monitors tags.

Actual Behavior

Terraform says it is removing the tag, but it doesn't happen:

datadog_monitor.foo: Modifying... (ID: 3734291)
  tags.#: "1" => "0"
  tags.0: "foo:bar" => ""
datadog_monitor.foo: Modifications complete after 1s (ID: 3734291)

Re-run terraform plan and it still detects the tag:

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ datadog_monitor.script_runtime
      tags.#: "1" => "0"
      tags.0: "foo:bar" => ""


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

Subsequent terraform plan invocations show the resources as out-of-sync, and subsequent terraform apply invocations end in the same result.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a new Datadog monitor using Terraform with a tag.
  2. Remove the tag and do an apply, which will not remove the tag.
@masci
Copy link
Contributor

masci commented Jul 6, 2018

Fixed in #70

@masci masci closed this as completed Jul 6, 2018
nitrocode pushed a commit to nitrocode/terraform-provider-datadog that referenced this issue Nov 3, 2018
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

No branches or pull requests

2 participants