-
Notifications
You must be signed in to change notification settings - Fork 1.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
add gVNIC support for compute instance #4443
add gVNIC support for compute instance #4443
Conversation
Hello! I am a robot who works on Magic Modules PRs. I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. Thanks for your contribution! A human will be with you soon. @slevenick, please review this PR or find an appropriate assignee. |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=169817" |
75e11f8
to
87c0b24
Compare
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=169925" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=170343" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleComputeInstanceGroup_fromIGM|TestAccInstanceTemplateDatasource_name|TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccComputeAutoscaler_autoscalerBasicExample|TestAccComputeAutoscaler_autoscalerSingleInstanceExample|TestAccComputeAutoscaler_update|TestAccComputeAutoscaler_multicondition|TestAccComputeAutoscaler_scaleDownControl|TestAccComputeAutoscaler_scalingSchedule|TestAccComputeAutoscaler_scaleInControlFixed|TestAccComputeAutoscaler_scaleInControl|TestAccComputeBackendService_withBackend|TestAccComputeBackendService_withBackendAndMaxUtilization|TestAccComputeBackendService_withBackendAndIAP|TestAccComputeBackendService_withMaxConnections|TestAccComputeBackendService_withMaxConnectionsPerInstance|TestAccComputeBackendService_internalLoadBalancing|TestAccComputeForwardingRule_forwardingRuleHttpLbExample|TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccComputeInstanceFromTemplate_basic|TestAccComputeInstanceFromTemplate_overrideBootDisk|TestAccComputeInstanceFromTemplate_overrideAttachedDisk|TestAccComputeInstanceFromTemplate_overrideScratchDisk|TestAccComputeInstanceFromTemplate_overrideScheduling|TestAccComputeInstanceFromTemplate_overrideMetadataDotStartupScript|TestAccComputeInstanceFromTemplate_012_removableFields|TestAccInstanceGroupManager_basic|TestAccInstanceGroupManager_versions|TestAccInstanceGroupManager_targetSizeZero|TestAccInstanceGroupManager_update|TestAccInstanceGroupManager_autoHealingPolicies|TestAccInstanceGroupManager_stateful|TestAccComputeInstanceTemplate_imageShorthand|TestAccComputeInstanceTemplate_preemptible|TestAccComputeInstanceTemplate_networkTier|TestAccComputeInstanceTemplate_IP|TestAccComputeInstanceTemplate_basic|TestAccComputeInstanceTemplate_networkIP|TestAccComputeInstanceTemplate_networkIPAddress|TestAccComputeInstanceTemplate_disks|TestAccComputeInstanceTemplate_regionDisks|TestAccComputeInstanceTemplate_subnet_auto|TestAccComputeInstanceTemplate_primaryAliasIpRange|TestAccComputeInstanceTemplate_subnet_custom|TestAccComputeInstanceTemplate_secondaryAliasIpRange|TestAccComputeInstanceTemplate_metadata_startup_script|TestAccComputeInstanceTemplate_guestAccelerator|TestAccComputeInstanceTemplate_guestAcceleratorSkip|TestAccComputeInstanceTemplate_minCpuPlatform|TestAccComputeInstanceTemplate_soleTenantNodeAffinities|TestAccComputeInstanceTemplate_shieldedVmConfig1|TestAccComputeInstanceTemplate_EncryptKMS|TestAccComputeInstanceTemplate_ConfidentialInstanceConfigMain|TestAccComputeInstanceTemplate_shieldedVmConfig2|TestAccComputeInstanceTemplate_enableDisplay|TestAccComputeInstanceTemplate_withScratchDisk|TestAccComputeInstance_nictype_update|TestAccComputePerInstanceConfig_update|TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample|TestAccComputeRegionAutoscaler_update|TestAccComputeRegionAutoscaler_scaleDownControl|TestAccComputeRegionAutoscaler_scalingSchedule|TestAccComputeRegionAutoscaler_scaleInControl|TestAccComputeRegionBackendService_regionBackendServiceBalancingModeExample|TestAccComputeRegionBackendService_withBackendMultiNic|TestAccComputeRegionBackendService_withBackendInternal|TestAccComputeRegionBackendService_withBackendInternalManaged|TestAccRegionInstanceGroupManager_basic|TestAccRegionInstanceGroupManager_update|TestAccRegionInstanceGroupManager_targetSizeZero|TestAccRegionInstanceGroupManager_versions|TestAccRegionInstanceGroupManager_autoHealingPolicies|TestAccRegionInstanceGroupManager_distributionPolicy|TestAccRegionInstanceGroupManager_stateful|TestAccComputeRegionPerInstanceConfig_update|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCmekExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=170344" |
87c0b24
to
3ccb597
Compare
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=170352" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleComputeInstanceGroup_fromIGM|TestAccInstanceTemplateDatasource_name|TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccComputeAutoscaler_autoscalerSingleInstanceExample|TestAccComputeAutoscaler_update|TestAccComputeAutoscaler_autoscalerBasicExample|TestAccComputeAutoscaler_multicondition|TestAccComputeAutoscaler_scaleDownControl|TestAccComputeAutoscaler_scaleInControl|TestAccComputeAutoscaler_scaleInControlFixed|TestAccComputeAutoscaler_scalingSchedule|TestAccComputeBackendService_withBackend|TestAccComputeBackendService_withBackendAndMaxUtilization|TestAccComputeBackendService_withBackendAndIAP|TestAccComputeBackendService_withMaxConnections|TestAccComputeBackendService_withMaxConnectionsPerInstance|TestAccComputeBackendService_internalLoadBalancing|TestAccComputeForwardingRule_forwardingRuleHttpLbExample|TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccComputeInstanceFromTemplate_basic|TestAccComputeInstanceFromTemplate_overrideBootDisk|TestAccComputeInstanceFromTemplate_overrideAttachedDisk|TestAccComputeInstanceFromTemplate_overrideScratchDisk|TestAccComputeInstanceFromTemplate_overrideScheduling|TestAccComputeInstanceFromTemplate_012_removableFields|TestAccComputeInstanceFromTemplate_overrideMetadataDotStartupScript|TestAccInstanceGroupManager_update|TestAccInstanceGroupManager_targetSizeZero|TestAccInstanceGroupManager_basic|TestAccInstanceGroupManager_autoHealingPolicies|TestAccInstanceGroupManager_stateful|TestAccInstanceGroupManager_versions|TestAccComputeInstanceTemplate_basic|TestAccComputeInstanceTemplate_imageShorthand|TestAccComputeInstanceTemplate_preemptible|TestAccComputeInstanceTemplate_networkTier|TestAccComputeInstanceTemplate_IP|TestAccComputeInstanceTemplate_networkIPAddress|TestAccComputeInstanceTemplate_disks|TestAccComputeInstanceTemplate_networkIP|TestAccComputeInstanceTemplate_regionDisks|TestAccComputeInstanceTemplate_subnet_custom|TestAccComputeInstanceTemplate_subnet_auto|TestAccComputeInstanceTemplate_metadata_startup_script|TestAccComputeInstanceTemplate_primaryAliasIpRange|TestAccComputeInstanceTemplate_secondaryAliasIpRange|TestAccComputeInstanceTemplate_guestAccelerator|TestAccComputeInstanceTemplate_guestAcceleratorSkip|TestAccComputeInstanceTemplate_minCpuPlatform|TestAccComputeInstanceTemplate_soleTenantNodeAffinities|TestAccComputeInstanceTemplate_shieldedVmConfig2|TestAccComputeInstanceTemplate_EncryptKMS|TestAccComputeInstanceTemplate_shieldedVmConfig1|TestAccComputeInstanceTemplate_ConfidentialInstanceConfigMain|TestAccComputeInstanceTemplate_enableDisplay|TestAccComputeInstanceTemplate_withScratchDisk|TestAccComputePerInstanceConfig_update|TestAccComputeRegionAutoscaler_update|TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample|TestAccComputeRegionAutoscaler_scaleDownControl|TestAccComputeRegionAutoscaler_scalingSchedule|TestAccComputeRegionAutoscaler_scaleInControl|TestAccComputeRegionBackendService_regionBackendServiceBalancingModeExample|TestAccComputeRegionBackendService_withBackendInternal|TestAccComputeRegionBackendService_withBackendMultiNic|TestAccComputeRegionBackendService_withBackendInternalManaged|TestAccRegionInstanceGroupManager_targetSizeZero|TestAccRegionInstanceGroupManager_basic|TestAccRegionInstanceGroupManager_update|TestAccRegionInstanceGroupManager_autoHealingPolicies|TestAccRegionInstanceGroupManager_distributionPolicy|TestAccRegionInstanceGroupManager_stateful|TestAccRegionInstanceGroupManager_versions|TestAccComputeRegionPerInstanceConfig_update|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCmekExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=170445" |
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.
Seeing lots of failures on:
panic: interface conversion: interface {} is nil, not string
goroutine 258 [running]:
github.com/hashicorp/terraform-provider-google-beta/v3/google-beta.expandNetworkInterfaces(0x3bbcb40, 0xc001049500, 0xc000753800, 0x0, 0x0, 0x0, 0x0, 0x0)
/terraform-provider-google-beta/google-beta/compute_instance_helpers.go:253 +0xc82
mmv1/third_party/terraform/utils/compute_instance_helpers.go.erb
Outdated
Show resolved
Hide resolved
3ccb597
to
8239e58
Compare
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171308" |
mmv1/third_party/terraform/utils/compute_instance_helpers.go.erb
Outdated
Show resolved
Hide resolved
Is this feature GA? It looks to be beta based on the docs page: https://cloud.google.com/compute/docs/instances/create-vm-with-gvnic We will probably need to put this behind version tags, similar to |
8239e58
to
397cb54
Compare
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171476" |
397cb54
to
f71a093
Compare
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171484" |
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.
Looks good!
Only note would be to mark the field as Beta only in the documentation
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171619" |
Quick note- I beleive the feature is now GA, as the addition of the instance field was an API change going from beta -> GA. Edward, if you have the time can you see if it works when we un-beta-guard all the gvnic stuff? |
* add gVNIC support for compute instance * add google_compute_instance_template & fix a panic * Using a func to replace inline code * add ga filter * add beta in documents
Hi @edwardmedia , I might need to pick up your brain on the downstream module used by terraform-validator. It seems there is a conversion error caused by
Do you have any suggestion on how to fix it? Thanks. CB Build Log: https://console.cloud.google.com/cloud-build/builds/1856bf87-0ce6-493b-b612-56fd3b1ef1f7?project=2843445864 |
fyi @melinath |
Thanks Riley - I left a comment on GoogleCloudPlatform/terraform-validator#195 regarding this. But it looks like this is a beta-only field :-/ that's interesting! I'll take a look. |
|
We need to upgrade terraform-provider-google because we need the schema changes introduced in GoogleCloudPlatform/magic-modules#4443. Changing to a specific commit is necessary because terraform-provider-google releases are no longer importable as go modules by default. See hashicorp/terraform-provider-google#8538 for the reasoning.
Fixes hashicorp/terraform-provider-google#7699
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)