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/aws: Add aws route53 health checks #1984

Closed

Conversation

nicgrayson
Copy link

This PR adds a resource for route53 health checks.

func resourceAwsRoute53HealthCheckCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).r53conn

// do we need to check if the optional fields existf before adding them?
Copy link
Contributor

Choose a reason for hiding this comment

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

Typically, yes.
For instance, if you do not check with d.GetOk, I believe d.Get will give you an empty string for string values not found/required. You'll then pass that on to the API as a string pointer with value "", and the API will complain that isn't a valid value.

@nicgrayson
Copy link
Author

@catsby Those 2 comments should be cleared up now

healthConfig.ResourcePath = aws.String(v.(string))
}

wait := resource.StateChangeConf{
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't have a refresh func attached to it anymore, do this do anything?

@catsby
Copy link
Contributor

catsby commented May 18, 2015

I'm getting a panic when running either of the supplied tests, looks like some more work is needed here:

2015/05/18 13:40:49 [DEBUG] apply: aws_route53_health_check.foo: executing Apply
2015/05/18 13:40:49 [DEBUG] Waiting for state to become: accepted
2015/05/18 13:40:49 [TRACE] Waiting 1s before next try
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x36cf91]

goroutine 39 [running]:
github.com/hashicorp/terraform/helper/resource.func·001()

Optional: true,
Set: schema.HashString,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for this change? schema.HashString is a newer thing, shortcut for the Set: func you have above. Is this from a bad merge/rebase maybe?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

So why are we changing it back to func in this pull request?

Copy link
Author

Choose a reason for hiding this comment

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

You are right. Fixed.

@nicgrayson
Copy link
Author

@catsby I've fixed up the create to remove the wait altogether. You were right, we didn't need that for this call.

@nicgrayson
Copy link
Author

I would love to see this merged. Let me know if anything needs to be done for that to happen.

@knuckolls
Copy link
Contributor

We're using this internally on a fork of terraform. Would love to see it merged or additional feedback if needed.

@knuckolls
Copy link
Contributor

Should we close this in favor of #2226? @nicgrayson @rubbish

@catsby
Copy link
Contributor

catsby commented Jun 5, 2015

#2226 seems to omit @nicgrayson from the contributors, if he's OK with that then I think we should move forward with it

@nicgrayson
Copy link
Author

@catsby That is fine, I just want it merged 😄

@radeksimko
Copy link
Member

Closing in favor of #2226

@radeksimko radeksimko closed this Jun 10, 2015
@ghost
Copy link

ghost commented May 2, 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 May 2, 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.

5 participants