This commit is contained in:
Jon Perritt 2015-01-27 10:19:11 -07:00
parent a707f8414c
commit 17b137c972
6 changed files with 15 additions and 17 deletions

View File

@ -32,9 +32,9 @@ func Provider() terraform.ResourceProvider {
Default: "",
},
"tenant_name": &schema.Schema{
Type: schema.TypeString,
Optional: true,
DefaultFunc: envDefaultFunc("OS_TENANT_NAME"),
Type: schema.TypeString,
Optional: true,
DefaultFunc: envDefaultFunc("OS_TENANT_NAME"),
},
"password": &schema.Schema{
Type: schema.TypeString,

View File

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform/terraform"
)
var (
OS_REGION_NAME = ""
)

View File

@ -36,15 +36,15 @@ func resourceComputeInstanceV2() *schema.Resource {
ForceNew: false,
},
"image_ref": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: false,
Type: schema.TypeString,
Required: true,
ForceNew: false,
DefaultFunc: envDefaultFunc("OS_IMAGE_ID"),
},
"flavor_ref": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: false,
Type: schema.TypeString,
Required: true,
ForceNew: false,
DefaultFunc: envDefaultFunc("OS_FLAVOR_ID"),
},
"security_groups": &schema.Schema{

View File

@ -73,7 +73,6 @@ func testAccCheckComputeV2InstanceExists(t *testing.T, n string, instance *serve
return fmt.Errorf("(testAccCheckComputeV2InstanceExists) Error creating OpenStack compute client: %s", err)
}
found, err := servers.Get(computeClient, rs.Primary.ID).Extract()
if err != nil {
return err
@ -120,4 +119,4 @@ var testAccComputeV2Instance_basic = fmt.Sprintf(`
foo = "bar"
}
}`,
OS_REGION_NAME)
OS_REGION_NAME)

View File

@ -169,7 +169,7 @@ func resourceLBVipV1Read(d *schema.ResourceData, meta interface{}) error {
}
if t, exists := d.GetOk("persistence"); exists && t != "" {
d.Set("persistence", p.Description)
d.Set("persistence", p.Description)
}
if t, exists := d.GetOk("conn_limit"); exists && t != "" {

View File

@ -20,9 +20,9 @@ func resourceNetworkingNetworkV2() *schema.Resource {
Schema: map[string]*schema.Schema{
"region": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DefaultFunc: envDefaultFunc("OS_REGION_NAME"),
},
"name": &schema.Schema{
@ -111,7 +111,7 @@ func resourceNetworkingNetworkV2Read(d *schema.ResourceData, meta interface{}) e
d.Set("region", d.Get("region").(string))
if t, exists := d.GetOk("name"); exists && t != ""{
if t, exists := d.GetOk("name"); exists && t != "" {
d.Set("name", n.Name)
} else {
d.Set("name", "")