Skip to content

Commit

Permalink
feat: Control creation of SAML configuration via `create_saml_configu…
Browse files Browse the repository at this point in the history
…ration` (#20)
  • Loading branch information
csantanapr authored Mar 25, 2023
1 parent 561c863 commit eb37802
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ No modules.
| <a name="input_configuration"></a> [configuration](#input\_configuration) | The configuration string for the workspace | `string` | `null` | no |
| <a name="input_create"></a> [create](#input\_create) | Determines whether a resources will be created | `bool` | `true` | no |
| <a name="input_create_iam_role"></a> [create\_iam\_role](#input\_create\_iam\_role) | Determines whether a an IAM role is created or to use an existing IAM role | `bool` | `true` | no |
| <a name="input_create_saml_configuration"></a> [create\_saml\_configuration](#input\_create\_saml\_configuration) | Determines whether the SAML configuration will be created | `bool` | `true` | no |
| <a name="input_create_security_group"></a> [create\_security\_group](#input\_create\_security\_group) | Determines if a security group is created | `bool` | `true` | no |
| <a name="input_create_workspace"></a> [create\_workspace](#input\_create\_workspace) | Determines whether a workspace will be created or to use an existing workspace | `bool` | `true` | no |
| <a name="input_data_sources"></a> [data\_sources](#input\_data\_sources) | The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY` | `list(string)` | `[]` | no |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ resource "aws_iam_role_policy_attachment" "this" {
################################################################################

resource "aws_grafana_workspace_saml_configuration" "this" {
count = var.create && contains(var.authentication_providers, "SAML") ? 1 : 0
count = var.create && var.create_saml_configuration && contains(var.authentication_providers, "SAML") ? 1 : 0

editor_role_values = var.saml_editor_role_values
workspace_id = local.workspace_id
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ variable "iam_role_tags" {
# Workspace SAML Configuration
################################################################################

variable "create_saml_configuration" {
description = "Determines whether the SAML configuration will be created"
type = bool
default = true
}

variable "saml_editor_role_values" {
description = "SAML authentication editor role values"
type = list(string)
Expand Down

0 comments on commit eb37802

Please sign in to comment.