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