From 36a1fcc6078285d013fec8707666aa44ac329cf3 Mon Sep 17 00:00:00 2001 From: renanaAkeyless Date: Thu, 22 Aug 2024 14:12:46 +0300 Subject: [PATCH 1/2] import example --- docs/resources/auth_method.md | 6 ++++++ docs/resources/auth_method_saml.md | 16 +++++++++++++++- docs/resources/role.md | 6 ++++++ docs/resources/static_secret.md | 6 ++++++ .../resources/akeyless_auth_method/import.sh | 1 + .../akeyless_auth_method_saml/import.sh | 1 + .../resource.tf | 0 examples/resources/akeyless_role/import.sh | 1 + .../resources/akeyless_static_secret/import.sh | 1 + 9 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 examples/resources/akeyless_auth_method/import.sh create mode 100644 examples/resources/akeyless_auth_method_saml/import.sh rename examples/resources/{akeyless_saml_auth_method => akeyless_auth_method_saml}/resource.tf (100%) create mode 100644 examples/resources/akeyless_role/import.sh create mode 100644 examples/resources/akeyless_static_secret/import.sh diff --git a/docs/resources/auth_method.md b/docs/resources/auth_method.md index db6d0e3..5fc484a 100644 --- a/docs/resources/auth_method.md +++ b/docs/resources/auth_method.md @@ -165,4 +165,10 @@ Optional: - `idp_metadata_url` (String) IDP metadata url - `idp_metadata_xml_data` (String) IDP metadata xml data +## Import +Import is supported using the following syntax: + +```shell +terraform import akeyless_auth_method.example /full-auth-method-path/and-name-in-akeyless +``` diff --git a/docs/resources/auth_method_saml.md b/docs/resources/auth_method_saml.md index 89f6b57..a6e5bcd 100644 --- a/docs/resources/auth_method_saml.md +++ b/docs/resources/auth_method_saml.md @@ -10,7 +10,15 @@ description: |- SAML Auth Method Resource +## Example Usage +```terraform +resource "akeyless_auth_method_saml" "saml_auth" { + name = "auth-method-saml" + unique_identifier = "email" + idp_metadata_xml_data = file("saml-metadata.xml") +} +``` ## Schema @@ -23,7 +31,6 @@ SAML Auth Method Resource ### Optional - `access_expires` (Number) Access expiration date in Unix timestamp (select 0 for access without expiry date) -- `access_id` (String) Auth Method access ID - `allowed_redirect_uri` (Set of String) Allowed redirect URIs after the authentication (default is https://console.akeyless.io/login-saml to enable SAML via Akeyless Console and http://127.0.0.1:* to enable SAML via akeyless CLI) - `audit_logs_claims` (Set of String) Subclaims to include in audit logs - `bound_ips` (Set of String) A CIDR whitelist with the IPs that the access is restricted to @@ -35,6 +42,13 @@ SAML Auth Method Resource ### Read-Only +- `access_id` (String) Auth Method access ID - `id` (String) The ID of this resource. +## Import + +Import is supported using the following syntax: +```shell +terraform import akeyless_auth_method_saml.example /full-auth-method-saml-path/and-name-in-akeyless +``` diff --git a/docs/resources/role.md b/docs/resources/role.md index a3de4e9..f1495c7 100644 --- a/docs/resources/role.md +++ b/docs/resources/role.md @@ -118,4 +118,10 @@ Optional: - `rule_type` (String) item-rule, target-rule, role-rule, auth-method-rule +## Import +Import is supported using the following syntax: + +```shell +terraform import akeyless_role.example /full-role-path/and-name-in-akeyless +``` diff --git a/docs/resources/static_secret.md b/docs/resources/static_secret.md index 00ed120..41e4cda 100644 --- a/docs/resources/static_secret.md +++ b/docs/resources/static_secret.md @@ -67,4 +67,10 @@ resource "akeyless_static_secret" "secret" { - `id` (String) The ID of this resource. - `version` (Number) The version of the secret. +## Import +Import is supported using the following syntax: + +```shell +terraform import akeyless_static_secret.example /full-secret-path/and-name-in-akeyless +``` diff --git a/examples/resources/akeyless_auth_method/import.sh b/examples/resources/akeyless_auth_method/import.sh new file mode 100644 index 0000000..64589ab --- /dev/null +++ b/examples/resources/akeyless_auth_method/import.sh @@ -0,0 +1 @@ +terraform import akeyless_auth_method.example /full-auth-method-path/and-name-in-akeyless \ No newline at end of file diff --git a/examples/resources/akeyless_auth_method_saml/import.sh b/examples/resources/akeyless_auth_method_saml/import.sh new file mode 100644 index 0000000..6f215c3 --- /dev/null +++ b/examples/resources/akeyless_auth_method_saml/import.sh @@ -0,0 +1 @@ +terraform import akeyless_auth_method_saml.example /full-auth-method-saml-path/and-name-in-akeyless \ No newline at end of file diff --git a/examples/resources/akeyless_saml_auth_method/resource.tf b/examples/resources/akeyless_auth_method_saml/resource.tf similarity index 100% rename from examples/resources/akeyless_saml_auth_method/resource.tf rename to examples/resources/akeyless_auth_method_saml/resource.tf diff --git a/examples/resources/akeyless_role/import.sh b/examples/resources/akeyless_role/import.sh new file mode 100644 index 0000000..df338e4 --- /dev/null +++ b/examples/resources/akeyless_role/import.sh @@ -0,0 +1 @@ +terraform import akeyless_role.example /full-role-path/and-name-in-akeyless diff --git a/examples/resources/akeyless_static_secret/import.sh b/examples/resources/akeyless_static_secret/import.sh new file mode 100644 index 0000000..4bd1f92 --- /dev/null +++ b/examples/resources/akeyless_static_secret/import.sh @@ -0,0 +1 @@ +terraform import akeyless_static_secret.example /full-secret-path/and-name-in-akeyless \ No newline at end of file From 41a83e6eb5a1030bec5937d8664cb85040e1023f Mon Sep 17 00:00:00 2001 From: renanaAkeyless Date: Thu, 22 Aug 2024 14:13:05 +0300 Subject: [PATCH 2/2] Update version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index bd0bd57..c8d9b9e 100644 --- a/version +++ b/version @@ -1,2 +1,2 @@ # Use Semantic versioning only. Please update the version number before opening a pull request. -v1.7.1 +v1.7.2