-
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
Support healthcare fhir new notifications config #6471
Support healthcare fhir new notifications config #6471
Conversation
Hello! I am a robot who works on Magic Modules PRs. I've detected that you're a community contributor. @c2thorn, a repository maintainer, has been assigned to assist you and help review your changes. ❓ First time contributing? Click here for more detailsYour assigned reviewer will help review your code by:
You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails. If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox. |
a366b1f
to
8598cd1
Compare
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 2 files changed, 120 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccHealthcareFhirStore_healthcareFhirStoreNotificationConfigExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudRunService_cloudRunServiceStaticOutboundExample |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 2 files changed, 120 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccHealthcareFhirStore_healthcareFhirStoreNotificationConfigExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
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.
The test is failing on our end due to the following error:
provider_test.go:315: Step 1/2 error: Error running apply: exit status 1
Error: Error creating FhirStore: googleapi: Error 403: Permission pubsub.topics.publish denied on resource gs://tf-test-fhir-notifications<redactedsuffix> (or it may be malformed or not exist)
with google_healthcare_fhir_store.default,
on terraform_plugin_test.tf line 2, in resource "google_healthcare_fhir_store" "default":
2: resource "google_healthcare_fhir_store" "default" {
Looks like some permission is needed, do you know if this is something we can add to the example?
…fhir-store-notification
…fhir-store-notification
5e69dea
to
a0f96e3
Compare
a0f96e3
to
4429fea
Compare
The permission needed is the "pubsub.topics.publish" permission to the pubsub topic here. In order for the creation to actually succeed, that topic needs to exist and also the permission of that topic needs to be granted to the test project which is creating fhir store. Not sure if we can configure for this. (Also I noticed that I attached the "gs://" prefix which shouldn't be attached, now fixed. |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 2 files changed, 120 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccComputeInstance_soleTenantNodeAffinities|TestAccHealthcareFhirStore_healthcareFhirStoreNotificationConfigExample|TestAccFirebaserulesRelease_BasicRelease|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
Hi @joycezhou47, this is something we'll need to resolve for the test to pass. Can we grant permissions within the example using the pubsub IAM controls ? |
pubsub permissions can be granted using IAM controls, but I need help to navigate the permission granting process for these tests since I don't really have an understanding of the test setup. I see the "" part on the failure message, I assumed that this means that each time the test runs, a pubsub topic is dynamically generated - this implies that we would also need to dynamically create this topic during the test. However, if the topics are not dynamically generated, and if it should be much easier to configure - I'll need to find the project which this test is running against, and grant the pubsub.publish IAM permission to the service account of that project. |
Yes these tests dynamically create and destroy resources each run, so the permissions will also need to be dynamic. I'm hoping something similar to https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/templates/terraform/examples/storage_pubsub_notifications.tf.erb is usable here |
4429fea
to
94f6dcf
Compare
94f6dcf
to
27174ea
Compare
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 240 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeForwardingRule_update|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccHealthcareFhirStore_healthcareFhirStoreNotificationConfigExample |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
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.
Tests are good, thank you for the update. I think all this is now missing is some documentation about the datasource (html.markdown file in https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/website/docs/d) and a changelog note added about the datasource
…fhir-store-notification
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 240 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
…fhir-store-notification
…fhir-store-notification
…fhir-store-notification
…fhir-store-notification
…fhir-store-notification
…fhir-store-notification
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 2 files changed, 120 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
Hi @c2thorn , I noticed that it's not the first time that cloud healthcare uses pubsub topic so I suspect that there's actually some setup that allows me to add the new field without doing the whole data source thing. Currently I can see one test failing, which is the VCR-test, is this test related the things I've added? |
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.
Test is unrelated, and this PR LGTM without the datasource. I'll approve and merge
Link: https://cloud.google.com/healthcare-api/docs/how-tos/pubsub#fhir_notifications_containing_fhir_resource_data
Fix: hashicorp/terraform-provider-google#12061
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)