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

resource/aws_service_discovery_service: Support routing policy and update the type of dns record #3273

Merged
merged 4 commits into from
Feb 12, 2018

Conversation

atsushi-ishibashi
Copy link
Contributor

@atsushi-ishibashi atsushi-ishibashi commented Feb 7, 2018

Required: #3272
After merged, I'll remove the commit.

TF_ACC=1 go test ./aws -v -run=TestAccAwsServiceDiscoveryService_* -timeout 120m
=== RUN   TestAccAwsServiceDiscoveryService_private
--- PASS: TestAccAwsServiceDiscoveryService_private (115.73s)
=== RUN   TestAccAwsServiceDiscoveryService_public
--- PASS: TestAccAwsServiceDiscoveryService_public (83.12s)
=== RUN   TestAccAwsServiceDiscoveryService_import
--- PASS: TestAccAwsServiceDiscoveryService_import (66.99s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	265.892s

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. dependencies Used to indicate dependency changes. labels Feb 7, 2018
@radeksimko
Copy link
Member

Hi @atsushi-ishibashi
do you mind raising a separate PR for vendor updates?

Thanks.

@radeksimko
Copy link
Member

Ah, sorry it was raised in #3272 😅 - which was merged, in which case do you mind rebasing the PR? 😃

@radeksimko radeksimko added waiting-response Maintainers are waiting on response from community or contributor. enhancement Requests to existing resources that expand the functionality or scope. service/servicediscovery Issues and PRs that pertain to the servicediscovery service. labels Feb 7, 2018
@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. dependencies Used to indicate dependency changes. labels Feb 7, 2018
@atsushi-ishibashi
Copy link
Contributor Author

@radeksimko OK👍

@radeksimko radeksimko removed the waiting-response Maintainers are waiting on response from community or contributor. label Feb 8, 2018
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @atsushi-ishibashi

The old version of config should still work after upgrading the provider. We shouldn't be forcing the user to add the new field to their config - or that would be considered a breaking change.

We can avoid the breaking change by setting the field to MULTIVALUE during state migration. Do you think you could look into adding a state migration?

@@ -210,6 +214,7 @@ resource "aws_service_discovery_service" "test" {
ttl = 5
type = "A"
}
routing_policy = "WEIGHTED"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some funny indentation here 👀

Optional: true,
ForceNew: true,
ValidateFunc: validateStringIn("MULTIVALUE", "WEIGHTED"),
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the API defaults to MULTIVALUE shouldn't we also set it as Default here to avoid diffs when the field is not defined?

@radeksimko radeksimko added the waiting-response Maintainers are waiting on response from community or contributor. label Feb 8, 2018
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Feb 11, 2018
@atsushi-ishibashi
Copy link
Contributor Author

@radeksimko Ok👍

TF_ACC=1 go test ./aws -v -run=TestAwsServiceDiscoveryServiceMigrateState -timeout 120m
=== RUN   TestAwsServiceDiscoveryServiceMigrateState
2018/02/12 00:45:52 [INFO] Found AWS ServiceDiscovery Service State v0; migrating to v1
2018/02/12 00:45:52 [DEBUG] Attributes before migration: map[string]string{"dns_config.#":"1", "dns_config.0.namespace_id":"test-namespace", "dns_config.0.dns_records.#":"1", "dns_config.0.dns_records.0.ttl":"10", "dns_config.0.dns_records.0.type":"A", "arn":"arn", "name":"test-name"}
2018/02/12 00:45:52 [DEBUG] Attributes after migration: map[string]string{"dns_config.0.dns_records.0.type":"A", "arn":"arn", "dns_config.0.routing_policy":"MULTIVALUE", "name":"test-name", "dns_config.#":"1", "dns_config.0.namespace_id":"test-namespace", "dns_config.0.dns_records.#":"1", "dns_config.0.dns_records.0.ttl":"10"}
--- PASS: TestAwsServiceDiscoveryServiceMigrateState (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.032s

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Feb 12, 2018
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @atsushi-ishibashi
this LGTM, I just removed the new field from one test so we have some coverage in that area too. After all we shouldn't just assume everyone will use this field.

@radeksimko radeksimko merged commit 8745412 into hashicorp:master Feb 12, 2018
@bflad bflad added this to the v1.10.0 milestone Feb 27, 2018
@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/servicediscovery Issues and PRs that pertain to the servicediscovery service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants