Skip to content

Conversation

q2w
Copy link
Collaborator

@q2w q2w commented Mar 13, 2025

This PR simply creates 2 modules,

  • pub modules creates topics and it's dependency
  • sub modules creates subscription and related iam bindings and other dependency.

We will have follow up PRs to add IAM more bindings in each of the modules and adding connection for ADC.

@q2w q2w force-pushed the submodules branch 7 times, most recently from 9e48feb to 77fe938 Compare March 14, 2025 13:14
@q2w q2w requested review from bharathkkb and ktinubu March 14, 2025 13:17
@q2w q2w marked this pull request as ready for review March 14, 2025 13:17
@q2w q2w requested review from a team, ayushmjain and imrannayer as code owners March 14, 2025 13:17
Copy link
Contributor

@ktinubu ktinubu Mar 14, 2025

Choose a reason for hiding this comment

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

Can you add an example of a push subscription that pushes to cloud run? the configuration should look something like:

  push_subscriptions = [{
    name                       = module.cloud-run-1.service_name
    oidc_service_account_email = module.cloud-run-1.service_account_id.email
    push_endpoint              = module.cloud-run-1.service_uri
  }]

You can look at the terraform generated from ADC as a reference

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can we do this in a follow-up PR? I want this PR to simply divide the current root module into two modules.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@ktinubu ktinubu Mar 14, 2025

Choose a reason for hiding this comment

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

Can you add an example of a pull subscription where the service account is set to the service account email of an instance template email

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can we do this in follow-up PR?

Copy link
Contributor

@ktinubu ktinubu left a comment

Choose a reason for hiding this comment

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

Left some comments regarding updating examples/tests and READMEs

@q2w q2w force-pushed the submodules branch 4 times, most recently from b353719 to ff63099 Compare March 17, 2025 06:51
@q2w q2w merged commit 0e44fc6 into terraform-google-modules:main Mar 17, 2025
4 checks passed
Comment on lines +17 to +25
output "topic" {
value = google_pubsub_topic.topic.name
description = "The name of the Pub/Sub topic"
}

output "topic_labels" {
value = google_pubsub_topic.topic.labels
description = "Labels assigned to the Pub/Sub topic"
}
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove these unless necessary since there are just redirecting inputs as outputs

q2w added a commit that referenced this pull request Mar 18, 2025
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.

3 participants