-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add support for min_cpu_platform in google_compute_instance. #349
Conversation
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.
Wouldn't it also make sense to add cpu_platform
as a computed attribute?
func testAccCheckComputeInstanceHasMinCpuPlatform(instance *computeBeta.Instance, minCpuPlatform string) resource.TestCheckFunc { | ||
return func(s *terraform.State) error { | ||
if instance.MinCpuPlatform != minCpuPlatform { | ||
return fmt.Errorf("Wrong minimum CPU platform: expected %d, got %d", minCpuPlatform, instance.MinCpuPlatform) |
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.
Go vet caught an error here about using %d
instead of %s
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.
@selmanj It would not make sense to have min_cpu_platform
computed because the value returned by the API when not specified is an empty string.
I meant expose |
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.
Nice. I did not realize the cpu_platform
field existed. Added!
Just for interest, where did you find Edit - found it
|
I'm trying to create a managed instance group on GCE - I can't see any way to specify the min_cpu_platform on there however, either through the Am I missing something, or does this need updating on the resource type? 😄 |
) <!-- This change is generated by MagicModules. --> /cc @naseemkullah
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. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Fixes #106