terraform-google-modules/terraform-google-pubsub

removing dead_letter_topic from subscription results in an error

mvanholsteijn opened this issue · 4 comments

When you remove the dead_letter_topic from the subscription specification, the module fails to revoke the binding from the service account on the DLQ:

  # module.pubsub["my-topic"].google_pubsub_topic_iam_member.pull_topic_binding[1] must be replaced
-/+ resource "google_pubsub_topic_iam_member" "pull_topic_binding" {
      ~ id      = "projects/my-project/topics/my-second-subscription-dlq/roles/pubsub.publisher/serviceaccount:service-123456789012@gcp-sa-pubsub.iam.gserviceaccount.com" -> (known after apply)
        member  = "serviceAccount:service-123456789012@gcp-sa-pubsub.iam.gserviceaccount.com"
        project = "my-project"
        role    = "roles/pubsub.publisher"
      - topic   = "projects/my-project/topics/my-second-subscription-dlq" -> null # forces replacement
    }

The error:

module.pubsub["my-topic"].google_pubsub_topic_iam_member.pull_topic_binding[1]: Creating...

Error: Import id "" doesn't match any of the accepted formats: [projects/(?P[^/]+)/topics/(?P[^/]+) (?P[^/]+)/(?P[^/]+) (?P[^/]+)]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

Th

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

I cannot remove the stale label from this issue. The problem still exists, it is just that the no reaction was received by the maintainers of this project.

I haven't been able to reproduce this.

If you cannot reproduce it, I will close it. It is been a while and I am not blocked by the problem.