Skip to content

Commit

Permalink
provider/vsphere: Rename insecure option
Browse files Browse the repository at this point in the history
  • Loading branch information
furukawataka02 committed Dec 2, 2015
1 parent d7e2223 commit 09fadce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions builtin/providers/vsphere/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ func Provider() terraform.ResourceProvider {
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("VSPHERE_USER", nil),
Description: "The user name for vSphere API operations.",
Description: "The user name for VMware vSphere API operations.",
},

"password": &schema.Schema{
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("VSPHERE_PASSWORD", nil),
Description: "The user password for vSphere API operations.",
Description: "The user password for VMware vSphere API operations.",
},

"vcenter_server": &schema.Schema{
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("VSPHERE_VCENTER", nil),
Description: "The vCenter Server name for vSphere API operations.",
Description: "The VMware vCenter Server name for VMware vSphere API operations.",
},

"insecure": &schema.Schema{
"allow_unverified_ssl": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("VSPHERE_INSECURE", false),
Description: "Explicitly allow the provider to perform 'insecure' SSL requests.",
DefaultFunc: schema.EnvDefaultFunc("VSPHERE_ALLOW_UNVERIFIED_SSL", false),
Description: "If set, VMware vSphere client will permit unverifiable SSL certificates.",
},
},

Expand All @@ -51,7 +51,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
User: d.Get("user").(string),
Password: d.Get("password").(string),
VCenterServer: d.Get("vcenter_server").(string),
InsecureFlag: d.Get("insecure").(bool),
InsecureFlag: d.Get("allow_unverified_ssl").(bool),
}

return config.Client()
Expand Down
7 changes: 5 additions & 2 deletions website/source/docs/providers/vsphere/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ The following arguments are used to configure the VMware vSphere Provider:
* `vcenter_server` - (Required) This is the vCenter server name for vSphere API
operations. Can also be specified with the `VSPHERE_VCENTER` environment
variable.
* `insecure` - (Optional) Explicitly allow the provider to perform "insecure"
SSL requests. If omitted, default value is `false`.
* `allow_unverified_ssl` - (Optional) Boolean that can be set to true to
disable SSL certificate verification. This should be used with care as it
could allow an attacker to intercept your auth token. If omitted, default
value is `false`. Can also be specified with the `VSPHERE_ALLOW_UNVERIFIED_SSL`
environment variable.

## Acceptance Tests

Expand Down

0 comments on commit 09fadce

Please sign in to comment.