-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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/aws: Add support for reference_name to aws_route53_health_check #9737
Conversation
0cc0dab
to
ebf3247
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (minor nit you don't need to change)
if v, ok := d.GetOk("reference_name"); ok { | ||
callerRef = strings.Join([]string{ | ||
v.(string), "-", callerRef, | ||
}, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: callerRef = fmt.Sprintf("%s-%s", v.(string), callerRef)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are correct - this is better :)
Fixes #8679 The CallerReference attribute we passed to AWS in route53_health_checks was `time.Now().Format(time.RFC3339Nano)` When creating multiple resources with the Count meta-parameter, this was causing issues as follows: ``` * aws_route53_health_check.healthstate.0: HealthCheckAlreadyExists: A different health check has already been created with the specified caller reference. ``` We have now exposed a new attribute called `reference_name` that can be set to pass multiple resources to the request ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRoute53HealthCheck_' 130 ↵ ✹ ==> Cecking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/10/31 10:41:07 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRoute53HealthCheck_ -timeout 120m === RUN TestAccAWSRoute53HealthCheck_importBasic --- PASS: TestAccAWSRoute53HealthCheck_importBasic (17.08s) === RUN TestAccAWSRoute53HealthCheck_basic --- PASS: TestAccAWSRoute53HealthCheck_basic (28.17s) === RUN TestAccAWSRoute53HealthCheck_withSearchString --- PASS: TestAccAWSRoute53HealthCheck_withSearchString (28.07s) === RUN TestAccAWSRoute53HealthCheck_withChildHealthChecks --- PASS: TestAccAWSRoute53HealthCheck_withChildHealthChecks (20.71s) === RUN TestAccAWSRoute53HealthCheck_IpConfig --- PASS: TestAccAWSRoute53HealthCheck_IpConfig (16.09s) === RUN TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck --- PASS: TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck (22.42s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 132.568s ```
ebf3247
to
e7c682d
Compare
…eck (hashicorp#9737) Fixes hashicorp#8679 The CallerReference attribute we passed to AWS in route53_health_checks was `time.Now().Format(time.RFC3339Nano)` When creating multiple resources with the Count meta-parameter, this was causing issues as follows: ``` * aws_route53_health_check.healthstate.0: HealthCheckAlreadyExists: A different health check has already been created with the specified caller reference. ``` We have now exposed a new attribute called `reference_name` that can be set to pass multiple resources to the request ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRoute53HealthCheck_' 130 ↵ ✹ ==> Cecking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/10/31 10:41:07 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRoute53HealthCheck_ -timeout 120m === RUN TestAccAWSRoute53HealthCheck_importBasic --- PASS: TestAccAWSRoute53HealthCheck_importBasic (17.08s) === RUN TestAccAWSRoute53HealthCheck_basic --- PASS: TestAccAWSRoute53HealthCheck_basic (28.17s) === RUN TestAccAWSRoute53HealthCheck_withSearchString --- PASS: TestAccAWSRoute53HealthCheck_withSearchString (28.07s) === RUN TestAccAWSRoute53HealthCheck_withChildHealthChecks --- PASS: TestAccAWSRoute53HealthCheck_withChildHealthChecks (20.71s) === RUN TestAccAWSRoute53HealthCheck_IpConfig --- PASS: TestAccAWSRoute53HealthCheck_IpConfig (16.09s) === RUN TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck --- PASS: TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck (22.42s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 132.568s ```
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. |
Fixes #8679