mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Add project field to iam pubsub topic resources (#1154)
* Add project field to iam pubsub topic resources * Update documentation
This commit is contained in:
parent
5f0808a13f
commit
35c2cb2abf
@ -15,6 +15,12 @@ var IamPubsubTopicSchema = map[string]*schema.Schema{
|
||||
ForceNew: true,
|
||||
DiffSuppressFunc: compareSelfLinkOrResourceName,
|
||||
},
|
||||
"project": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
}
|
||||
|
||||
type PubsubTopicIamUpdater struct {
|
||||
|
@ -139,13 +139,14 @@ resource "google_service_account" "test-account-1" {
|
||||
}
|
||||
|
||||
resource "google_pubsub_topic_iam_binding" "foo" {
|
||||
project = "%s"
|
||||
topic = "${google_pubsub_topic.topic.name}"
|
||||
role = "roles/pubsub.publisher"
|
||||
members = [
|
||||
"serviceAccount:${google_service_account.test-account-1.email}",
|
||||
]
|
||||
}
|
||||
`, topic, account)
|
||||
`, topic, account, getTestProjectFromEnv())
|
||||
}
|
||||
|
||||
func testAccPubsubTopicIamBinding_update(topic, account string) string {
|
||||
|
@ -64,6 +64,9 @@ The following arguments are supported:
|
||||
|
||||
* `topic` - (Required) The topic name or id to bind to attach IAM policy to.
|
||||
|
||||
* `project` - (Optional) The project in which the resource belongs. If it
|
||||
is not provided, the provider project is used.
|
||||
|
||||
* `member/members` - (Required) Identities that will be granted the privilege in `role`.
|
||||
Each entry can have one of the following values:
|
||||
* **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
|
||||
|
Loading…
Reference in New Issue
Block a user