Skip to content

Commit 59ee1b5

Browse files
hcsa73Henrique Santos
andauthored
Secrets manager - Add examples, update docs (#95)
* Add examples, update docs * Fix typo --------- Co-authored-by: Henrique Santos <[email protected]>
1 parent 7a7f28a commit 59ee1b5

File tree

8 files changed

+113
-2
lines changed

8 files changed

+113
-2
lines changed

docs/data-sources/secretsmanager_instance.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ description: |-
1010

1111
Secrets Manager instance data source schema. Must have a `region` specified in the provider configuration.
1212

13+
## Example Usage
1314

15+
```terraform
16+
data "stackit_secretsmanager_instance" "example" {
17+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
18+
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
19+
}
20+
```
1421

1522
<!-- schema generated by tfplugindocs -->
1623
## Schema
@@ -22,6 +29,6 @@ Secrets Manager instance data source schema. Must have a `region` specified in t
2229

2330
### Read-Only
2431

25-
- `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
32+
- `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
2633
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`".
2734
- `name` (String) Instance name.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_secretsmanager_user Data Source - stackit"
4+
subcategory: ""
5+
description: |-
6+
Secrets Manager user data source schema. Must have a region specified in the provider configuration.
7+
---
8+
9+
# stackit_secretsmanager_user (Data Source)
10+
11+
Secrets Manager user data source schema. Must have a `region` specified in the provider configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "stackit_secretsmanager_user" "example" {
17+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
18+
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
19+
user_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
20+
}
21+
```
22+
23+
<!-- schema generated by tfplugindocs -->
24+
## Schema
25+
26+
### Required
27+
28+
- `instance_id` (String) ID of the Secrets Manager instance.
29+
- `project_id` (String) STACKIT Project ID to which the instance is associated.
30+
- `user_id` (String) The user's ID.
31+
32+
### Read-Only
33+
34+
- `description` (String) A user chosen description to differentiate between multiple users. Can't be changed after creation.
35+
- `id` (String) Terraform's internal data source identifier. It is structured as "`project_id`,`instance_id`,`user_id`".
36+
- `username` (String) An auto-generated user name.
37+
- `write_enabled` (Boolean) If true, the user has writeaccess to the secrets engine.

docs/resources/secretsmanager_instance.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ description: |-
1010

1111
Secrets Manager instance resource schema. Must have a `region` specified in the provider configuration.
1212

13+
## Example Usage
1314

15+
```terraform
16+
resource "stackit_secretsmanager_instance" "example" {
17+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
18+
name = "example-instance"
19+
acls = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"]
20+
}
21+
```
1422

1523
<!-- schema generated by tfplugindocs -->
1624
## Schema
@@ -22,7 +30,7 @@ Secrets Manager instance resource schema. Must have a `region` specified in the
2230

2331
### Optional
2432

25-
- `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
33+
- `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
2634

2735
### Read-Only
2836

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_secretsmanager_user Resource - stackit"
4+
subcategory: ""
5+
description: |-
6+
Secrets Manager user resource schema. Must have a region specified in the provider configuration.
7+
---
8+
9+
# stackit_secretsmanager_user (Resource)
10+
11+
Secrets Manager user resource schema. Must have a `region` specified in the provider configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "stackit_postgresflex_user" "example" {
17+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
18+
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
19+
description = "Example user"
20+
write_enabled = false
21+
}
22+
```
23+
24+
<!-- schema generated by tfplugindocs -->
25+
## Schema
26+
27+
### Required
28+
29+
- `description` (String) A user chosen description to differentiate between multiple users. Can't be changed after creation.
30+
- `instance_id` (String) ID of the Secrets Manager instance.
31+
- `project_id` (String) STACKIT Project ID to which the instance is associated.
32+
- `write_enabled` (Boolean) If true, the user has writeaccess to the secrets engine.
33+
34+
### Read-Only
35+
36+
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`instance_id`,`user_id`".
37+
- `password` (String, Sensitive) An auto-generated password.
38+
- `user_id` (String) The user's ID.
39+
- `username` (String) An auto-generated user name.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
data "stackit_secretsmanager_instance" "example" {
2+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3+
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data "stackit_secretsmanager_user" "example" {
2+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3+
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
4+
user_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "stackit_secretsmanager_instance" "example" {
2+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3+
name = "example-instance"
4+
acls = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"]
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "stackit_postgresflex_user" "example" {
2+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3+
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
4+
description = "Example user"
5+
write_enabled = false
6+
}

0 commit comments

Comments
 (0)