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

provider/datadog #9375: Refactor tags to a list instead of a map. #10570

Merged
merged 2 commits into from
Dec 7, 2016

Conversation

ojongerius
Copy link
Contributor

Tags are allowed to be but not restricted to, key value pairs (ie: foo:bar)
but are esssentially strings.

This changes allows using, and mixing of tags with form "foo" and "foo:bar". It also allows using duplicate keys like "foo:bar" and "foo:baz".

Addresses #9375

… map.

Tags are allowed to be but not restricted to, key value pairs (ie: foo:bar)
but are esssentially strings. This changes allows using, and mixing of tags with
form "foo" and "foo:bar". It also allows using duplicate keys like "foo:bar" and "foo:baz".
@stack72
Copy link
Contributor

stack72 commented Dec 7, 2016

Hey @ojongerius

Thanks for the work here - looks like the tests are broken I'm afraid

% make testacc TEST=./builtin/providers/datadog
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/07 11:24:29 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/datadog -v  -timeout 120m
=== RUN   TestDatadogMonitor_import
--- FAIL: TestDatadogMonitor_import (0.00s)
	testing.go:265: Step 0 error: Configuration is invalid.

		Warnings: []string(nil)

		Errors: []string{"datadog_monitor.foo: tags.0 must be a single value, not a map"}
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDatadogMonitor_Basic
--- PASS: TestAccDatadogMonitor_Basic (83.46s)
=== RUN   TestAccDatadogMonitor_BasicNoTreshold
--- FAIL: TestAccDatadogMonitor_BasicNoTreshold (0.00s)
	testing.go:265: Step 0 error: Configuration is invalid.

		Warnings: []string(nil)

		Errors: []string{"datadog_monitor.foo: tags.0 must be a single value, not a map"}

Paul

@ojongerius
Copy link
Contributor Author

That's what you get for only running specific tests. Sorry about that. Updating the test config in testAccCheckDatadogMonitorConfigImported makes acceptance pass for me:

▶ make testacc TEST=./builtin/providers/datadog
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/07 21:50:32 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/datadog -v  -timeout 120m
=== RUN   TestDatadogMonitor_import
--- PASS: TestDatadogMonitor_import (92.21s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDatadogMonitor_Basic
--- PASS: TestAccDatadogMonitor_Basic (87.26s)
=== RUN   TestAccDatadogMonitor_Updated
--- PASS: TestAccDatadogMonitor_Updated (69.21s)
=== RUN   TestAccDatadogMonitor_TrimWhitespace
--- PASS: TestAccDatadogMonitor_TrimWhitespace (69.36s)
=== RUN   TestAccDatadogMonitor_Basic_float_int
--- PASS: TestAccDatadogMonitor_Basic_float_int (74.80s)
=== RUN   TestAccDatadogTimeboard_update
--- PASS: TestAccDatadogTimeboard_update (80.98s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/datadog	473.846s

github.com/hashicorp/terraform  9375_fix_tags ✔

@stack72
Copy link
Contributor

stack72 commented Dec 7, 2016

You rock sir :) This LGTM!

@stack72 stack72 merged commit d06138d into hashicorp:master Dec 7, 2016
ojongerius added a commit to atlassian/terraform that referenced this pull request Dec 8, 2016
…dentials

* upstream/master: (79 commits)
  update CHANGELOG
  Update panicwrap to pass through all interrupt signals
  Gracefully stops on SIGTERM
  website: update website for conditionals
  vendor: update HIL with conditionals
  Keep a consistent provider order.
  Update CHANGELOG.md
  provider/aws: Forces the api gateway domain name certificates to recreate the resource (hashicorp#10588)
  Update CHANGELOG.md
  provider/aws: FIxed the api_gw_domain_name replace operation (hashicorp#10179)
  Fixed note formatting
  Explicitly say `count` is not supported by modules (hashicorp#10553)
  docs/aws: Fix the discrepencies of the emr_cluster documentation (hashicorp#10578)
  Update CHANGELOG.md
  Service role is not updated on AWS for a CodeDeploy deployment group (hashicorp#9866)
  Update CHANGELOG.md
  provider/datadog hashicorp#9375: Refactor tags to a list instead of a map. (hashicorp#10570)
  Update the Vagrantfile to resolve package update/installation issue. (hashicorp#9783)
  docs/aws: Add iam_server_certificate data source to nav bar (hashicorp#10576)
  Update CHANGELOG.md
  ...
@ojongerius ojongerius deleted the 9375_fix_tags branch December 12, 2016 01:34
pielu pushed a commit to pielu/terraform that referenced this pull request Dec 20, 2016
* aws/feature/r-instance-net-iface-id: (74 commits)
  - Properly exercise network_interface_id from AWS SDK - Update Terraform’s documentation
  Update CHANGELOG.md
  provider/aws: Forces the api gateway domain name certificates to recreate the resource (hashicorp#10588)
  Update CHANGELOG.md
  provider/aws: FIxed the api_gw_domain_name replace operation (hashicorp#10179)
  Fixed note formatting
  Explicitly say `count` is not supported by modules (hashicorp#10553)
  docs/aws: Fix the discrepencies of the emr_cluster documentation (hashicorp#10578)
  Update CHANGELOG.md
  Service role is not updated on AWS for a CodeDeploy deployment group (hashicorp#9866)
  Update CHANGELOG.md
  provider/datadog hashicorp#9375: Refactor tags to a list instead of a map. (hashicorp#10570)
  Update the Vagrantfile to resolve package update/installation issue. (hashicorp#9783)
  docs/aws: Add iam_server_certificate data source to nav bar (hashicorp#10576)
  Update CHANGELOG.md
  feat/aws: add iam_server_certificate data source (hashicorp#10558)
  provider/azurerm: arm_virtual_machine panic fix
  Update .travis.yml
  provider/aws: Improved the documentation for EMR Cluster (hashicorp#10563)
  provider/azurerm: Do not pass an empty string of license_type to AMR VMs (hashicorp#10564)
  ...

# Conflicts:
#	builtin/providers/aws/resource_aws_instance.go
@ghost
Copy link

ghost commented Apr 18, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants