Skip to content

Commit

Permalink
Merge pull request #10 from deseretdigital/feature-create-terraform-m…
Browse files Browse the repository at this point in the history
…odule-for-pub-sub-topics-sc-308777
  • Loading branch information
nathanknowles authored Nov 20, 2024
2 parents 7edaba6 + 36eca57 commit 07a5cd1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .terraform.docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
formatter: "md tbl"

output:
file: "./terraform-docs.md"
mode: replace
template: |-
{{ .Content }}
21 changes: 9 additions & 12 deletions resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ resource "google_pubsub_topic" "dead_letter_subscription_topic" {
labels = var.labels
}

resource "google_pubsub_topic_iam_binding" "assign_pubsub_publisher" {
topic = google_pubsub_topic.dead_letter_subscription_topic.id
role = "roles/pubsub.publisher"
members = [
"serviceAccount:${var.pubsub_service_account}",
]
resource "google_pubsub_topic_iam_member" "assign_pubsub_publisher" {
project = google_pubsub_topic.dead_letter_subscription_topic.project
topic = google_pubsub_topic.dead_letter_subscription_topic.id
role = "roles/pubsub.publisher"
member = "serviceAccount:${var.pubsub_service_account}"
}

resource "google_pubsub_topic_iam_binding" "assign_pubsub_subscriber" {
topic = google_pubsub_topic.dead_letter_subscription_topic.id
role = "roles/pubsub.subscriber"
members = [
"serviceAccount:${var.pubsub_service_account}",
]
resource "google_pubsub_subscription_iam_member" "assign_pubsub_subscriber" {
subscription = google_pubsub_subscription.subscription.id
role = "roles/pubsub.subscriber"
member = "serviceAccount:${var.pubsub_service_account}"
}

resource "google_pubsub_subscription" "dead_letter_subscription" {
Expand Down
2 changes: 0 additions & 2 deletions terraform-docs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Terraform-Docs

## Requirements

| Name | Version |
Expand Down

0 comments on commit 07a5cd1

Please sign in to comment.