Add ingestion settings to `google_pubsub_topic`
Add ingestion settings to google_pubsub_topic.
These are new fields on the Topic proto message published here: https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto#L183
Release Note Template for Downstream PRs (will be copied)
Add ingestion settings to `google_pubsub_topic`.
/gbcrun
/gcbrun
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 2 files changed, 227 insertions(+)) Terraform Beta: Diff ( 2 files changed, 227 insertions(+)) TF Conversion: Diff ( 1 file changed, 81 insertions(+))
Missing test report
Your PR includes resource fields which are not covered by any test.
Resource: google_pubsub_topic (138 total tests)
Please add an acceptance test which includes these fields. The test should include the following:
resource "google_pubsub_topic" "primary" {
ingestion_data_source_settings {
aws_kinesis {
aws_role_arn = # value needed
consumer_arn = # value needed
gcp_service_account = # value needed
stream_arn = # value needed
}
}
}
Sorry for the delay on this review. On first glance while we wait for tests:
- I don't see these fields in the API documentation. Are they just not documented yet? If they are not released, this may need to be implemented in our internal provider go/terraform-eap
- The other thing that stands out is these fields are not being tested anywhere. The simplest option is to add them to an existing example. If they are mutable values after the resource is created (you have them configured that way currently), you may instead need to use them in an "update test", to demonstrate that the values can be changed.
Tests analytics
Total tests: 42
Passed tests: 41
Skipped tests: 1
Affected tests: 0
Click here to see the affected service packages
- pubsub
$\textcolor{green}{\textsf{All tests passed!}}$ View the build log
Sorry for the delay on this review. On first glance while we wait for tests:
- I don't see these fields in the API documentation. Are they just not documented yet? If they are not released, this may need to be implemented in our internal provider go/terraform-eap
The fields are released as part of the public proto here https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto#L183-L245. Is this what you mean by API documentation or something else?
- The other thing that stands out is these fields are not being tested anywhere. The simplest option is to add them to an existing example. If they are mutable values after the resource is created (you have them configured that way currently), you may instead need to use them in an "update test", to demonstrate that the values can be changed.
The issue with the fields is that they require real AWS Kinesis/Role resources that need to be set up. I'm not sure if this is a supported capability in the test framework here. I have tested them manually though with private AWS Kinesis/Role and confirmed they work as expected.
Ah ok, I was referring to this API documentation, which doesn't seem to include these fields: https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics
For testing, you can see some existing examples in the code. The simplest option is if fake values an be used without causing errors. If a live AWS account is truly needed to use the resource, you should look into go/terraform-team-testing#managing-external-dependencies to see if your team could manage that account and have tests reference it. Otherwise, it is possible we need to make an exception here, but even in that case, the acceptance tests should be written in this PR similar to all other tests so that they can be run in a repeatable way (and we would skip them during automated tests).
Ah ok, I was referring to this API documentation, which doesn't seem to include these fields: https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics
The documentation will be updated soon prior to the launch of this feature.
For testing, you can see some existing examples in the code...
Added Create/Update tests as discussed offline.
/gcbrun
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 4 files changed, 361 insertions(+)) Terraform Beta: Diff ( 4 files changed, 361 insertions(+)) TF Conversion: Diff ( 1 file changed, 81 insertions(+)) TF OiCS: Diff ( 4 files changed, 114 insertions(+))
Tests analytics
Total tests: 44
Passed tests: 41
Skipped tests: 1
Affected tests: 2
Click here to see the affected service packages
- pubsub
Action taken
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccPubsubTopic_kinesisIngestionUpdate|TestAccPubsubTopic_pubsubTopicIngestionKinesisExample
$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccPubsubTopic_kinesisIngestionUpdate[Error message] [Debug log]
TestAccPubsubTopic_pubsubTopicIngestionKinesisExample[Error message] [Debug log]
$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$ View the build log or the debug log for each test
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 4 files changed, 361 insertions(+))
google-beta provider: Diff ( 4 files changed, 361 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 81 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))
Tests analytics
Total tests: 44
Passed tests: 41
Skipped tests: 1
Affected tests: 2
Click here to see the affected service packages
- pubsub
Action taken
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccPubsubTopic_kinesisIngestionUpdate|TestAccPubsubTopic_pubsubTopicIngestionKinesisExample
$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccPubsubTopic_kinesisIngestionUpdate[Debug log]
TestAccPubsubTopic_pubsubTopicIngestionKinesisExample[Debug log]
$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$
$\textcolor{green}{\textsf{All tests passed!}}$ View the build log or the debug log for each test