Merge branch 'dasch-dasch/google-pubsub-subscription-path'
This commit is contained in:
commit
2b606101e7
|
@ -38,6 +38,11 @@ func resourcePubsubSubscription() *schema.Resource {
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"path": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
|
||||||
"push_config": &schema.Schema{
|
"push_config": &schema.Schema{
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
@ -113,6 +118,7 @@ func resourcePubsubSubscriptionCreate(d *schema.ResourceData, meta interface{})
|
||||||
}
|
}
|
||||||
|
|
||||||
d.SetId(res.Name)
|
d.SetId(res.Name)
|
||||||
|
d.Set("path", name)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,12 @@ func TestAccPubsubSubscriptionCreate(t *testing.T) {
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
CheckDestroy: testAccCheckPubsubSubscriptionDestroy,
|
CheckDestroy: testAccCheckPubsubSubscriptionDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
resource.TestStep{
|
{
|
||||||
Config: testAccPubsubSubscription,
|
Config: testAccPubsubSubscription,
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccPubsubSubscriptionExists(
|
testAccPubsubSubscriptionExists(
|
||||||
"google_pubsub_subscription.foobar_sub"),
|
"google_pubsub_subscription.foobar_sub"),
|
||||||
|
resource.TestCheckResourceAttrSet("google_pubsub_subscription.foobar_sub", "path"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,4 +68,4 @@ The optional `push_config` block supports:
|
||||||
|
|
||||||
## Attributes Reference
|
## Attributes Reference
|
||||||
|
|
||||||
Only the arguments listed above are exposed as attributes.
|
* `path` - Path of the subscription in the format `projects/{project}/subscriptions/{sub}`
|
||||||
|
|
Loading…
Reference in New Issue