Skip to content

Commit

Permalink
provider/google: Remove redundant type declaration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jen20 committed Aug 23, 2016
1 parent 78a96f5 commit 5c83ca7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions builtin/providers/google/resource_compute_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ func resourceComputeFirewall() *schema.Resource {
MigrateState: resourceComputeFirewallMigrateState,

Schema: map[string]*schema.Schema{
"name": &schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"network": &schema.Schema{
"network": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"allow": &schema.Schema{
"allow": {
Type: schema.TypeSet,
Required: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"protocol": &schema.Schema{
"protocol": {
Type: schema.TypeString,
Required: true,
},

"ports": &schema.Schema{
"ports": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Expand All @@ -58,38 +58,38 @@ func resourceComputeFirewall() *schema.Resource {
Set: resourceComputeFirewallAllowHash,
},

"description": &schema.Schema{
"description": {
Type: schema.TypeString,
Optional: true,
},

"project": &schema.Schema{
"project": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},

"self_link": &schema.Schema{
"self_link": {
Type: schema.TypeString,
Computed: true,
},

"source_ranges": &schema.Schema{
"source_ranges": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},

"source_tags": &schema.Schema{
"source_tags": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},

"target_tags": &schema.Schema{
"target_tags": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Expand Down

0 comments on commit 5c83ca7

Please sign in to comment.