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

Convert int to int64 when building the cluster.NodeConfig struct #2978

Merged
merged 1 commit into from
Aug 20, 2015

Conversation

djworth
Copy link

@djworth djworth commented Aug 12, 2015

related to issue #2901

@apparentlymart
Copy link
Contributor

👍 looks plausible to me. There's a similar thing going on in the AWS EBS code where the disk sizes are set.

I eagerly await the day when someone wants to create a 4.3 exabyte disk and Terraform fails to represent it correctly due to its use of a paltry 32-bit integer. 😀

@radeksimko
Copy link
Member

@djworth Thanks for noticing and sending the PR! Would you mind attaching a test or modify an existing test, so it's covering this bug?

@apparentlymart I didn't know about EBS, but I know there's the same bug in google_compute_instance_template, which the linked issue is actually mentioning.

@djworth
Copy link
Author

djworth commented Aug 18, 2015

@radeksimko Sure thing!

@sparkprime
Copy link
Contributor

I fixed the other one, I'll leave this one to you lot :)

@radeksimko
Copy link
Member

@apparentlymart Can you explain further what the problem is with EBS volumes? I just checked that resource and all int64 attributes seem to be ok - in fact since that EBS support has been implemented, it was correct:

if value, ok := d.GetOk("iops"); ok {
request.IOPS = aws.Long(int64(value.(int)))
}
if value, ok := d.GetOk("kms_key_id"); ok {
request.KMSKeyID = aws.String(value.(string))
}
if value, ok := d.GetOk("size"); ok {
request.Size = aws.Long(int64(value.(int)))
}

@apparentlymart
Copy link
Contributor

@radeksimko sorry I wasn't meaning to say that there is an issue there now, but more that the issue had existed historically and we did the same workaround. So my comment was more "this seems like a reasonable solution because it's how we already solved EBS volumes", not "this also needs to be done for EBS volumes". I apologize for not being clearer.

@radeksimko
Copy link
Member

Merging, I will add the test in a separate commit.
Thanks again @djworth

radeksimko added a commit that referenced this pull request Aug 20, 2015
Convert int to int64 when building the cluster.NodeConfig struct
@radeksimko radeksimko merged commit f27f64e into hashicorp:master Aug 20, 2015
radeksimko added a commit that referenced this pull request Aug 20, 2015
@radeksimko
Copy link
Member

Done in 53499a9

@ghost
Copy link

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

4 participants