-
Notifications
You must be signed in to change notification settings - Fork 3
feat: expose access group support in DA #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
8b3eff2
c155497
c6446a8
f7a8799
0fd93ab
42e665f
3675d8d
641648d
edb8fc4
21beb0e
c303ae5
2a0596b
40c346d
ec18731
5042751
424c45e
3046c6c
fee85f7
f8df202
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,6 +105,49 @@ variable "allowed_network" { | |
| } | ||
| } | ||
|
|
||
| variable "secret_groups" { | ||
| type = list(object({ | ||
| secret_group_name = string | ||
| secret_group_description = optional(string) | ||
| existing_secret_group = optional(bool, false) | ||
| create_access_group = optional(bool, false) | ||
|
||
| access_group_name = optional(string) | ||
| access_group_roles = optional(list(string)) | ||
| access_group_tags = optional(list(string)) | ||
| })) | ||
| description = "Secret Manager secret group configurations." | ||
|
||
| default = [ | ||
| { | ||
| secret_group_name = "General" | ||
| create_access_group = true | ||
| access_group_name = "general-secrets-group-access-group" | ||
|
||
| access_group_roles = ["SecretsReader"] | ||
|
||
| } | ||
| ] | ||
| validation { | ||
| error_message = "The name of the secret group cannot be null or empty string." | ||
| condition = length([ | ||
| for group in var.secret_groups : | ||
| true if(group.secret_group_name == "" || group.secret_group_name == null) | ||
| ]) == 0 | ||
| } | ||
| validation { | ||
| error_message = "The `default` secret group already exist, set `existing_secret_group` flag to true." | ||
| condition = length([ | ||
| for group in var.secret_groups : | ||
| true if(group.secret_group_name == "default" && group.existing_secret_group == false) | ||
| ]) == 0 | ||
| } | ||
| validation { | ||
| error_message = "When creating an access group, a list of roles must be specified." | ||
| condition = length([ | ||
| for group in var.secret_groups : | ||
| true if(group.create_access_group && group.access_group_roles == null) | ||
| ]) == 0 | ||
| } | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this has to be set to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ocofaigh Is it possible to set one field inside the variable as not nullable?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, but the whole variable should be set to |
||
|
|
||
|
|
||
| ######################################################################################################################## | ||
| # Key Protect | ||
| ######################################################################################################################## | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we need to support
existing_secret_group