mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Merge pull request #1784 from danawillow/is-1715
force send a bunch more fields in firewall
This commit is contained in:
commit
4e0a4ef84b
@ -418,6 +418,6 @@ func resourceFirewall(d *schema.ResourceData, meta interface{}) (*computeBeta.Fi
|
||||
SourceServiceAccounts: convertStringSet(d.Get("source_service_accounts").(*schema.Set)),
|
||||
TargetServiceAccounts: convertStringSet(d.Get("target_service_accounts").(*schema.Set)),
|
||||
Disabled: d.Get("disabled").(bool),
|
||||
ForceSendFields: []string{"Disabled"},
|
||||
ForceSendFields: []string{"Disabled", "Allowed", "Denied", "SourceRanges", "SourceTags", "DestinationRanges", "TargetTags"},
|
||||
}, nil
|
||||
}
|
||||
|
@ -63,6 +63,11 @@ func TestAccComputeFirewall_update(t *testing.T) {
|
||||
testAccCheckComputeFirewallApiVersion(&firewall),
|
||||
),
|
||||
},
|
||||
{
|
||||
ResourceName: "google_compute_firewall.foobar",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
resource.TestStep{
|
||||
Config: testAccComputeFirewall_update(networkName, firewallName),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
@ -73,6 +78,24 @@ func TestAccComputeFirewall_update(t *testing.T) {
|
||||
testAccCheckComputeFirewallApiVersion(&firewall),
|
||||
),
|
||||
},
|
||||
{
|
||||
ResourceName: "google_compute_firewall.foobar",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
resource.TestStep{
|
||||
Config: testAccComputeFirewall_basic(networkName, firewallName),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckComputeFirewallExists(
|
||||
"google_compute_firewall.foobar", &firewall),
|
||||
testAccCheckComputeFirewallApiVersion(&firewall),
|
||||
),
|
||||
},
|
||||
{
|
||||
ResourceName: "google_compute_firewall.foobar",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -454,6 +477,7 @@ func testAccComputeFirewall_update(network, firewall string) string {
|
||||
description = "Resource created for Terraform acceptance testing"
|
||||
network = "${google_compute_network.foobar.self_link}"
|
||||
source_tags = ["foo"]
|
||||
target_tags = ["bar"]
|
||||
|
||||
allow {
|
||||
protocol = "tcp"
|
||||
|
Loading…
Reference in New Issue
Block a user