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

Allow google_container_cluster.id reference for the value for the gke_cluster of a google_gke_hub_membership #4985

Merged

Conversation

upodroid
Copy link
Contributor

Fixes: hashicorp/terraform-provider-google#9455

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

gkehub: `google_gke_hub_membership` supports both `//container.googleapis.com/${google_container_cluster.my-cluster.id}` and `google_container_cluster.my-cluster.id` in `endpoint.0.gke_cluster.0.resource_link`

@google-cla google-cla bot added the cla: yes label Jul 20, 2021
@upodroid
Copy link
Contributor Author

Have a look at #4982 (comment) for why I removed description.

@modular-magician
Copy link
Collaborator

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.

@ScottSuarez, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 3 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 26 insertions(+), 12 deletions(-))
TF OiCS: Diff ( 1 file changed, 1 deletion(-))

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 1 file changed, 22 insertions(+), 2 deletions(-))

@ScottSuarez
Copy link
Contributor

/gcbrun looks good to me

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 4 files changed, 28 insertions(+), 9 deletions(-))
TF Conversion: Diff ( 1 file changed, 22 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccAssuredWorkloadsWorkload_basic|TestAccAssuredWorkloadsWorkload_full|TestAccBigqueryDataTransferConfig|TestAccBigqueryReservationReservation_bigqueryReservationBasicExample|TestAccBillingBudget_budgetFilterProjectsOrdering|TestAccBillingBudget_billingBudgetUpdate|TestAccCloudBuildTrigger_pubsub_config|TestAccCloudBuildTrigger_webhook_config|TestAccComposerEnvironment_withMaintenanceWindow|TestAccComputeBackendService_withBackend|TestAccComputeBackendService_withBackendAndMaxUtilization|TestAccComputeBackendService_withBackendAndIAP|TestAccComputeBackendService_withMaxConnections|TestAccComputeBackendService_withMaxConnectionsPerInstance|TestAccComputeBackendService_withMaxRatePerEndpoint|TestAccComputeBackendService_withMaxConnectionsPerEndpoint|TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample|TestAccComputeInstanceGroup_rename|TestAccComputeRouter_computeRouterEncryptedInterconnectExample|TestAccContainerCluster_backend|TestAccContainerNodePool_withGPU|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateBasicExample|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateUpdate|TestAccDialogflowCXFlow_dialogflowcxFlowFullExample|TestAccDialogflowCXVersion_dialogflowcxVersionFullExample|TestAccDialogflowCXFlow_update|TestAccDialogflowCXVersion_update|TestAccGKEHubMembership_gkehubMembershipBasicExample|TestAccGKEHubMembership_gkehubMembershipIssuerExample|TestAccNetworkServicesEdgeCacheKeyset_networkServicesEdgeCacheKeysetBasicExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginBasicExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample|TestAccNetworkServicesEdgeCacheOrigin_updateAndImport|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceBasicExample|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample|TestAccNetworkServicesEdgeCacheService_updateAndImport|TestAccPrivatecaCertificate_privatecaCertificateCsrExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample|TestAccPrivatecaCertificate_privatecaCertificateConfigExample|TestAccPrivatecaCertificate_privatecaCertificateNoAuthorityExample|TestAccSecurityCenterNotificationConfig_sccNotificationConfigBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=198423

@ScottSuarez
Copy link
Contributor

could you rebase this, there was an issue with the gke hub mem tests

@ScottSuarez ScottSuarez self-requested a review July 29, 2021 20:58
@upodroid
Copy link
Contributor Author

Rebased.

The CI should expose this error here.

 REDACTED  MCW0CDP3YY  ~  Desktop  Git  magic-modules  mmv1   gke-hub-endpoint-selflink  11⚑  $   git pull upstream master
From github.com:GoogleCloudPlatform/magic-modules
 * branch                master     -> FETCH_HEAD
Removing mmv1/third_party/terraform/website/docs/r/eventarc_trigger.html.markdown
Removing mmv1/third_party/terraform/website/docs/r/assured_workloads_workload.html.markdown
Removing mmv1/third_party/terraform/tests/resource_eventarc_trigger_test.go
Removing mmv1/third_party/terraform/tests/resource_assured_workloads_workload_test.go.erb
Removing mmv1/templates/terraform/examples/global_forwarding_rule_private_services_connect.tf.erb
Auto-merging mmv1/products/gkehub/terraform.yaml
CONFLICT (content): Merge conflict in mmv1/products/gkehub/terraform.yaml
Automatic merge failed; fix conflicts and then commit the result

@ScottSuarez
Copy link
Contributor

added a comment to resolve that merge diff.

@ScottSuarez ScottSuarez self-requested a review July 29, 2021 21:22
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 4 files changed, 27 insertions(+), 9 deletions(-))
TF Conversion: Diff ( 1 file changed, 22 insertions(+), 2 deletions(-))

@ScottSuarez
Copy link
Contributor

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 1 file changed, 22 insertions(+), 2 deletions(-))

1 similar comment
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
TF Conversion: Diff ( 1 file changed, 22 insertions(+), 2 deletions(-))

@ScottSuarez
Copy link
Contributor

/gcbrun

@modular-magician
Copy link
Collaborator

Error trying to cancel build ()

1 similar comment
@modular-magician
Copy link
Collaborator

Error trying to cancel build ()

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 8 deletions(-))
Terraform Beta: Diff ( 4 files changed, 27 insertions(+), 9 deletions(-))
TF Conversion: Diff ( 1 file changed, 22 insertions(+), 2 deletions(-))

@ScottSuarez ScottSuarez merged commit c34b6ff into GoogleCloudPlatform:master Aug 10, 2021
# limitations under the License.
-%>
func expand<%= prefix -%><%= titlelize_property(property) -%>(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
if strings.HasPrefix(v.(string), "//container.googleapis.com/") {
Copy link
Member

Choose a reason for hiding this comment

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

Can we change this guard to just //? //container.googleapis.com/ is the only environment most users will interact with, but isn't necessarily the only environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

should we revert?

Copy link
Member

Choose a reason for hiding this comment

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

Seems fine to fix forward

@upodroid
Copy link
Contributor Author

I'll push a fix now

@upodroid upodroid mentioned this pull request Aug 11, 2021
5 tasks
khajduczenia pushed a commit to khajduczenia/magic-modules that referenced this pull request Oct 12, 2021
…ke_cluster of a `google_gke_hub_membership` (GoogleCloudPlatform#4985)

Co-authored-by: upodroid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow a google_container_cluster id reference for the value for the gke_cluster of a google_gke_hub_membership
4 participants