-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ package clc | |
import ( | ||
"fmt" | ||
"log" | ||
"net/url" | ||
"strconv" | ||
|
||
clc "github.com/CenturyLinkCloud/clc-sdk" | ||
|
@@ -31,18 +30,6 @@ func Provider() terraform.ResourceProvider { | |
DefaultFunc: schema.EnvDefaultFunc("CLC_PASSWORD", nil), | ||
Description: "Your CLC password", | ||
}, | ||
"account": &schema.Schema{ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ack
Author
Owner
|
||
Type: schema.TypeString, | ||
Required: true, | ||
DefaultFunc: schema.EnvDefaultFunc("CLC_ACCOUNT", nil), | ||
Description: "Your CLC account alias", | ||
}, | ||
"url": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Description: "Base CLC API url", | ||
DefaultFunc: schema.EnvDefaultFunc("CLC_BASE_URL", nil), | ||
}, | ||
}, | ||
|
||
ResourcesMap: map[string]*schema.Resource{ | ||
|
@@ -65,12 +52,6 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { | |
if err != nil { | ||
return nil, fmt.Errorf("Failed to create CLC config with provided details: %v", err) | ||
} | ||
if urlStr := d.Get("url").(string); urlStr != "" { | ||
uri, err := url.Parse(urlStr) | ||
if err == nil { | ||
config.BaseURL = uri | ||
} | ||
} | ||
config.UserAgent = fmt.Sprintf("terraform-clc terraform/%s", terraform.Version) | ||
|
||
client := clc.New(config) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
@ack What was the logic behind removing this?
Reason I ask is that our model involves multiple sub-accounts to separate different env's (dev, test, prod etc) and without a way to programmatically provide the 'account', things get complicated...
Cheers
Gav