provider/google: Remove redundant type declaration

This commit cleans up the google_compute_firewall resource to the Go
1.5+ style of not requiring map values to declare their type if they can
be inferred.
This commit is contained in:
James Nugent 2016-08-22 19:27:36 +02:00
parent ba76ac0788
commit c2dc0479a7

View File

@ -26,29 +26,29 @@ func resourceComputeFirewall() *schema.Resource {
MigrateState: resourceComputeFirewallMigrateState, MigrateState: resourceComputeFirewallMigrateState,
Schema: map[string]*schema.Schema{ Schema: map[string]*schema.Schema{
"name": &schema.Schema{ "name": {
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
ForceNew: true, ForceNew: true,
}, },
"network": &schema.Schema{ "network": {
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
ForceNew: true, ForceNew: true,
}, },
"allow": &schema.Schema{ "allow": {
Type: schema.TypeSet, Type: schema.TypeSet,
Required: true, Required: true,
Elem: &schema.Resource{ Elem: &schema.Resource{
Schema: map[string]*schema.Schema{ Schema: map[string]*schema.Schema{
"protocol": &schema.Schema{ "protocol": {
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
}, },
"ports": &schema.Schema{ "ports": {
Type: schema.TypeList, Type: schema.TypeList,
Optional: true, Optional: true,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},
@ -58,38 +58,38 @@ func resourceComputeFirewall() *schema.Resource {
Set: resourceComputeFirewallAllowHash, Set: resourceComputeFirewallAllowHash,
}, },
"description": &schema.Schema{ "description": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
}, },
"project": &schema.Schema{ "project": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
ForceNew: true, ForceNew: true,
Computed: true, Computed: true,
}, },
"self_link": &schema.Schema{ "self_link": {
Type: schema.TypeString, Type: schema.TypeString,
Computed: true, Computed: true,
}, },
"source_ranges": &schema.Schema{ "source_ranges": {
Type: schema.TypeSet, Type: schema.TypeSet,
Optional: true, Optional: true,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString, Set: schema.HashString,
}, },
"source_tags": &schema.Schema{ "source_tags": {
Type: schema.TypeSet, Type: schema.TypeSet,
Optional: true, Optional: true,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString, Set: schema.HashString,
}, },
"target_tags": &schema.Schema{ "target_tags": {
Type: schema.TypeSet, Type: schema.TypeSet,
Optional: true, Optional: true,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},