Skip to content

Commit 4d52fbd

Browse files
authored
feat: Add support for optional path input (#37)
* Added support for optional path input * Fixed README.md with terraform-docs
1 parent 113292c commit 4d52fbd

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module "my_service" {
4141
| <a name="input_data"></a> [data](#input_data) | Data payload of the secret version. Must be no larger than 64KiB. | `string` | n/a | yes |
4242
| <a name="input_name"></a> [name](#input_name) | (Required) Name of the secret. | `string` | n/a | yes |
4343
| <a name="input_description"></a> [description](#input_description) | Description of the secret. | `string` | `null` | no |
44+
| <a name="input_path"></a> [path](#input_path) | Path of the secret. | `string` | `null` | no |
4445
| <a name="input_project_id"></a> [project_id](#input_project_id) | ID of the project containing the secret. Ressource will be created in the project set at the provider level if null. | `string` | `null` | no |
4546
| <a name="input_region"></a> [region](#input_region) | Region in which the resource exists. Ressource will be created in the region set at the provider level if null. | `any` | `null` | no |
4647
| <a name="input_tags"></a> [tags](#input_tags) | Tags associated with the secret. | `list(string)` | `[]` | no |

examples/generate_random/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,14 @@ module "secret" {
2929
project_id = data.scaleway_account_project.default.id
3030
region = local.region
3131
}
32+
33+
module "secret_with_path" {
34+
source = "../.."
35+
36+
name = local.secret_name
37+
data = random_password.password.result
38+
description = local.secret_description
39+
project_id = data.scaleway_account_project.default.id
40+
region = local.region
41+
path = "/example/path/to/secret"
42+
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ resource "scaleway_secret" "this" {
44
region = var.region
55
project_id = var.project_id
66
tags = var.tags
7+
path = var.path
78
}
89

910
resource "scaleway_secret_version" "this" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ variable "tags" {
3737
type = list(string)
3838
default = []
3939
}
40+
41+
variable "path" {
42+
description = "Path of the secret."
43+
type = string
44+
default = null
45+
}

0 commit comments

Comments
 (0)