Terraform module which creates Pub/Sub resources on Google Cloud Platform.
These types of resources are supported:
This module is meant for use with Terraform 0.12. If you haven't upgraded and need a Terraform 0.11.x-compatible version of this module, the last released version intended for Terraform 0.11.x is 2.0.0.
- terraform 0.12.x
- terraform-provider-google plugin v2.20.x or higher
e.g.: pubsub.tf
module "pubsub_module_name" {
source = "github.com/russmedia/terraform-google-pubsub"
version = "3.0.0"
project = "workspace-name"
definition = {
"name" = ["my-topic-name"]
"pull" = [
{
"name" = "some-pull-subscription-name"
}
]
"push" = [
{
"name" = "my-subscription-name"
"url" = "https://www.domain.tld/endpoint"
},
]
}
}
and see a plan with following command terraform plan --out=.tfplan
. In case the output looks good you can apply with terraform apply ".tfplan"
.
For more usage examples go to Examples folder.
Note: You don't have to use *.tfvars file. It is just easier to switch when you have different data per environment.
- If used with IAM (e.g.: service account), this account has to be created before terraform runs plan for Pub/Sub.
Module managed by erento GmbH.