From 33eebbed510d4e44e99ded35ba67da64ac194a0d Mon Sep 17 00:00:00 2001 From: Julien Vey Date: Thu, 5 Feb 2015 11:37:52 +0100 Subject: [PATCH] provider/gce: Add description in firewall resource --- builtin/providers/google/resource_compute_firewall.go | 6 ++++++ builtin/providers/google/resource_compute_firewall_test.go | 2 ++ .../docs/providers/google/r/compute_firewall.html.markdown | 2 ++ 3 files changed, 10 insertions(+) diff --git a/builtin/providers/google/resource_compute_firewall.go b/builtin/providers/google/resource_compute_firewall.go index dfd020cc4..9cbe5b53b 100644 --- a/builtin/providers/google/resource_compute_firewall.go +++ b/builtin/providers/google/resource_compute_firewall.go @@ -26,6 +26,11 @@ func resourceComputeFirewall() *schema.Resource { ForceNew: true, }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "network": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -306,6 +311,7 @@ func resourceFirewall( // Build the firewall parameter return &compute.Firewall{ Name: d.Get("name").(string), + Description: d.Get("description").(string), Network: network.SelfLink, Allowed: allowed, SourceRanges: sourceRanges, diff --git a/builtin/providers/google/resource_compute_firewall_test.go b/builtin/providers/google/resource_compute_firewall_test.go index 58a6fd787..9bb92af20 100644 --- a/builtin/providers/google/resource_compute_firewall_test.go +++ b/builtin/providers/google/resource_compute_firewall_test.go @@ -126,6 +126,7 @@ resource "google_compute_network" "foobar" { resource "google_compute_firewall" "foobar" { name = "terraform-test" + description = "Resource created for Terraform acceptance testing" network = "${google_compute_network.foobar.name}" source_tags = ["foo"] @@ -142,6 +143,7 @@ resource "google_compute_network" "foobar" { resource "google_compute_firewall" "foobar" { name = "terraform-test" + description = "Resource created for Terraform acceptance testing" network = "${google_compute_network.foobar.name}" source_tags = ["foo"] diff --git a/website/source/docs/providers/google/r/compute_firewall.html.markdown b/website/source/docs/providers/google/r/compute_firewall.html.markdown index 638a4bfd2..f0ed797db 100644 --- a/website/source/docs/providers/google/r/compute_firewall.html.markdown +++ b/website/source/docs/providers/google/r/compute_firewall.html.markdown @@ -37,6 +37,8 @@ The following arguments are supported: * `name` - (Required) A unique name for the resource, required by GCE. 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. * `allow` - (Required) Can be specified multiple times for each allow