-
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
Changing name field on google_compute_disk for TestAccComputeInstanceTemplate_sourceSnapshotEncryptionKey to include randomly generated string #7392
Conversation
Oops! It looks like you're using an unknown release-note type in your changelog entries:
Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md. |
762be37
to
84ae9fe
Compare
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.
Just one comment about the new naming
resource "google_compute_disk" "persistent" { | ||
name = "debian-disk" | ||
name = "debian-disk-${random_id.id.hex}" |
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.
Instead of using the random_id
provider, could we instead use the suffix
variable that is passed to this function? It uses randString()
, which is actually not random for the VCR tests that run for PRs, and allows REPLAY mode to work.
Also, we should probably add a tf-test-
prefix, so that if the test fails, the sweeper cleans up the leftover disk.
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.
Good Idea, ill add this
…ndomly generated string
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.
A few nits, and the template strings will need to be updated from using %s
. Once the latter is fixed we can run the CI checks.
mmv1/third_party/terraform/tests/resource_compute_instance_template_test.go.erb
Outdated
Show resolved
Hide resolved
mmv1/third_party/terraform/tests/resource_compute_instance_template_test.go.erb
Outdated
Show resolved
Hide resolved
mmv1/third_party/terraform/tests/resource_compute_instance_template_test.go.erb
Show resolved
Hide resolved
/gcbrun |
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.
LGTM assuming tests pass. I left one last nit, but it is not blocking.
mmv1/third_party/terraform/tests/resource_compute_instance_template_test.go.erb
Outdated
Show resolved
Hide resolved
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 29 insertions(+), 21 deletions(-)) |
Tests analyticsTotal tests: Errors occurred during REPLAYING mode. Please fix them to complete your PR |
/gcbrun |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 29 insertions(+), 21 deletions(-)) |
Tests analyticsTotal tests: Errors occurred during REPLAYING mode. Please fix them to complete your PR |
Ah, this is the build error, which is due to capitalization changes elsewhere and will require a rebase:
Basically, I think you'll just need to change |
/gcbrun |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 29 insertions(+), 21 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeInstanceTemplate_sourceImageEncryptionKey|TestAccComputeInstanceTemplate_sourceSnapshotEncryptionKey|TestAccComposerEnvironment_withEncryptionConfigComposer2|TestAccCloudRunV2Job_cloudrunv2JobFullUpdate |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
mmv1/third_party/terraform/tests/resource_compute_instance_template_test.go.erb
Outdated
Show resolved
Hide resolved
/gcbrun |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 29 insertions(+), 21 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 87 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeSharedVpc_basic|TestAccIAM2AccessBoundaryPolicy|TestAccKmsKeyRing_basic|TestAccComputeResourceUsageExportBucket|TestAccLoggingBucketConfig_CreateBuckets_withCustomId|TestAccLoggingBucketConfigProject_cmekSettings|TestAccKmsKeyRingIamPolicy_withCondition|TestAccKmsKeyRingIamPolicy|TestAccKmsKeyRingIamMember_withCondition|TestAccKmsKeyRingIamMember|TestAccKmsCryptoKeyVersion_patch|TestAccKmsKeyRingIamBinding_withCondition|TestAccKmsKeyRingIamBinding|TestAccKmsCryptoKeyVersion_skipInitialVersion|TestAccKmsCryptoKeyVersion_basic|TestAccKmsCryptoKey_importOnly|TestAccKmsCryptoKey_destroyDuration|TestAccKmsCryptoKey_template|TestAccKmsCryptoKey_basic|TestAccKmsCryptoKeyIamPolicy_withCondition|TestAccKmsCryptoKeyIamPolicy|TestAccKmsCryptoKeyIamMember_withCondition|TestAccKmsCryptoKeyIamMember|TestAccKmsCryptoKeyIamBinding_withCondition|TestAccKmsCryptoKeyIamBinding|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccProject_deleteDefaultNetwork|TestAccResourceGoogleProjectDefaultServiceAccountsDeprivilege|TestAccResourceGoogleProjectDefaultServiceAccountsDeleteRevertIgnoreFailure|TestAccResourceGoogleProjectDefaultServiceAccountsDelete|TestAccResourceGoogleProjectDefaultServiceAccountsDisable|TestAccResourceGoogleProjectDefaultServiceAccountsBasic|TestAccFirebaserulesRelease_BasicRelease|TestAccDialogflowIntent_update|TestAccDialogflowIntent_basic|TestAccDialogflowFulfillment_update|TestAccDialogflowEntityType_update|TestAccDialogflowAgent_update|TestAccComputeProjectMetadata_modify_2|TestAccComputeProjectMetadata_modify_1|TestAccComputeProjectMetadata_basic|TestAccComputeProjectDefaultNetworkTier_modify|TestAccComputeProjectDefaultNetworkTier_basic|TestAccComputeInstanceTemplate_sourceSnapshotEncryptionKey|TestAccComputeInstanceFromMachineImage_diffProject|TestAccBinaryAuthorizationPolicy_update|TestAccAssuredWorkloadsWorkload_FullHandWritten|TestAccBinaryAuthorizationPolicy_separateProject|TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTestExample|TestAccBinaryAuthorizationPolicy_full|TestAccApigeeEnvKeystore_apigeeEnvironmentKeystoreTestExample|TestAccAppEngineFlexibleAppVersion_update|TestAccAssuredWorkloadsWorkload_BasicHandWritten|TestAccApigeeAddonsConfig_apigeeAddonsTestExample|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample|TestAccBinaryAuthorizationPolicy_basic|TestAccApigeeSyncAuthorization_update|TestAccApigeeSyncAuthorization_apigeeSyncAuthorizationBasicTestExample|TestAccAppEngineStandardAppVersion_update|TestAccIapAppEngineServiceIamPolicyGenerated_withCondition|TestAccIapAppEngineServiceIamMemberGenerated_withCondition|TestAccIapAppEngineServiceIamBindingGenerated_withCondition|TestAccIapAppEngineServiceIamMemberGenerated|TestAccIapAppEngineServiceIamBindingGenerated|TestAccIapAppEngineServiceIamPolicyGenerated|TestAccOsConfigOsPolicyAssignment_basicOsPolicyAssignment|TestAccIAM2DenyPolicy_iamDenyPolicyUpdate|TestAccIAM2DenyPolicy_iamDenyPolicyBasicExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityUpdate|TestAccLoggingProjectCmekSettings_basic|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccPrivatecaCertificate_privatecaCertificateCsrExample|TestAccApigeeEnvironmentIamBindingGenerated|TestAccPrivatecaCertificate_privatecaCertificateUpdate|TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccPrivatecaCertificate_privatecaCertificateWithTemplateExample|TestAccPrivatecaCertificate_privatecaCertificateConfigExample|TestAccPrivatecaCertificateAuthority_rootCaManageDesiredState|TestAccPrivatecaCertificate_privatecaCertificateNoAuthorityExample|TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample|TestAccPrivatecaCaPool_updateCaOption|TestAccPrivatecaCaPool_privatecaCapoolEmptyBaseline|TestAccPrivatecaCaPool_privatecaCapoolUpdate|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourcePrivatecaCertificateAuthority_privatecaCertificateAuthorityBasicExample |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Several tests got terminated during RECORDING mode. |
…Template_sourceSnapshotEncryptionKey to include randomly generated string (GoogleCloudPlatform#7392) * Changed name within google_compute_disk on line 3162 to inclue and randomly generated string * Cleaned up arguments being passed in to be more inline with other tests * Updated based on addtional PR comments * Fixed swapping of values within new context
Adding AuthorizedOrgsDesc to AccessContextManager (GoogleCloudPlatform#7178) Allow project field in Firebase apps datasource (GoogleCloudPlatform#7300) * Allow project field in Firebase apps datasource * Add tf_test to the display name * update to capitalized dependencies Rename compute_(region)_per_instance_config test files to .erb files … (GoogleCloudPlatform#7409) * Rename compute_(region)_per_instance_config test files to .erb files since the resources have fields in beta. * Omit stateful_ip tests for GA Bootstrap network cleanup (GoogleCloudPlatform#7367) * Update bootstrapped networks for alloydb * Update bootstrapped networks for redis * Update bootstrapped networks for vertexai * Update comment for BootstrapSharedTestNetwork to be more clear Fix override directory concat (GoogleCloudPlatform#7413) Bootstrap required permissions for composer environment tests (GoogleCloudPlatform#7391) * Bootstrap the required permissions * Make BootstrapAllPSARoles actually work Also adds some helper functions for debugging what the bootstrap function does. It will now log the roles that were missing in the policy. * Add missing return, fix nits * Fix typo in service agent name * Account for newly exported test functions Add maintenance_interval field to Instance Template and Instance scheduling. (GoogleCloudPlatform#7365) * Move testing to handwritten * Move testing to handwritten * Fix lint * Fix typo * Add remove step and update documentation * Add remove step and update documentation * Fix comparing string to nil * Add field to handwritten defs * rebase on main & resolve conflicts * Fix doc formatting * Add maintenance interval to Instance resource * Add maintenance interval to Instance resource * Add maintenance interval to Instance resource * Change function names to valid * Fix type mismatch * Fix type mismatch * Fix function name Fix naming of resource policies in tests to be sweepable (GoogleCloudPlatform#7412) Skip TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample (GoogleCloudPlatform#7415) Add support for Apigee Sharedflow (GoogleCloudPlatform#7202) * added sharedflows mmv1 with error * fix indentation issue for sharedflow * add semi auto generated resourceApigeeSharedFlow * remove sharedflow mmv1 and add sharedflow manual provider * adding files for debugging review, test have issue * adding files for debugging review, test have issue * update test, doc, provider for apigee * Update api.yaml remove empty new line * Update api.yaml * Rename resource_apigee_shared_flow_generated_test.go to resource_apigee_shared_flow_test.go * Update resource_apigee_shared_flow.go update import regex, change debug messages to log.Printf * Update mmv1/third_party/terraform/utils/provider.go.erb Co-authored-by: megan07 <mbang@hashicorp.com> * update PR to address comments * update test * fix sharedflow attribute update issue, add sharedflow deployment * Update apigee_shared_flow_deployment.html.markdown minor doc fix * Update mmv1/third_party/terraform/utils/provider.go.erb Co-authored-by: megan07 <mbang@hashicorp.com> * Update mmv1/third_party/terraform/website/docs/r/apigee_shared_flow.html.markdown Co-authored-by: megan07 <mbang@hashicorp.com> * Update resource_apigee_shared_flow_test.go remove commented out (unused) line of code * Delete api.yaml remove api.yaml as it is not needed for handwritten resource. Current repo structure no longer uses aggregated api.yaml * Rename apigee_shared_flow.html.markdown to apigee_sharedflow.html.markdown * Rename apigee_shared_flow_deployment.html.markdown to apigee_sharedflow_deployment.html.markdown * Rename resource_apigee_shared_flow.go to resource_apigee_sharedflow.go * Rename resource_apigee_shared_flow_deployment_test.go to resource_apigee_sharedflow_deployment_test.go * Rename resource_apigee_shared_flow_test.go to resource_apigee_sharedflow_test.go * Rename resource_apigee_shared_flow_sweeper_test.go to resource_apigee_sharedflow_sweeper_test.go * Update resource_apigee_sharedflow.go remove comment lines * Update mmv1/third_party/terraform/resources/resource_apigee_sharedflow.go Co-authored-by: megan07 <mbang@hashicorp.com> * Update resource_apigee_sharedflow_deployment_test.go remove unused debugging log * update function name to capitalize * Update resource_apigee_sharedflow_deployment_test.go remove fmt.print * add flowhook * move flowhook doc * Update mmv1/third_party/terraform/tests/resource_apigee_flowhook_test.go Co-authored-by: megan07 <mbang@hashicorp.com> * Update mmv1/third_party/terraform/website/docs/r/apigee_flowhook.html.markdown Co-authored-by: megan07 <mbang@hashicorp.com> * Update mmv1/third_party/terraform/website/docs/r/apigee_flowhook.html.markdown Co-authored-by: megan07 <mbang@hashicorp.com> * Update mmv1/third_party/terraform/tests/resource_apigee_flowhook_test.go Co-authored-by: megan07 <mbang@hashicorp.com> * Update resource_apigee_flowhook_test.go remove fmt.print * update some resource attribute properties * Update apigee_flowhook.html.markdown updated `description` and `continue_on_error` as optional * update referenced function naming case --------- Co-authored-by: Ray Xu <xrc@google.com> Co-authored-by: megan07 <mbang@hashicorp.com> add tests (GoogleCloudPlatform#7357) Co-authored-by: Edward Sun <sunedward@google.com> run gofmt + fix capitalization errors from previous PRs (GoogleCloudPlatform#7420) switch ci secrets to use secret manager (GoogleCloudPlatform#7408) Update field descriptions (GoogleCloudPlatform#7402) HA VPN over Cloud Interconnect has launched in GA We should still probably add a sample or two showing how to use it. Document PRODUCT_BASE_PATH override for DCL resource IAM (GoogleCloudPlatform#7418) yaqs/1723187608399380480 Add support for accelerators to google_datafusion_instance (GoogleCloudPlatform#6851) Added support to the field for Data Fusion, updated corresponding generated and handwritten tests, and added a custom diffsuppressfunc. Currently suggests a manual fix to a potential diff issue, will be able to update down line based on feedback from API team. Fix alloydb_cluster permadiff (GoogleCloudPlatform#7421) Fix dns_managed_zone tests using unverified domain (GoogleCloudPlatform#7422) Add SKIP_PROJECT_SWEEPER env variable for skipping the project sweeper (GoogleCloudPlatform#7432) Remove percent sign when parsing metadata name (GoogleCloudPlatform#7417) * Remove percent sign when parsing metadata name * Remove percent sign when parsing metadata name Merge branch 'GoogleCloudPlatform:main' into feature/iam_policy Add ignore read on reserved ip ranges (GoogleCloudPlatform#7429) Fix serviceusage links, clean up service resource stub (GoogleCloudPlatform#7435) Remove use of `make generate` from TPG/TPGB-specific step in CI (GoogleCloudPlatform#7379) Updating default accelerator.state field behavior in Data Fusion Instance (GoogleCloudPlatform#7434) Making suggested default behavior functionality updates in previous accelerators PR. Modify resource attribute 'input' to 'immutable' (GoogleCloudPlatform#7431) * Modify resource attribute 'input' to 'immutable' Remove noisy logging of project sweeper being skipped (GoogleCloudPlatform#7439) Fix PubSub-to-BigQuery push configuration example (GoogleCloudPlatform#7410) Rework + reflow provider reference, touch up index (GoogleCloudPlatform#7437) Fix eventarc tests to use dedicated bootstrapped keys (GoogleCloudPlatform#7440) Update docs for changing attribute `input` to `immutable` (GoogleCloudPlatform#7442) Feat name constraints (GoogleCloudPlatform#7400) Remove game_service_cluster_basic test (GoogleCloudPlatform#7443) send friendly_name (GoogleCloudPlatform#7433) * send friendly_name * fixed validator failures * update * fix validator errors --------- Co-authored-by: Edward Sun <sunedward@google.com> Fix headline of google_iam_workload_identity_pool (GoogleCloudPlatform#7449) Move IAM bootstrap to its own file, improve error messages (GoogleCloudPlatform#7424) * Move IAM bootstrap to its own file, improve errors Also bootstrap roles/cloudbuild.builds.builder for cloudbuild service agent. * Re-add BootstrapConfig (accidentally deleted) * Fix wrong variable name * Bootstrap the role previously hardcoded for pubsub * Move error message back into bootstrap function This will dedup the code that calls this function. It now returns a boolean and sends the more useful error through t.Error. * Bootstrap the permissions for pubsub service agent * Bootstrap the role in the correct test * Fix formatting Changing name field on google_compute_disk for TestAccComputeInstanceTemplate_sourceSnapshotEncryptionKey to include randomly generated string (GoogleCloudPlatform#7392) * Changed name within google_compute_disk on line 3162 to inclue and randomly generated string * Cleaned up arguments being passed in to be more inline with other tests * Updated based on addtional PR comments * Fixed swapping of values within new context If not specified, a default Workstations service agent SA is returned (GoogleCloudPlatform#7428) * If not specified, a default service agent SA is returned * Revert "Skip TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample" This reverts commit 097bdbe. * remove `rotation_period` update BigqueryDatapolicy to ga (GoogleCloudPlatform#6797) fix managed.dnsAuthorizations: (GoogleCloudPlatform#7445) Co-authored-by: Edward Sun <sunedward@google.com> google_compute_security_policy: force send enforce_on_key so it can be unset on (GoogleCloudPlatform#7454) Make `hostname` and `matcher` fields immutable (GoogleCloudPlatform#7448) Add note on requiredness (GoogleCloudPlatform#7453) Update BootstrapProject to support use across multiple projects/environments (GoogleCloudPlatform#7369) * Update BootstrapProject to support use across multiple projects/environments * Fix typo * Fix arguments for getTestProjectFromEnv * Fix project naming strategy for BootstrapProject to produce valid names in all envs * Fix typo * Fix function name after rebase Update resource names in acceptance test to use `tf-test-` prefix (GoogleCloudPlatform#7450) fix datastream_stream dataset id import (GoogleCloudPlatform#7451) Merge branch 'GoogleCloudPlatform:main' into feature/iam_policy Removing api.yaml and replacing with per product configs Merge branch 'feature/iam_policy' of https://github.com/dbjnbnrj/magic-modules into feature/iam_policy
…Template_sourceSnapshotEncryptionKey to include randomly generated string (GoogleCloudPlatform#7392) * Changed name within google_compute_disk on line 3162 to inclue and randomly generated string * Cleaned up arguments being passed in to be more inline with other tests * Updated based on addtional PR comments * Fixed swapping of values within new context
Possible solution for #13609 hashicorp/terraform-provider-google#13609
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)