Skip to content

Commit eb37802

Browse files
authored
feat: Control creation of SAML configuration via create_saml_configuration (#20)
1 parent 561c863 commit eb37802

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ No modules.
123123
| <a name="input_configuration"></a> [configuration](#input\_configuration) | The configuration string for the workspace | `string` | `null` | no |
124124
| <a name="input_create"></a> [create](#input\_create) | Determines whether a resources will be created | `bool` | `true` | no |
125125
| <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 |
126+
| <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 |
126127
| <a name="input_create_security_group"></a> [create\_security\_group](#input\_create\_security\_group) | Determines if a security group is created | `bool` | `true` | no |
127128
| <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 |
128129
| <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 |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ resource "aws_iam_role_policy_attachment" "this" {
326326
################################################################################
327327

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

331331
editor_role_values = var.saml_editor_role_values
332332
workspace_id = local.workspace_id

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ variable "iam_role_tags" {
182182
# Workspace SAML Configuration
183183
################################################################################
184184

185+
variable "create_saml_configuration" {
186+
description = "Determines whether the SAML configuration will be created"
187+
type = bool
188+
default = true
189+
}
190+
185191
variable "saml_editor_role_values" {
186192
description = "SAML authentication editor role values"
187193
type = list(string)

0 commit comments

Comments
 (0)