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

Error regarding host_tags while using datadog_integration_aws #504

Closed
miguelaferreira opened this issue May 4, 2020 · 0 comments · Fixed by #505
Closed

Error regarding host_tags while using datadog_integration_aws #504

miguelaferreira opened this issue May 4, 2020 · 0 comments · Fixed by #505

Comments

@miguelaferreira
Copy link
Contributor

miguelaferreira commented May 4, 2020

I'm running custom built binaries for this provider because I needed a feature introduced in PR #474. Since that PR is now merged I built new binaries based on latest master (at commit 0464c2e).

While setting up AWS integration I keep getting an error regarding host tags (which I do not even set).
This is the error from the DD api {"errors": ["'host_tags' should be array"]}.

Digging a bit deeper in the provider code and in the APIs being called, it seems that the DD api is quite robust. It accepts requests without host tags, as well as and empty array. It does produce this exact error if a string, for instance, is passed in host tags.

Terraform Version

Terraform v0.12.24
+ provider.datadog v2.7.99-master

Affected Resource(s)

  • datadog_integration_aws

Terraform Configuration Files

provider "datadog" {
  api_key = "..."
  app_key = "..."
  api_url = "https://api.datadoghq.eu/"
  version = "v2.7.99-master"   # 👈this is the version I chose for the binaries I built from master (at commit 0464c2e)
}

resource "datadog_integration_aws" "integration" {
  account_id = "123456789101"
  role_name  = "role"
}

Debug Output

https://gist.github.com/miguelaferreira/5658e9a79f0ccda4c2c00ad96d9b060b

Panic Output

No panic.

Expected Behavior

That the integration be set up just as it is with version v2.7.0 of the provider.

Actual Behavior

There is an error applying the configuration.

$  tf apply -auto-approve  
datadog_integration_aws.integration: Creating...

Error: error creating AWS integration: 400 Bad Request: {"errors": ["'host_tags' should be array"]}

  on main.tf line 8, in resource "datadog_integration_aws" "integration":
   8: resource "datadog_integration_aws" "integration" {

Steps to Reproduce

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

  1. terraform apply -auto-approve

Important Factoids

I'm running custom build (unreleased) binaries.
If I set host tags to an empty list host_tags = [] I still get the same error.
If I set host tags to a list with a single value host_tags = ["key:value"], then I get a similar error regarding filter tags:

 {"errors": ["'filter_tags' should be array"]}

References

None.

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