gofmt -w -s
This commit is contained in:
parent
9266e944fa
commit
50084f5b17
|
@ -20,49 +20,49 @@ import (
|
|||
func New() backend.Backend {
|
||||
s := &schema.Backend{
|
||||
Schema: map[string]*schema.Schema{
|
||||
"auth_url": &schema.Schema{
|
||||
"auth_url": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_AUTH_URL", ""),
|
||||
Description: descriptions["auth_url"],
|
||||
},
|
||||
|
||||
"user_id": &schema.Schema{
|
||||
"user_id": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_USER_ID", ""),
|
||||
Description: descriptions["user_name"],
|
||||
},
|
||||
|
||||
"user_name": &schema.Schema{
|
||||
"user_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_USERNAME", ""),
|
||||
Description: descriptions["user_name"],
|
||||
},
|
||||
|
||||
"application_credential_id": &schema.Schema{
|
||||
"application_credential_id": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_APPLICATION_CREDENTIAL_ID", ""),
|
||||
Description: descriptions["application_credential_id"],
|
||||
},
|
||||
|
||||
"application_credential_name": &schema.Schema{
|
||||
"application_credential_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_APPLICATION_CREDENTIAL_NAME", ""),
|
||||
Description: descriptions["application_credential_name"],
|
||||
},
|
||||
|
||||
"application_credential_secret": &schema.Schema{
|
||||
"application_credential_secret": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_APPLICATION_CREDENTIAL_SECRET", ""),
|
||||
Description: descriptions["application_credential_secret"],
|
||||
},
|
||||
|
||||
"tenant_id": &schema.Schema{
|
||||
"tenant_id": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
|
||||
|
@ -72,7 +72,7 @@ func New() backend.Backend {
|
|||
Description: descriptions["tenant_id"],
|
||||
},
|
||||
|
||||
"tenant_name": &schema.Schema{
|
||||
"tenant_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
|
||||
|
@ -82,7 +82,7 @@ func New() backend.Backend {
|
|||
Description: descriptions["tenant_name"],
|
||||
},
|
||||
|
||||
"password": &schema.Schema{
|
||||
"password": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Sensitive: true,
|
||||
|
@ -90,7 +90,7 @@ func New() backend.Backend {
|
|||
Description: descriptions["password"],
|
||||
},
|
||||
|
||||
"token": &schema.Schema{
|
||||
"token": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
|
||||
|
@ -100,104 +100,104 @@ func New() backend.Backend {
|
|||
Description: descriptions["token"],
|
||||
},
|
||||
|
||||
"user_domain_name": &schema.Schema{
|
||||
"user_domain_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_USER_DOMAIN_NAME", ""),
|
||||
Description: descriptions["user_domain_name"],
|
||||
},
|
||||
|
||||
"user_domain_id": &schema.Schema{
|
||||
"user_domain_id": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_USER_DOMAIN_ID", ""),
|
||||
Description: descriptions["user_domain_id"],
|
||||
},
|
||||
|
||||
"project_domain_name": &schema.Schema{
|
||||
"project_domain_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_PROJECT_DOMAIN_NAME", ""),
|
||||
Description: descriptions["project_domain_name"],
|
||||
},
|
||||
|
||||
"project_domain_id": &schema.Schema{
|
||||
"project_domain_id": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_PROJECT_DOMAIN_ID", ""),
|
||||
Description: descriptions["project_domain_id"],
|
||||
},
|
||||
|
||||
"domain_id": &schema.Schema{
|
||||
"domain_id": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_DOMAIN_ID", ""),
|
||||
Description: descriptions["domain_id"],
|
||||
},
|
||||
|
||||
"domain_name": &schema.Schema{
|
||||
"domain_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_DOMAIN_NAME", ""),
|
||||
Description: descriptions["domain_name"],
|
||||
},
|
||||
|
||||
"default_domain": &schema.Schema{
|
||||
"default_domain": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_DEFAULT_DOMAIN", "default"),
|
||||
Description: descriptions["default_domain"],
|
||||
},
|
||||
|
||||
"cloud": &schema.Schema{
|
||||
"cloud": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_CLOUD", ""),
|
||||
Description: descriptions["cloud"],
|
||||
},
|
||||
|
||||
"region_name": &schema.Schema{
|
||||
"region_name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_REGION_NAME", ""),
|
||||
Description: descriptions["region_name"],
|
||||
},
|
||||
|
||||
"insecure": &schema.Schema{
|
||||
"insecure": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_INSECURE", nil),
|
||||
Description: descriptions["insecure"],
|
||||
},
|
||||
|
||||
"endpoint_type": &schema.Schema{
|
||||
"endpoint_type": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_ENDPOINT_TYPE", ""),
|
||||
},
|
||||
|
||||
"cacert_file": &schema.Schema{
|
||||
"cacert_file": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_CACERT", ""),
|
||||
Description: descriptions["cacert_file"],
|
||||
},
|
||||
|
||||
"cert": &schema.Schema{
|
||||
"cert": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_CERT", ""),
|
||||
Description: descriptions["cert"],
|
||||
},
|
||||
|
||||
"key": &schema.Schema{
|
||||
"key": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("OS_KEY", ""),
|
||||
Description: descriptions["key"],
|
||||
},
|
||||
|
||||
"path": &schema.Schema{
|
||||
"path": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: descriptions["path"],
|
||||
|
@ -205,13 +205,13 @@ func New() backend.Backend {
|
|||
ConflictsWith: []string{"container"},
|
||||
},
|
||||
|
||||
"container": &schema.Schema{
|
||||
"container": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: descriptions["container"],
|
||||
},
|
||||
|
||||
"archive_path": &schema.Schema{
|
||||
"archive_path": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: descriptions["archive_path"],
|
||||
|
@ -219,26 +219,26 @@ func New() backend.Backend {
|
|||
ConflictsWith: []string{"archive_container"},
|
||||
},
|
||||
|
||||
"archive_container": &schema.Schema{
|
||||
"archive_container": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: descriptions["archive_container"],
|
||||
},
|
||||
|
||||
"expire_after": &schema.Schema{
|
||||
"expire_after": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: descriptions["expire_after"],
|
||||
},
|
||||
|
||||
"lock": &schema.Schema{
|
||||
"lock": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Description: "Lock state access",
|
||||
Default: true,
|
||||
},
|
||||
|
||||
"state_name": &schema.Schema{
|
||||
"state_name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: descriptions["state_name"],
|
||||
|
|
|
@ -63,7 +63,7 @@ func (b *Backend) Workspaces() ([]string, error) {
|
|||
result := make([]string, 1, len(envs)+1)
|
||||
result[0] = backend.DefaultStateName
|
||||
|
||||
for k, _ := range envs {
|
||||
for k := range envs {
|
||||
result = append(result, k)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue