Merge pull request #931 from julienvey/desc_firewall
provider/gce: Add description in firewall resource
This commit is contained in:
commit
5afed7e52b
|
@ -26,6 +26,11 @@ func resourceComputeFirewall() *schema.Resource {
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"description": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Optional: true,
|
||||||
|
},
|
||||||
|
|
||||||
"network": &schema.Schema{
|
"network": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
|
@ -306,6 +311,7 @@ func resourceFirewall(
|
||||||
// Build the firewall parameter
|
// Build the firewall parameter
|
||||||
return &compute.Firewall{
|
return &compute.Firewall{
|
||||||
Name: d.Get("name").(string),
|
Name: d.Get("name").(string),
|
||||||
|
Description: d.Get("description").(string),
|
||||||
Network: network.SelfLink,
|
Network: network.SelfLink,
|
||||||
Allowed: allowed,
|
Allowed: allowed,
|
||||||
SourceRanges: sourceRanges,
|
SourceRanges: sourceRanges,
|
||||||
|
|
|
@ -126,6 +126,7 @@ resource "google_compute_network" "foobar" {
|
||||||
|
|
||||||
resource "google_compute_firewall" "foobar" {
|
resource "google_compute_firewall" "foobar" {
|
||||||
name = "terraform-test"
|
name = "terraform-test"
|
||||||
|
description = "Resource created for Terraform acceptance testing"
|
||||||
network = "${google_compute_network.foobar.name}"
|
network = "${google_compute_network.foobar.name}"
|
||||||
source_tags = ["foo"]
|
source_tags = ["foo"]
|
||||||
|
|
||||||
|
@ -142,6 +143,7 @@ resource "google_compute_network" "foobar" {
|
||||||
|
|
||||||
resource "google_compute_firewall" "foobar" {
|
resource "google_compute_firewall" "foobar" {
|
||||||
name = "terraform-test"
|
name = "terraform-test"
|
||||||
|
description = "Resource created for Terraform acceptance testing"
|
||||||
network = "${google_compute_network.foobar.name}"
|
network = "${google_compute_network.foobar.name}"
|
||||||
source_tags = ["foo"]
|
source_tags = ["foo"]
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ The following arguments are supported:
|
||||||
* `name` - (Required) A unique name for the resource, required by GCE.
|
* `name` - (Required) A unique name for the resource, required by GCE.
|
||||||
Changing this forces a new resource to be created.
|
Changing this forces a new resource to be created.
|
||||||
|
|
||||||
|
* `description` - (Optional) Textual description field.
|
||||||
|
|
||||||
* `network` - (Required) The name of the network to attach this firewall to.
|
* `network` - (Required) The name of the network to attach this firewall to.
|
||||||
|
|
||||||
* `allow` - (Required) Can be specified multiple times for each allow
|
* `allow` - (Required) Can be specified multiple times for each allow
|
||||||
|
|
Loading…
Reference in New Issue