-
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
Adding Eventarc-Workflows example for cgc docs #6279
Conversation
Hello! I am a robot who works on Magic Modules PRs. I've detected that you're a community contributor. @megan07, 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. |
Tests analyticsTotal tests: Errors occurred during REPLAYING mode. Please fix them to complete your PR |
/gcbrun |
mmv1/products/cgc/terraform.yaml
Outdated
# Eventarc | ||
### Eventarc Workflows quickstart | ||
- !ruby/object:Provider::Terraform::Examples | ||
name: "eventarc-workflows" |
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.
name: "eventarc-workflows" | |
name: "eventarc_workflows" |
We will want to use an underscore instead of the dash here, and we'll need to update the associated filename as well. Thanks!
Tests analyticsTotal tests: Errors occurred during REPLAYING mode. Please fix them to complete your PR |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample |
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.
Looks good so far, just a couple change requests. Thanks!
project = data.google_project.project.id | ||
role = "roles/logging.logWriter" | ||
|
||
members = [ |
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.
nit: would you mind lining up all these members
lists to line up with the other attributes and remove the extra whitespace? thanks!
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.
Done, thank you, Megan!
description = "A sample workflow" | ||
service_account = google_service_account.eventarc_workflows_service_account.id | ||
# Imported main workflow YAML file | ||
source_contents = templatefile("${path.module}/workflow.yaml",{}) |
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.
This file will need to exist in order for the test to pass. Would you be able to add the contents in like this?
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.
I have added the contents as a workflow.yaml file into the same directory since it has been referenced as a yaml file within the eventarc_workflows.tf.erb file. Could you please let me know if I did that right? Thanks!
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.
this is fine, I think you'll need to move the workflow.yaml
file to third_party/terraform/utils/test-fixtures/workflow.yaml
for it to work and then update the path here to be test-fixtures/workflow.yaml
source_contents = templatefile("${path.module}/workflow.yaml",{}) | |
source_contents = templatefile("test-fixtures/workflow.yaml",{}) |
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.
Updated, thank you! Please do let me know if this looks good.
@@ -0,0 +1,108 @@ | |||
# [START eventarc_terraform_enableapis] |
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.
this file can be removed in place of the new eventarc_workflows.tf.erb
file
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.
Done, thank you Megan.
mmv1/products/cgc/terraform.yaml
Outdated
pubsub_workflow_tf: "pubsub-workflow-tf" | ||
trigger_pubsub_workflow_tf: "trigger-pubsub-workflow-tf" | ||
min_version: beta | ||
# ignore_read_extra: |
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.
nit: these commented out lines can be removed i believe
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.
Done, thank you!
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccSqlUser_mysqlDisabled |
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 ( 1 file changed, 17 insertions(+)) |
Tests analyticsTotal tests: Action takenTriggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed testsTestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccFirebaserulesRelease_BasicRelease |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
description = "A sample workflow" | ||
service_account = google_service_account.eventarc_workflows_service_account.id | ||
# Imported main workflow YAML file | ||
source_contents = templatefile("$text-fixtures/workflow.yaml",{}) |
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.
source_contents = templatefile("$text-fixtures/workflow.yaml",{}) | |
source_contents = templatefile("test-fixtures/workflow.yaml",{}) |
we can just use the hard-coded path where it will live :)
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 1 file changed, 17 insertions(+)) |
description = "A sample workflow" | ||
service_account = google_service_account.eventarc_workflows_service_account.id | ||
# Imported main workflow YAML file | ||
source_contents = templatefile("text-fixtures/workflow.yaml",{}) |
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.
source_contents = templatefile("text-fixtures/workflow.yaml",{}) | |
source_contents = templatefile("test-fixtures/workflow.yaml",{}) |
sorry for the misunderstanding, I think you'll want test
here, not text
:)
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.
Oh gosh! I'm so sorry, I have corrected it now.
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.
no worries :) thanks!
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 1 file changed, 17 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|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccPrivatecaCertificateAuthority_subordinateCaActivatedByFirstPartyIssuerOnCreation|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlUser_mysqlDisabled |
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.
LGTM, thanks!!
Adding Eventarc-Workflows example for cgc docs that uses Terraform to invoke a workflow using Eventarc.