main 4.5.0
Nikita Sorokin 1 year ago
parent 2bc0fbae9a
commit 294680282e

@ -1,5 +1,8 @@
## Version 4.5.0-alfa ## Version 4.5.0
## Feature
- Added support for authorization using the Basis.Virtual Security system. Add client and config
### Bugfix ### Bugfix
- Fixed bservice and rg schema and flatten - Fixed bservice and rg schema and flatten in cloudapi
- Add stateUpgrader for k8s_cp - Add stateUpgrader for k8s_cp in cloudapi/k8s

@ -7,7 +7,7 @@ ZIPDIR = ./zip
BINARY=${NAME} BINARY=${NAME}
WORKPATH= ./examples/terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAMESPACE}/${VERSION}/${OS_ARCH} WORKPATH= ./examples/terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAMESPACE}/${VERSION}/${OS_ARCH}
MAINPATH = ./cmd/decort/ MAINPATH = ./cmd/decort/
VERSION=4.5.0-alfa VERSION=4.5.0
OS_ARCH=$(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH) OS_ARCH=$(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH)
FILES = ${BINARY}_${VERSION}_darwin_amd64\ FILES = ${BINARY}_${VERSION}_darwin_amd64\

@ -6,6 +6,7 @@ Terraform provider для платформы Digital Energy Cloud Orchestration
| Версия DECORT API | Версия провайдера Terraform | | Версия DECORT API | Версия провайдера Terraform |
| ------ | ------ | | ------ | ------ |
| 3.8.9 | 4.5.x |
| 3.8.8 | 4.4.x | | 3.8.8 | 4.4.x |
| 3.8.7 | 4.3.x | | 3.8.7 | 4.3.x |
| 3.8.6 | 4.0.x, 4.1.x, 4.2.x | | 3.8.6 | 4.0.x, 4.1.x, 4.2.x |
@ -89,7 +90,7 @@ terraform {
9. Добавьте в файл блок с инициализацией провайдера. 9. Добавьте в файл блок с инициализацией провайдера.
```terraform ```terraform
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://mr4.digitalenergy.online"
oauth2_url = "https://sso.digitalenergy.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
@ -175,7 +176,7 @@ ${host_name}/${namespace}/${type}
8. Добавьте в файл блок с инициализацией провайдера. 8. Добавьте в файл блок с инициализацией провайдера.
```terraform ```terraform
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://mr4.digitalenergy.online"
oauth2_url = "https://sso.digitalenergy.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true

@ -9,7 +9,8 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
github.com/sirupsen/logrus v1.9.0 github.com/sirupsen/logrus v1.9.0
golang.org/x/net v0.16.0 golang.org/x/net v0.16.0
repository.basistech.ru/BASIS/decort-golang-sdk v1.6.9 golang.org/x/oauth2 v0.13.0
repository.basistech.ru/BASIS/decort-golang-sdk v1.7.0
) )
require ( require (
@ -68,7 +69,6 @@ require (
github.com/vmihailenco/tagparser v0.1.2 // indirect github.com/vmihailenco/tagparser v0.1.2 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect github.com/zclconf/go-cty v1.12.1 // indirect
golang.org/x/crypto v0.14.0 // indirect golang.org/x/crypto v0.14.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sys v0.13.0 // indirect golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine v1.6.7 // indirect

@ -341,5 +341,5 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
repository.basistech.ru/BASIS/decort-golang-sdk v1.6.9 h1:FaQQol7gx4i/IzaScGbiVxJpLkBOgG2bOp+De1kW0hY= repository.basistech.ru/BASIS/decort-golang-sdk v1.7.0 h1:aGDg9hQXs70m4Llx8hw9Y50M1C2apDqSsNMsE8isyIM=
repository.basistech.ru/BASIS/decort-golang-sdk v1.6.9/go.mod h1:mwcpnw0dT/PQf6AOJShjlbDNDfNitr0WM77LNKL1qjo= repository.basistech.ru/BASIS/decort-golang-sdk v1.7.0/go.mod h1:mwcpnw0dT/PQf6AOJShjlbDNDfNitr0WM77LNKL1qjo=

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved. Copyright (c) 2019-2023 Digital Energy Cloud Solutions LLC. All Rights Reserved.
Authors: Authors:
Petr Krutov, <petr.krutov@digitalenergy.online> Petr Krutov, <petr.krutov@digitalenergy.online>
Stanislav Solovev, <spsolovev@digitalenergy.online> Stanislav Solovev, <spsolovev@digitalenergy.online>
@ -24,15 +24,15 @@ import (
"bytes" "bytes"
"crypto/tls" "crypto/tls"
"fmt" "fmt"
"io/ioutil" "io"
"net/http" "net/http"
"net/url" "net/url"
"strconv" "strconv"
"strings" "strings"
// "time"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"golang.org/x/oauth2"
decort "repository.basistech.ru/BASIS/decort-golang-sdk" decort "repository.basistech.ru/BASIS/decort-golang-sdk"
"repository.basistech.ru/BASIS/decort-golang-sdk/config" "repository.basistech.ru/BASIS/decort-golang-sdk/config"
"repository.basistech.ru/BASIS/decort-golang-sdk/interfaces" "repository.basistech.ru/BASIS/decort-golang-sdk/interfaces"
@ -46,24 +46,29 @@ import (
// enumerated constants that define authentication modes // enumerated constants that define authentication modes
const ( const (
MODE_UNDEF = iota // this is the invalid mode - it should never be seen MODE_UNDEF = iota // this is the invalid mode - it should never be seen
MODE_LEGACY = iota MODE_LEGACY
MODE_OAUTH2 = iota MODE_DECS3O
MODE_JWT = iota MODE_JWT
MODE_BVS
) )
type ControllerCfg struct { type ControllerCfg struct {
controller_url string // always required controller_url string // always required
auth_mode_code int // always required auth_mode_code int // always required
auth_mode_txt string // always required, it is a text representation of auth mode auth_mode_txt string // always required, it is a text representation of auth mode
bvs_user string // required for bvs mode
bvs_password string // required for bvs mode
domain string // required for bvs mode
token oauth2.Token // obtained from BVS provider on successful login in bvs mode
legacy_user string // required for legacy mode legacy_user string // required for legacy mode
legacy_password string // required for legacy mode legacy_password string // required for legacy mode
legacy_sid string // obtained from DECORT controller on successful login in legacy mode legacy_sid string // obtained from DECORT controller on successful login in legacy mode
jwt string // obtained from Outh2 provider on successful login in oauth2 mode, required in jwt mode jwt string // obtained from Outh2 provider on successful login in decs3o mode, required in jwt mode
app_id string // required for oauth2 mode app_id string // required for decs3o and bvs mode
app_secret string // required for oauth2 mode app_secret string // required for decs3o and bvs mode
oauth2_url string // always required oauth2_url string // required for decs3o and bvs mode
decort_username string // assigned to either legacy_user (legacy mode) or Oauth2 user (oauth2 mode) upon successful verification decort_username string // assigned to either legacy_user (legacy mode) or Oauth2 user (decs3o mode) upon successful verification
cc_client *http.Client // assigned when all initial checks successfully passed cc_client *http.Client // assigned when all initial checks successfully passed
caller interfaces.Caller caller interfaces.Caller
} }
@ -86,17 +91,21 @@ func ControllerConfigure(d *schema.ResourceData) (*ControllerCfg, error) {
legacy_user: d.Get("user").(string), legacy_user: d.Get("user").(string),
legacy_password: d.Get("password").(string), legacy_password: d.Get("password").(string),
legacy_sid: "", legacy_sid: "",
bvs_user: d.Get("bvs_user").(string),
bvs_password: d.Get("bvs_password").(string),
domain: d.Get("domain").(string),
jwt: d.Get("jwt").(string), jwt: d.Get("jwt").(string),
app_id: d.Get("app_id").(string), app_id: d.Get("app_id").(string),
app_secret: d.Get("app_secret").(string), app_secret: d.Get("app_secret").(string),
oauth2_url: d.Get("oauth2_url").(string), oauth2_url: d.Get("oauth2_url").(string),
decort_username: "", decort_username: "",
token: oauth2.Token{},
} }
allow_unverified_ssl := d.Get("allow_unverified_ssl").(bool) allow_unverified_ssl := d.Get("allow_unverified_ssl").(bool)
if ret_config.controller_url == "" { if ret_config.controller_url == "" {
return nil, fmt.Errorf("Empty DECORT cloud controller URL provided.") return nil, fmt.Errorf("empty DECORT cloud controller URL provided")
} }
// this should have already been done by StateFunc defined in Schema, but we want to be sure // this should have already been done by StateFunc defined in Schema, but we want to be sure
@ -105,33 +114,53 @@ func ControllerConfigure(d *schema.ResourceData) (*ControllerCfg, error) {
switch ret_config.auth_mode_txt { switch ret_config.auth_mode_txt {
case "jwt": case "jwt":
if ret_config.jwt == "" { if ret_config.jwt == "" {
return nil, fmt.Errorf("Authenticator mode 'jwt' specified but no JWT provided.") return nil, fmt.Errorf("authenticator mode 'jwt' specified but no JWT provided")
} }
ret_config.auth_mode_code = MODE_JWT ret_config.auth_mode_code = MODE_JWT
case "oauth2": case "decs3o":
if ret_config.oauth2_url == "" { if ret_config.oauth2_url == "" {
return nil, fmt.Errorf("Authenticator mode 'oauth2' specified but no OAuth2 URL provided.") return nil, fmt.Errorf("authenticator mode 'decs3o' specified but no OAuth2 URL provided")
} }
if ret_config.app_id == "" { if ret_config.app_id == "" {
return nil, fmt.Errorf("Authenticator mode 'oauth2' specified but no Application ID provided.") return nil, fmt.Errorf("authenticator mode 'decs3o' specified but no Application ID provided")
} }
if ret_config.app_secret == "" { if ret_config.app_secret == "" {
return nil, fmt.Errorf("Authenticator mode 'oauth2' specified but no Secret ID provided.") return nil, fmt.Errorf("authenticator mode 'decs3o' specified but no Secret ID provided")
} }
ret_config.auth_mode_code = MODE_OAUTH2 ret_config.auth_mode_code = MODE_DECS3O
case "legacy": case "legacy":
// //
ret_config.legacy_user = d.Get("user").(string) ret_config.legacy_user = d.Get("user").(string)
if ret_config.legacy_user == "" { if ret_config.legacy_user == "" {
return nil, fmt.Errorf("Authenticator mode 'legacy' specified but no user provided.") return nil, fmt.Errorf("authenticator mode 'legacy' specified but no user provided")
} }
ret_config.legacy_password = d.Get("password").(string) ret_config.legacy_password = d.Get("password").(string)
if ret_config.legacy_password == "" { if ret_config.legacy_password == "" {
return nil, fmt.Errorf("Authenticator mode 'legacy' specified but no password provided.") return nil, fmt.Errorf("authenticator mode 'legacy' specified but no password provided")
} }
ret_config.auth_mode_code = MODE_LEGACY ret_config.auth_mode_code = MODE_LEGACY
case "bvs":
if ret_config.bvs_user == "" {
return nil, fmt.Errorf("authenticator mode 'bvs' specified but no user provided")
}
if ret_config.bvs_password == "" {
return nil, fmt.Errorf("authenticator mode 'bvs' specified but no password provided")
}
if ret_config.oauth2_url == "" {
return nil, fmt.Errorf("authenticator mode 'bvs' specified but no bvs URL provided")
}
if ret_config.app_id == "" {
return nil, fmt.Errorf("authenticator mode 'bvs' specified but no Application ID provided")
}
if ret_config.app_secret == "" {
return nil, fmt.Errorf("authenticator mode 'bvs' specified but no Secret ID provided")
}
if ret_config.domain == "" {
return nil, fmt.Errorf("authenticator mode 'bvs' specified but no Domain provided")
}
ret_config.auth_mode_code = MODE_BVS
default: default:
return nil, fmt.Errorf("Unknown authenticator mode %q provided.", ret_config.auth_mode_txt) return nil, fmt.Errorf("unknown authenticator mode %q provided", ret_config.auth_mode_txt)
} }
if allow_unverified_ssl { if allow_unverified_ssl {
@ -167,10 +196,10 @@ func ControllerConfigure(d *schema.ResourceData) (*ControllerCfg, error) {
if !ok { if !ok {
return nil, err return nil, err
} }
case MODE_OAUTH2: case MODE_DECS3O:
// on success getOAuth2JWT will set config.jwt to the obtained JWT, so there is no // on success getDECS3OJWT will set config.jwt to the obtained JWT, so there is no
// need to set it once again here // need to set it once again here
_, err := ret_config.getOAuth2JWT() _, err := ret_config.getDECS3OJWT()
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -189,7 +218,7 @@ func ControllerConfigure(d *schema.ResourceData) (*ControllerCfg, error) {
tbuf.WriteString(claims["iss"].(string)) tbuf.WriteString(claims["iss"].(string))
ret_config.decort_username = tbuf.String() ret_config.decort_username = tbuf.String()
} else { } else {
return nil, fmt.Errorf("Failed to extract user and iss fields from JWT token in oauth2 mode.") return nil, fmt.Errorf("failed to extract user and iss fields from JWT token in oauth2 mode")
} }
sdkConf := config.Config{ sdkConf := config.Config{
@ -201,10 +230,24 @@ func ControllerConfigure(d *schema.ResourceData) (*ControllerCfg, error) {
} }
ret_config.caller = decort.New(sdkConf) ret_config.caller = decort.New(sdkConf)
case MODE_BVS:
sdkConf := config.BVSConfig{
AppID: ret_config.app_id,
AppSecret: ret_config.app_secret,
SSOURL: ret_config.oauth2_url,
DecortURL: ret_config.controller_url,
SSLSkipVerify: allow_unverified_ssl,
Username: ret_config.bvs_user,
Password: ret_config.bvs_password,
Domain: ret_config.domain,
Token: ret_config.token,
}
ret_config.caller = decort.NewBVS(sdkConf)
default: default:
// FYI, this should never happen due to all above checks, but we want to be fool proof // FYI, this should never happen due to all above checks, but we want to be fool proof
return nil, fmt.Errorf("Unknown authenticator mode code %d provided.", ret_config.auth_mode_code) return nil, fmt.Errorf("unknown authenticator mode code %d provided", ret_config.auth_mode_code)
} }
// All checks passed successfully, credentials corresponding to the selected authenticator mode // All checks passed successfully, credentials corresponding to the selected authenticator mode
@ -216,13 +259,13 @@ func (config *ControllerCfg) GetDecortUsername() string {
return config.decort_username return config.decort_username
} }
func (config *ControllerCfg) getOAuth2JWT() (string, error) { func (config *ControllerCfg) getDECS3OJWT() (string, error) {
// Obtain JWT from the Oauth2 provider using application ID and application secret provided in config. // Obtain JWT from the Oauth2 provider using application ID and application secret provided in config.
if config.auth_mode_code == MODE_UNDEF { if config.auth_mode_code == MODE_UNDEF {
return "", fmt.Errorf("getOAuth2JWT method called for undefined authorization mode.") return "", fmt.Errorf("getOAuth2JWT method called for undefined authorization mode")
} }
if config.auth_mode_code != MODE_OAUTH2 { if config.auth_mode_code != MODE_DECS3O {
return "", fmt.Errorf("getOAuth2JWT method called for incompatible authorization mode %q.", config.auth_mode_txt) return "", fmt.Errorf("getOAuth2JWT method called for incompatible authorization mode %q", config.auth_mode_txt)
} }
params := url.Values{} params := url.Values{}
@ -253,7 +296,7 @@ func (config *ControllerCfg) getOAuth2JWT() (string, error) {
} }
defer resp.Body.Close() defer resp.Body.Close()
responseData, err := ioutil.ReadAll(resp.Body) responseData, err := io.ReadAll(resp.Body)
if err != nil { if err != nil {
return "", err return "", err
} }
@ -273,13 +316,13 @@ func (config *ControllerCfg) validateJWT(jwt string) (bool, error) {
*/ */
if jwt == "" { if jwt == "" {
if config.jwt == "" { if config.jwt == "" {
return false, fmt.Errorf("validateJWT method called, but no meaningful JWT provided.") return false, fmt.Errorf("validateJWT method called, but no meaningful JWT provided")
} }
jwt = config.jwt jwt = config.jwt
} }
if config.oauth2_url == "" { if config.oauth2_url == "" {
return false, fmt.Errorf("validateJWT method called, but no OAuth2 URL provided.") return false, fmt.Errorf("validateJWT method called, but no OAuth2 URL provided")
} }
req, err := http.NewRequest("POST", config.controller_url+"/restmachine/cloudapi/account/list", nil) req, err := http.NewRequest("POST", config.controller_url+"/restmachine/cloudapi/account/list", nil)
@ -296,7 +339,7 @@ func (config *ControllerCfg) validateJWT(jwt string) (bool, error) {
return false, err return false, err
} }
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return false, fmt.Errorf("validateJWT: unexpected status code %d when validating JWT against %q.", return false, fmt.Errorf("validateJWT: unexpected status code %d when validating JWT against %q",
resp.StatusCode, req.URL) resp.StatusCode, req.URL)
} }
defer resp.Body.Close() defer resp.Body.Close()
@ -312,10 +355,10 @@ func (config *ControllerCfg) validateLegacyUser() (bool, error) {
reason, the method will return false and error. reason, the method will return false and error.
*/ */
if config.auth_mode_code == MODE_UNDEF { if config.auth_mode_code == MODE_UNDEF {
return false, fmt.Errorf("validateLegacyUser method called for undefined authorization mode.") return false, fmt.Errorf("validateLegacyUser method called for undefined authorization mode")
} }
if config.auth_mode_code != MODE_LEGACY { if config.auth_mode_code != MODE_LEGACY {
return false, fmt.Errorf("validateLegacyUser method called for incompatible authorization mode %q.", config.auth_mode_txt) return false, fmt.Errorf("validateLegacyUser method called for incompatible authorization mode %q", config.auth_mode_txt)
} }
params := url.Values{} params := url.Values{}
@ -336,12 +379,12 @@ func (config *ControllerCfg) validateLegacyUser() (bool, error) {
return false, err return false, err
} }
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return false, fmt.Errorf("validateLegacyUser: unexpected status code %d when validating legacy user %q against %q.", return false, fmt.Errorf("validateLegacyUser: unexpected status code %d when validating legacy user %q against %q",
resp.StatusCode, config.legacy_user, config.controller_url) resp.StatusCode, config.legacy_user, config.controller_url)
} }
defer resp.Body.Close() defer resp.Body.Close()
responseData, err := ioutil.ReadAll(resp.Body) responseData, err := io.ReadAll(req.Body)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
@ -353,21 +396,32 @@ func (config *ControllerCfg) validateLegacyUser() (bool, error) {
} }
func (config *ControllerCfg) CloudAPI() *cloudapi.CloudAPI { func (config *ControllerCfg) CloudAPI() *cloudapi.CloudAPI {
if config.auth_mode_code == MODE_LEGACY { switch config.auth_mode_code {
case MODE_LEGACY:
client, _ := config.caller.(*decort.LegacyDecortClient) client, _ := config.caller.(*decort.LegacyDecortClient)
return client.CloudAPI() return client.CloudAPI()
case MODE_DECS3O:
client, _ := config.caller.(*decort.DecortClient)
return client.CloudAPI()
case MODE_BVS:
client, _ := config.caller.(*decort.BVSDecortClient)
return client.CloudAPI()
default:
return &cloudapi.CloudAPI{}
} }
client, _ := config.caller.(*decort.DecortClient)
return client.CloudAPI()
} }
func (config *ControllerCfg) CloudBroker() *cloudbroker.CloudBroker { func (config *ControllerCfg) CloudBroker() *cloudbroker.CloudBroker {
if config.auth_mode_code == MODE_LEGACY { switch config.auth_mode_code {
case MODE_LEGACY:
client, _ := config.caller.(*decort.LegacyDecortClient) client, _ := config.caller.(*decort.LegacyDecortClient)
return client.CloudBroker() return client.CloudBroker()
case MODE_DECS3O:
client, _ := config.caller.(*decort.DecortClient)
return client.CloudBroker()
case MODE_BVS:
client, _ := config.caller.(*decort.BVSDecortClient)
return client.CloudBroker()
default:
return &cloudbroker.CloudBroker{}
} }
client, _ := config.caller.(*decort.DecortClient)
return client.CloudBroker()
} }

@ -40,8 +40,8 @@ func Provider() *schema.Provider {
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
StateFunc: statefuncs.StateFuncToLower, StateFunc: statefuncs.StateFuncToLower,
ValidateFunc: validation.StringInSlice([]string{"oauth2", "legacy", "jwt"}, true), // ignore case while validating ValidateFunc: validation.StringInSlice([]string{"decs3o", "legacy", "jwt", "bvs"}, true), // ignore case while validating
Description: "Authentication mode to use when connecting to DECORT cloud API. Should be one of 'oauth2', 'legacy' or 'jwt'.", Description: "Authentication mode to use when connecting to DECORT cloud API. Should be one of 'decs3o', 'legacy', 'jwt' or 'bvs'.",
}, },
"oauth2_url": { "oauth2_url": {
@ -49,7 +49,7 @@ func Provider() *schema.Provider {
Optional: true, Optional: true,
StateFunc: statefuncs.StateFuncToLower, StateFunc: statefuncs.StateFuncToLower,
DefaultFunc: schema.EnvDefaultFunc("DECORT_OAUTH2_URL", nil), DefaultFunc: schema.EnvDefaultFunc("DECORT_OAUTH2_URL", nil),
Description: "OAuth2 application URL in 'oauth2' authentication mode.", Description: "OAuth2 application URL in 'decs3o' and 'bvs' authentication mode.",
}, },
"controller_url": { "controller_url": {
@ -74,18 +74,39 @@ func Provider() *schema.Provider {
Description: "User password for DECORT cloud API operations in 'legacy' authentication mode.", Description: "User password for DECORT cloud API operations in 'legacy' authentication mode.",
}, },
"bvs_user": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DECORT_BVS_USER", nil),
Description: "User name for DECORT cloud API operations in 'bvs' authentication mode.",
},
"bvs_password": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DECORT_BVS_PASSWORD", nil),
Description: "User password for DECORT cloud API operations in 'bvs' authentication mode.",
},
"domain": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DECORT_DOMAIN", nil),
Description: "User password for DECORT cloud API operations in 'bvs' authentication mode.",
},
"app_id": { "app_id": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DECORT_APP_ID", nil), DefaultFunc: schema.EnvDefaultFunc("DECORT_APP_ID", nil),
Description: "Application ID to access DECORT cloud API in 'oauth2' authentication mode.", Description: "Application ID to access DECORT cloud API in 'decs3o' and 'bvs' authentication mode.",
}, },
"app_secret": { "app_secret": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
DefaultFunc: schema.EnvDefaultFunc("DECORT_APP_SECRET", nil), DefaultFunc: schema.EnvDefaultFunc("DECORT_APP_SECRET", nil),
Description: "Application secret to access DECORT cloud API in 'oauth2' authentication mode.", Description: "Application secret to access DECORT cloud API in 'decs3o' and 'bvs' authentication mode.",
}, },
"jwt": { "jwt": {

@ -116,7 +116,7 @@
1. Установить terraform 1. Установить terraform
2. Установить terraform-provider-decort с помощью команды `terraform init` (выполняется автоматически), либо вручную. 2. Установить terraform-provider-decort с помощью команды `terraform init` (выполняется автоматически), либо вручную.
3. Заменить параметр _controller_url_ на ваш. 3. Заменить параметр _controller_url_ на ваш.
4. Заменить параметр _oauth2_ на ваш. 4. Заменить параметр _oauth2_url_ на ваш.
5. Добавить ключи 5. Добавить ключи
_DECORT_APP_SECRET_ и _DECORT_APP_ID_ _DECORT_APP_SECRET_ и _DECORT_APP_ID_
в качестве переменных окружения, либо в качестве переменных окружения, либо

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -19,7 +19,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -22,7 +22,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,11 +16,11 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://alpha.dev.decs.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso-alpha.dev.decs.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
} }

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,11 +16,11 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://alpha.dev.decs.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso-alpha.dev.decs.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
} }

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -19,7 +19,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -19,7 +19,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -13,11 +13,12 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
oauth2_url = "https://sso.digitalenergy.online" #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
app_id = "" #oauth2_url = <DECORT_SSO_URL>
app_secret = "" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true
} }
data "decort_flipgroup" "fg" { data "decort_flipgroup" "fg" {

@ -13,11 +13,12 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
oauth2_url = "https://sso.digitalenergy.online" #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
app_id = "" #oauth2_url = <DECORT_SSO_URL>
app_secret = "" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true
} }
data "decort_flipgroup_list" "fg" { data "decort_flipgroup_list" "fg" {

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -13,11 +13,12 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
oauth2_url = "https://sso.digitalenergy.online" #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
app_id = "" #oauth2_url = <DECORT_SSO_URL>
app_secret = "" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true
} }
data "decort_k8s_computes" "computes" { data "decort_k8s_computes" "computes" {

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -20,7 +20,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -18,7 +18,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,11 +16,11 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://alpha.dev.decs.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso-alpha.dev.decs.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
} }

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -16,11 +16,11 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://alpha.dev.decs.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso-alpha.dev.decs.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
} }

@ -16,7 +16,7 @@
} */ } */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -19,9 +19,9 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso.digitalenergy.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true

@ -16,11 +16,11 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://alpha.dev.decs.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso-alpha.dev.decs.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
} }

@ -16,14 +16,13 @@ terraform {
} }
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://alpha.dev.decs.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso-alpha.dev.decs.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true
} }
data "decort_stack_list" "stack_list" { data "decort_stack_list" "stack_list" {
#необязательный параметр #необязательный параметр
#тип - число #тип - число

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -25,9 +25,9 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso.digitalenergy.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true

@ -25,9 +25,9 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso.digitalenergy.online" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true allow_unverified_ssl = true

@ -22,7 +22,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -25,7 +25,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -21,7 +21,7 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>
@ -30,7 +30,6 @@ resource "decort_disk" "acl" {
gid = 212 gid = 212
disk_name = "super-disk-re" disk_name = "super-disk-re"
size_max = 20 size_max = 20
restore = true
permanently = true permanently = true
reason = "delete" reason = "delete"
shareable = false shareable = false

@ -17,7 +17,7 @@ terraform {
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL> #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL> #oauth2_url = <DECORT_SSO_URL>

@ -13,11 +13,12 @@ terraform {
*/ */
provider "decort" { provider "decort" {
authenticator = "oauth2" authenticator = "decs3o"
oauth2_url = "https://sso.digitalenergy.online" #controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://mr4.digitalenergy.online" controller_url = "https://ds1.digitalenergy.online"
app_id = "" #oauth2_url = <DECORT_SSO_URL>
app_secret = "" oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true
} }
resource "decort_flipgroup" "fg" { resource "decort_flipgroup" "fg" {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save