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

Add billingType attribute to Apigee Organization resource #5796

Merged
merged 27 commits into from
Mar 15, 2022

Conversation

xuchenma
Copy link
Contributor

@xuchenma xuchenma commented Mar 8, 2022

This PR fixes hashicorp/terraform-provider-google#11226 by adding a billingType attribute to ApigeeOrganization resource.

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)

Add billingType attribute to Apigee Organization resource.

xuchenma and others added 26 commits October 3, 2021 07:17
Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
@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 ( 2 files changed, 33 insertions(+))
Terraform Beta: Diff ( 3 files changed, 34 insertions(+))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 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 ( 2 files changed, 33 insertions(+))
Terraform Beta: Diff ( 3 files changed, 34 insertions(+))
TF Validator: Diff ( 3 files changed, 13 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|TestAccDataSourceSqlDatabaseInstance_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccBigqueryReservationAssignment_BasicHandWritten|TestAccCGCSnippet_sqlMysqlInstanceBackupExample|TestAccCGCSnippet_sqlPostgresInstanceBackupExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupExample|TestAccCGCSnippet_sqlSqlserverInstanceAuthorizedNetworkExample|TestAccCloudBuildTrigger_cloudbuildTriggerPubsubConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerManualExample|TestAccCloudBuildTrigger_cloudbuildTriggerFilenameExample|TestAccCloudBuildTrigger_cloudbuildTriggerBuildExample|TestAccCloudBuildTrigger_basic|TestAccCloudBuildTrigger_available_secrets_config|TestAccCloudBuildTrigger_cloudbuildTriggerServiceAccountExample|TestAccCloudBuildTrigger_disable|TestAccCloudBuildTrigger_fullStep|TestAccCloudFunctionsFunction_secretEnvVar|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccDataprocCluster_nonPreemptibleSecondary|TestAccDataprocCluster_updatable|TestAccDataprocCluster_withConfigOverrides|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=265936

@ScottSuarez
Copy link
Contributor

Did you tests these changes locally. Looks like a lot of the corresponding tests are failing and its not immediately clear why

@xuchenma
Copy link
Contributor Author

Yes, I tested it locally and it has passed. The failures in the above comment don't seem to be related though, because this PR doesn't modify those resources.

@ScottSuarez
Copy link
Contributor

it looks like the apigee tests are failing because it's unable to update the billing type to null

          # google_apigee_organization.apigee_org must be replaced
        -/+ resource "google_apigee_organization" "apigee_org" {
              - billing_type       = "EVALUATION" -> null
              ~ ca_certificate     = "" -> (known after apply)
              ~ id                 = "organizations/tf-testnz49of6h07" -> (known after apply)
              ~ name               = "tf-testnz49of6h07" -> (known after apply)
              ~ subscription_type  = "TRIAL" -> (known after apply)
                # (4 unchanged attributes hidden)
            }

@ScottSuarez
Copy link
Contributor

You should be able to fix this by using default_from_api in the terraform.yaml

cdnPolicy.clientTtl: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
send_empty_value: true

@xuchenma
Copy link
Contributor Author

Thanks, I added that. When testing locally I got errors like
google/resource_apikeys_key.go:251:12: undefined: NewDCLApikeysClient
that seems unrelated. I wonder if this will just pass in the CI system.

@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, 34 insertions(+))
Terraform Beta: Diff ( 3 files changed, 35 insertions(+))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 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 ( 2 files changed, 34 insertions(+))
Terraform Beta: Diff ( 3 files changed, 35 insertions(+))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 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 ( 2 files changed, 34 insertions(+))
Terraform Beta: Diff ( 3 files changed, 35 insertions(+))
TF Validator: Diff ( 3 files changed, 13 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|TestAccDataSourceSqlDatabaseInstance_basic|TestAccApikeysKey_AndroidKey|TestAccApikeysKey_BasicKey|TestAccApikeysKey_IosKey|TestAccApikeysKey_MinimalKey|TestAccApikeysKey_ServerKey|TestAccArtifactRegistryRepository_create_mvn_snapshot|TestAccArtifactRegistryRepository_create_mvn_release|TestAccCGCSnippet_sqlSqlserverInstanceBackupLocationExample|TestAccContainerAwsCluster_BasicHandWritten|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccContainerNodePool_gvnic|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=268591

@ScottSuarez ScottSuarez merged commit 32dcfa5 into GoogleCloudPlatform:main Mar 15, 2022
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 16, 2022
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 17, 2022
@xuchenma xuchenma deleted the new_branch branch March 17, 2022 17:39
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 18, 2022
betsy-lichtenberg pushed a commit to betsy-lichtenberg/magic-modules that referenced this pull request Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add billingType attribute to Apigee Organization resource
3 participants