diff --git a/docs/data-sources/secretsmanager_instance.md b/docs/data-sources/secretsmanager_instance.md index 4003968d..7f8e903e 100644 --- a/docs/data-sources/secretsmanager_instance.md +++ b/docs/data-sources/secretsmanager_instance.md @@ -10,7 +10,14 @@ description: |- Secrets Manager instance data source schema. Must have a `region` specified in the provider configuration. +## Example Usage +```terraform +data "stackit_secretsmanager_instance" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +``` ## Schema @@ -22,6 +29,6 @@ Secrets Manager instance data source schema. Must have a `region` specified in t ### Read-Only -- `acls` (List of String) The access control list for this instance. Each entry is an IP or IP range that is permitted to access, in CIDR notation +- `acls` (Set of String) The access control list for this instance. Each entry is an IP or IP range that is permitted to access, in CIDR notation - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`". - `name` (String) Instance name. diff --git a/docs/data-sources/secretsmanager_user.md b/docs/data-sources/secretsmanager_user.md new file mode 100644 index 00000000..e3a14d02 --- /dev/null +++ b/docs/data-sources/secretsmanager_user.md @@ -0,0 +1,37 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "stackit_secretsmanager_user Data Source - stackit" +subcategory: "" +description: |- + Secrets Manager user data source schema. Must have a region specified in the provider configuration. +--- + +# stackit_secretsmanager_user (Data Source) + +Secrets Manager user data source schema. Must have a `region` specified in the provider configuration. + +## Example Usage + +```terraform +data "stackit_secretsmanager_user" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + user_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +``` + + +## Schema + +### Required + +- `instance_id` (String) ID of the Secrets Manager instance. +- `project_id` (String) STACKIT Project ID to which the instance is associated. +- `user_id` (String) The user's ID. + +### Read-Only + +- `description` (String) A user chosen description to differentiate between multiple users. Can't be changed after creation. +- `id` (String) Terraform's internal data source identifier. It is structured as "`project_id`,`instance_id`,`user_id`". +- `username` (String) An auto-generated user name. +- `write_enabled` (Boolean) If true, the user has writeaccess to the secrets engine. diff --git a/docs/resources/secretsmanager_instance.md b/docs/resources/secretsmanager_instance.md index d2a7792f..4b9fc20c 100644 --- a/docs/resources/secretsmanager_instance.md +++ b/docs/resources/secretsmanager_instance.md @@ -10,7 +10,15 @@ description: |- Secrets Manager instance resource schema. Must have a `region` specified in the provider configuration. +## Example Usage +```terraform +resource "stackit_secretsmanager_instance" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + name = "example-instance" + acls = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"] +} +``` ## Schema @@ -22,7 +30,7 @@ Secrets Manager instance resource schema. Must have a `region` specified in the ### Optional -- `acls` (List of String) The access control list for this instance. Each entry is an IP or IP range that is permitted to access, in CIDR notation +- `acls` (Set of String) The access control list for this instance. Each entry is an IP or IP range that is permitted to access, in CIDR notation ### Read-Only diff --git a/docs/resources/secretsmanager_user.md b/docs/resources/secretsmanager_user.md new file mode 100644 index 00000000..a2e8eb1e --- /dev/null +++ b/docs/resources/secretsmanager_user.md @@ -0,0 +1,39 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "stackit_secretsmanager_user Resource - stackit" +subcategory: "" +description: |- + Secrets Manager user resource schema. Must have a region specified in the provider configuration. +--- + +# stackit_secretsmanager_user (Resource) + +Secrets Manager user resource schema. Must have a `region` specified in the provider configuration. + +## Example Usage + +```terraform +resource "stackit_postgresflex_user" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + description = "Example user" + write_enabled = false +} +``` + + +## Schema + +### Required + +- `description` (String) A user chosen description to differentiate between multiple users. Can't be changed after creation. +- `instance_id` (String) ID of the Secrets Manager instance. +- `project_id` (String) STACKIT Project ID to which the instance is associated. +- `write_enabled` (Boolean) If true, the user has writeaccess to the secrets engine. + +### Read-Only + +- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`instance_id`,`user_id`". +- `password` (String, Sensitive) An auto-generated password. +- `user_id` (String) The user's ID. +- `username` (String) An auto-generated user name. diff --git a/examples/data-sources/stackit_secretsmanager_instance/data-source.tf b/examples/data-sources/stackit_secretsmanager_instance/data-source.tf new file mode 100644 index 00000000..95be0533 --- /dev/null +++ b/examples/data-sources/stackit_secretsmanager_instance/data-source.tf @@ -0,0 +1,4 @@ +data "stackit_secretsmanager_instance" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} diff --git a/examples/data-sources/stackit_secretsmanager_user/data-source.tf b/examples/data-sources/stackit_secretsmanager_user/data-source.tf new file mode 100644 index 00000000..636917dd --- /dev/null +++ b/examples/data-sources/stackit_secretsmanager_user/data-source.tf @@ -0,0 +1,5 @@ +data "stackit_secretsmanager_user" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + user_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} diff --git a/examples/resources/stackit_secretsmanager_instance/resource.tf b/examples/resources/stackit_secretsmanager_instance/resource.tf new file mode 100644 index 00000000..0dc2f578 --- /dev/null +++ b/examples/resources/stackit_secretsmanager_instance/resource.tf @@ -0,0 +1,5 @@ +resource "stackit_secretsmanager_instance" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + name = "example-instance" + acls = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"] +} diff --git a/examples/resources/stackit_secretsmanager_user/resource.tf b/examples/resources/stackit_secretsmanager_user/resource.tf new file mode 100644 index 00000000..e9e35c11 --- /dev/null +++ b/examples/resources/stackit_secretsmanager_user/resource.tf @@ -0,0 +1,6 @@ +resource "stackit_postgresflex_user" "example" { + project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + description = "Example user" + write_enabled = false +}