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

Composer v2 (beta) (#9611) #5181

Merged
merged 17 commits into from
Oct 6, 2021
Merged

Conversation

kubasieron
Copy link
Contributor

@kubasieron kubasieron commented Sep 8, 2021

Add support for creation of Cloud Composer v2 environments.

fixes hashicorp/terraform-provider-google/issues/9611

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)

composer: added support for composer v2 fields `workloads_config` and `cloud_composer_network_ipv4_cidr_block` to `composer_environment`

@google-cla google-cla bot added the cla: yes label Sep 8, 2021
@kubasieron kubasieron changed the title Composer v2 Composer v2 (beta) (#9611) Sep 8, 2021
@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, 7 insertions(+))
Terraform Beta: Diff ( 3 files changed, 305 insertions(+), 1 deletion(-))

@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 ( 1 file changed, 7 insertions(+))
Terraform Beta: Diff ( 3 files changed, 305 insertions(+), 2 deletions(-))

@ScottSuarez
Copy link
Contributor

might want to rebase to unblock this

/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 ( 1 file changed, 7 insertions(+))
Terraform Beta: Diff ( 2 files changed, 304 insertions(+))

@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, 7 insertions(+))
Terraform Beta: Diff ( 3 files changed, 305 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComposerEnvironment_ComposerV2|TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=206579

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccComposerEnvironment_ComposerV2|TestAccComputeServiceAttachment_serviceAttachmentBasicExample Please fix these to complete your PR

@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 ( 1 file changed, 7 insertions(+))
Terraform Beta: Diff ( 4 files changed, 306 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComposerEnvironment_ComposerV2|TestAccComputeForwardingRule_update|TestAccComputeServiceAttachment_serviceAttachmentBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=206608

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccComposerEnvironment_ComposerV2|TestAccComputeServiceAttachment_serviceAttachmentBasicExample Please fix these to complete your PR

@ScottSuarez
Copy link
Contributor

ScottSuarez commented Sep 21, 2021

I keep getting SA issues

Error: googleapi: Error 400: Composer API Service Agent service account does not have required permissions set. Please refer to https://cloud.google.com/composer/docs/how-to/managing/creating and Composer Creation Troubleshooting pages to resolve this issue., failedPrecondition

I the sa that runs the tests permissions. Do I have to grant another service account permissions?

Copy link
Contributor

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

@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, 7 insertions(+))
Terraform Beta: Diff ( 2 files changed, 307 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComposerEnvironment_ComposerV2|TestAccComputeServiceAttachment_serviceAttachmentBasicExample|TestAccOrgPolicyPolicy_EnforcePolicy|TestAccOrgPolicyPolicy_FolderPolicy|TestAccOrgPolicyPolicy_OrganizationPolicy|TestAccOrgPolicyPolicy_ProjectPolicy You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=206675

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate|TestAccComposerEnvironment_ComposerV2 Please fix these to complete your PR

@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, 7 insertions(+))
Terraform Beta: Diff ( 3 files changed, 308 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComposerEnvironment_ComposerV2 You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=206680

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccComposerEnvironment_ComposerV2 Please fix these to complete your PR

@ScottSuarez
Copy link
Contributor

The test failed with the following error

Error: Error waiting to create Environment: Error waiting for Creating Environment: Error code 9, message: Some of the GKE pods failed to become healthy. Please check the GKE logs for details, and retry the operation

@ScottSuarez
Copy link
Contributor

/gcbrun

2 similar comments
@ScottSuarez
Copy link
Contributor

/gcbrun

@ScottSuarez
Copy link
Contributor

/gcbrun

@google-cla google-cla bot added cla: yes and removed cla: no labels Sep 28, 2021
@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 ( 2 files changed, 16 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 4 files changed, 409 insertions(+), 2 deletions(-))

@@ -186,6 +186,10 @@ The `config` block supports:
* `maintenance_window` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
The configuration settings for Cloud Composer maintenance window.

* `workloads_config` -
Copy link
Contributor

Choose a reason for hiding this comment

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

This field is not beta correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

can you expand workloads_config subfields inline with the other block types

ie: The workloads_config block supports:

// version_1 - write own flatten for Scheduler, WebServer and Worker
// version_2 (Scott idea) - use different types for inner structs in flatten
// version_3 - v1 and v2 combined

Copy link
Contributor

Choose a reason for hiding this comment

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

v3 makes sense, lets go with that approach

@ScottSuarez
Copy link
Contributor

ScottSuarez commented Oct 4, 2021

  • - clean up the code for the flattener
  • - document the nested fields
  • - document which fields are composer v1 only and which are composer v2

@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 ( 2 files changed, 32 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 424 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccIapTunnelIamBindingGenerated|TestAccComposerEnvironment_update|TestAccComposerEnvironment_ComposerV2|TestAccComposerEnvironment_withDatabaseConfig|TestAccComposerEnvironment_withWebServerConfig|TestAccComputeServiceAttachment_serviceAttachmentBasicExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=208992

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccIapTunnelIamBindingGenerated|TestAccComposerEnvironment_ComposerV2|TestAccComposerEnvironment_update|TestAccComposerEnvironment_withDatabaseConfig|TestAccComposerEnvironment_withWebServerConfig Please fix these to complete your PR

@ScottSuarez
Copy link
Contributor

error from api

=== RUN   TestAccComposerEnvironment_ComposerV2
=== PAUSE TestAccComposerEnvironment_ComposerV2
=== CONT  TestAccComposerEnvironment_ComposerV2
    provider_test.go:278: Step 1/3 error: Error running apply: exit status 1
        
        Error: googleapi: Error 400: Found 2 problems:
        	1) Cloud Composer Network CIDR block must have a maximum size of /24.
        	2) Cloud SQL and webserver CIDR blocks must not overlap., badRequest
        
          on terraform_plugin_test.tf line 2, in resource "google_composer_environment" "test":
           2: resource "google_composer_environment" "test" {
        
        
--- FAIL: TestAccComposerEnvironment_ComposerV2 (95.16s)

@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 ( 2 files changed, 169 insertions(+), 32 deletions(-))
Terraform Beta: Diff ( 3 files changed, 521 insertions(+), 38 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccComposerEnvironment_ComposerV2 You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=209160

@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 ( 2 files changed, 177 insertions(+), 59 deletions(-))
Terraform Beta: Diff ( 4 files changed, 550 insertions(+), 66 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=209184

@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 ( 2 files changed, 173 insertions(+), 59 deletions(-))
Terraform Beta: Diff ( 3 files changed, 548 insertions(+), 65 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccPubsubLiteReservation_pubsubLiteReservationBasicExample|TestAccPubsubLiteTopic_pubsubLiteTopicBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=209376

khajduczenia pushed a commit to khajduczenia/magic-modules that referenced this pull request Oct 12, 2021
Co-authored-by: Scott Suarez <[email protected]>
Co-authored-by: Goran Obradovic <[email protected]>
Co-authored-by: Scott Suarez <[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.

Add support for Cloud Composer v2
5 participants