Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Fix type for enabled kong_api_plugin resources (#10)
Browse files Browse the repository at this point in the history
* Fix type for enabled kong_api_plugin resources

* Fix whitespace
  • Loading branch information
pfitzsimons-r7 authored May 24, 2018
1 parent b5dfe21 commit 4bcd17f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kong/resource_kong_api_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Plugin struct {
Configuration map[string]interface{} `json:"config,omitempty"`
API string `json:"api_id,omitempty"`
Consumer string `json:"consumer_id,omitempty"`
Enabled string `json:"enabled,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}

func resourceKongPlugin() *schema.Resource {
Expand All @@ -33,7 +33,7 @@ func resourceKongPlugin() *schema.Resource {

Schema: map[string]*schema.Schema{
"enabled": &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeBool,
Optional: true,
Default: true,
Description: "Whether to enabled this plugin.",
Expand Down Expand Up @@ -246,7 +246,7 @@ func getPluginFromResourceData(d *schema.ResourceData) (*Plugin, error) {
Name: d.Get("name").(string),
API: d.Get("api").(string),
Consumer: d.Get("consumer").(string),
Enabled: d.Get("enabled").(string),
Enabled: d.Get("enabled").(bool),
}

config, err := getPluginConfig(d)
Expand Down

0 comments on commit 4bcd17f

Please sign in to comment.