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

providers/aws: Check error from resourceAwsRoute53RecordBuildSet and return err if set #8399

Merged
merged 2 commits into from
Aug 23, 2016

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Aug 22, 2016

This should address the possible panic reported in #8393. I have not been able to reproduce firsthand, I see the possibilities.

@stack72
Copy link
Contributor

stack72 commented Aug 23, 2016

LGTM!

@@ -270,6 +270,9 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er
zone, *rec.Name, req)

respRaw, err := changeRoute53RecordSet(conn, req)
if err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to wrap this in something explaining the provenance of the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, are you thinking a simple return fmt.Errorf("[ERR]: Error building changeset: %s", err) or something involving errwrap?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking:

return errwrap.Wrapf("[ERR]: Error building changeset: {{err}}", err)

@catsby
Copy link
Contributor Author

catsby commented Aug 23, 2016

Tests pass, merging

TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRoute53Record_ -timeout 120m
=== RUN   TestAccAWSRoute53Record_basic
--- PASS: TestAccAWSRoute53Record_basic (71.72s)
=== RUN   TestAccAWSRoute53Record_basic_fqdn
--- PASS: TestAccAWSRoute53Record_basic_fqdn (83.20s)
=== RUN   TestAccAWSRoute53Record_txtSupport
--- PASS: TestAccAWSRoute53Record_txtSupport (76.09s)
=== RUN   TestAccAWSRoute53Record_spfSupport
--- PASS: TestAccAWSRoute53Record_spfSupport (72.56s)
=== RUN   TestAccAWSRoute53Record_generatesSuffix
--- PASS: TestAccAWSRoute53Record_generatesSuffix (73.16s)
=== RUN   TestAccAWSRoute53Record_wildcard
--- PASS: TestAccAWSRoute53Record_wildcard (113.09s)
=== RUN   TestAccAWSRoute53Record_failover
--- PASS: TestAccAWSRoute53Record_failover (81.05s)
=== RUN   TestAccAWSRoute53Record_weighted_basic
--- PASS: TestAccAWSRoute53Record_weighted_basic (77.96s)
=== RUN   TestAccAWSRoute53Record_alias
--- PASS: TestAccAWSRoute53Record_alias (81.71s)
=== RUN   TestAccAWSRoute53Record_s3_alias
--- PASS: TestAccAWSRoute53Record_s3_alias (80.10s)
=== RUN   TestAccAWSRoute53Record_weighted_alias
--- PASS: TestAccAWSRoute53Record_weighted_alias (149.99s)
=== RUN   TestAccAWSRoute53Record_geolocation_basic
--- PASS: TestAccAWSRoute53Record_geolocation_basic (81.93s)
=== RUN   TestAccAWSRoute53Record_latency_basic
--- PASS: TestAccAWSRoute53Record_latency_basic (77.73s)
=== RUN   TestAccAWSRoute53Record_TypeChange
--- PASS: TestAccAWSRoute53Record_TypeChange (112.47s)
=== RUN   TestAccAWSRoute53Record_empty
--- PASS: TestAccAWSRoute53Record_empty (73.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    1306.194s
Test:

@catsby catsby merged commit a86f0a8 into master Aug 23, 2016
@catsby catsby deleted the b-aws-r53-recordset-error branch August 23, 2016 17:25
c4milo added a commit to hooklift/terraform that referenced this pull request Aug 23, 2016
* master: (100 commits)
  Update CHANGELOG.md
  providers/aws: Check error from resourceAwsRoute53RecordBuildSet and return err if set (hashicorp#8399)
  Update CHANGELOG.md
  provider/aws: Add support for ECS svc - LB target group (hashicorp#8190)
  Added example of how the Option settings works (hashicorp#8413)
  Update CHANGELOG.md
  Update CHANGELOG.md
  Update CHANGELOG.md
  provider/aws: Add support for `network_mode` to `aws_ecs_task_definition` (hashicorp#8391)
  Update CHANGELOG.md
  Update CHANGELOG.md
  provider/aws: Add Primary Endpoint Address output for (hashicorp#8385)
  Update CHANGELOG.md
  provider/aws: `aws_elasticache_replication_group_id` validation change (hashicorp#8381)
  provider/google: Remove redundant type declaration
  provider/google: Hook in state migration function
  provider/openstack: docs and tests for allowed_address_pairs
  Update CHANGELOG.md
  website: Docs for AWS API Gateway domain name and base path mapping
  provider/aws: aws_api_gateway_base_path_mapping resource implementation
  ...
@ghost
Copy link

ghost commented Apr 23, 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 23, 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.

3 participants