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

Added support for Datastream service & for ConnectionProfile resource #6479

Merged
merged 13 commits into from
Sep 6, 2022

Conversation

melinath
Copy link
Member

First part of hashicorp/terraform-provider-google#10810

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)

google_datastream_connection_profile

@melinath melinath requested review from a team and ScottSuarez and removed request for a team August 29, 2022 19:03
@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 ( 8 files changed, 2099 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2099 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2152
Passed tests 1906
Skipped tests: 233
Failed tests: 13

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccDatastreamConnectionProfile_update|TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudFunctions2Function_fullUpdate|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[view]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[view]
TestAccCloudFunctions2Function_fullUpdate[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]

Tests failed during RECORDING mode:
TestAccDatastreamConnectionProfile_update[view]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample[view]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample[view]
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]

Please fix these to complete your PR
View the build log or the debug log for each test

@melinath melinath requested review from a team and slevenick and removed request for ScottSuarez and a team August 29, 2022 20:35
mmv1/products/datastream/api.yaml Outdated Show resolved Hide resolved
mmv1/products/datastream/api.yaml Show resolved Hide resolved
A set of reusable connection configurations to be used as a source or destination for a stream.
properties:
- !ruby/object:Api::Type::String
name: 'name'
Copy link
Contributor

Choose a reason for hiding this comment

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

I tend to prefer renaming connection_profile_id -> name and omitting the output-only name variable because it should be identical to the resource's id field, but there is precedence for both ways so I won't block on that

Copy link
Member Author

Choose a reason for hiding this comment

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

In the absence of a right way - I'd rather leave it called connection_profile_id because that matches the API field. would it make sense to just remove support for the name field since it duplicates id?

mmv1/products/datastream/terraform.yaml Outdated Show resolved Hide resolved
@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 ( 8 files changed, 2178 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2178 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2154
Passed tests 1912
Skipped tests: 234
Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Error message] [Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample[Error message] [Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@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 ( 8 files changed, 2152 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2152 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2154
Passed tests 1911
Skipped tests: 234
Failed tests: 9

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccBigQueryDataTable_bigtable|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccComputeInstance_soleTenantNodeAffinities

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccBigQueryDataTable_bigtable[Debug log]

Tests failed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@trentkgUjet
Copy link

Would it be possible to add the private connection resource to this PR as well? Otherwise, in order to use this feature Ujet would need to expose our cloudsql instance with a public IP, which compliance won't let us do.

I'm sure other businesses are in the same boat!

@melinath
Copy link
Member Author

@trentkgUjet I'm going to get to PrivateConnection and Stream as well. However, to keep review simple, there will only be one resource per PR.

@melinath
Copy link
Member Author

cc @iperetz-goo

@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 ( 8 files changed, 2244 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2244 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2154
Passed tests 1911
Skipped tests: 234
Failed tests: 9

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode:
TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample[Error message] [Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@slevenick
Copy link
Contributor

/gcbrun enabled the API

@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 ( 8 files changed, 2244 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2244 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 insertions(+))

Async definitions are used to figure out whether to call async code even if the async code isn't autogenerated
@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 ( 8 files changed, 2280 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2280 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 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 ( 8 files changed, 2280 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 8 files changed, 2280 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 511 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 229 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2159
Passed tests 1915
Skipped tests: 235
Failed tests: 9

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample[Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@melinath melinath merged commit ad14bfc into main Sep 6, 2022
@melinath melinath deleted the b-233804820 branch September 6, 2022 16:37
renescheepers pushed a commit to renescheepers/magic-modules that referenced this pull request Sep 7, 2022
…GoogleCloudPlatform#6479)

* Added datastream connection profile

* Updated resource and tests to get to passing basic/full tests

* Added update test

* Corrected license dates

* Moved url params into parameters array

* Removed long timeouts

* Ensured that update test actually tests update

* Made update test move from gcs bucket to postgresql database instance

* Switched to handwritten operation due to unexpected error structure

* Added authorized networks to sql database instance

* fixed whitespace

* Re-added async definitions

Async definitions are used to figure out whether to call async code even if the async code isn't autogenerated

* Added postgresql password to importstateverifyignore
@melinath melinath mentioned this pull request Sep 16, 2022
5 tasks
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.

4 participants