diff --git a/README.md b/README.md index 8221aaa..7838a07 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Terraform 0.13 uses a different file system layout for 3rd party providers. More └───terraform.delinea.com DelineaXPM └───tss - └───2.0.5 + └───2.0.6 └───windows_amd64 ``` @@ -34,7 +34,7 @@ Terraform 0.13 uses a different file system layout for 3rd party providers. More └───terraform.delinea.com DelineaXPM └───tss - └───2.0.5 + └───2.0.6 ├───linux_amd64 ``` @@ -55,6 +55,8 @@ terraform { To run the example, create a `terraform.tfvars` and use below variables to get and create/update secret: +If you want to access the secret server via the platform, provide the platform URL as an input to tss_server_url, and the platform user credentials to tss_username and tss_password. + Get Secret By ID: ```hcl @@ -102,17 +104,28 @@ Above Create/Update Secret variables are for Windows Account secret template of ## Environment variables -You can provide your credentials via the TSS_SERVER_URL, TSS_USERNAME and TSS_PASSWORD environment variables. +You can provide your credentials via the tss_server_url, tss_username and tss_password environment variables. In this case, tss provider could be represented like this ``` -provider "tss" {} +provider "tss" { + username = var.tss_username + password = var.tss_password + server_url = var.tss_server_url +} +``` +Usage (For Linux) +``` +$ export TF_VAR_tss_username="my_app_user" +$ export TF_VAR_tss_password="Passw0rd." +$ export TF_VAR_tss_server_url="https://localhost/SecretServer" +$ terraform plan or $ terraform apply ``` -Usage +Usage (For Windows) ``` -$ export TSS_USERNAME="my_app_user" -$ export TSS_PASSWORD="Passw0rd." -$ export TSS_SERVER_URL="https://localhost/SecretServer" -$ terraform plan +> set TF_VAR_tss_username="my_app_user" +> set TF_VAR_tss_password="Passw0rd." +> set TF_VAR_tss_server_url="https://localhost/SecretServer" +> terraform plan or > terraform apply ``` ## Domain user accounts diff --git a/examples/secrets/secret_create.tf b/examples/secrets/secret_create.tf index 7e01cab..3e33877 100644 --- a/examples/secrets/secret_create.tf +++ b/examples/secrets/secret_create.tf @@ -3,7 +3,7 @@ terraform { required_providers { tss = { source = "DelineaXPM/tss" - version = "2.0.5" + version = "2.0.6" } } } diff --git a/examples/secrets/secret_get.tf b/examples/secrets/secret_get.tf index 6e796ec..86c71fa 100644 --- a/examples/secrets/secret_get.tf +++ b/examples/secrets/secret_get.tf @@ -3,7 +3,7 @@ terraform { required_providers { tss = { source = "DelineaXPM/tss" - version = "2.0.5" + version = "2.0.6" } } } diff --git a/go.mod b/go.mod index 7254a78..861c399 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/DelineaXPM/terraform-provider-tss/v2 require ( - github.com/DelineaXPM/tss-sdk-go/v2 v2.0.0 + github.com/DelineaXPM/tss-sdk-go/v2 v2.0.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 ) diff --git a/go.sum b/go.sum index 63a7c0f..41bf860 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/DelineaXPM/tss-sdk-go/v2 v2.0.0 h1:BiMCCawPnEHSPrceUQvwofZ+fDnWg7vso7zaXp6p4eM= -github.com/DelineaXPM/tss-sdk-go/v2 v2.0.0/go.mod h1:xz6FXP2Do88Vc5Hx7OamZgZC1W45yfmLy4+iDKxlGXo= +github.com/DelineaXPM/tss-sdk-go/v2 v2.0.1 h1:/rzzzaBuj/FYTcbt8sYZ9IzlnENqcgh5zKqBhHiBBm4= +github.com/DelineaXPM/tss-sdk-go/v2 v2.0.1/go.mod h1:xz6FXP2Do88Vc5Hx7OamZgZC1W45yfmLy4+iDKxlGXo= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=