Skip to content

Commit

Permalink
make active_directory_config a map(string)
Browse files Browse the repository at this point in the history
  • Loading branch information
vponnam committed May 24, 2022
1 parent 5701065 commit f8a38d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following dependency must be available for SQL Server module:
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| activation\_policy | The activation policy for the master instance.Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`. | `string` | `"ALWAYS"` | no |
| active\_directory\_config | Active domain that the SQL instance will join. | <pre>list(object({<br> domain = string<br> }))</pre> | `[]` | no |
| active\_directory\_config | Active domain that the SQL instance will join. | `map(string)` | `{}` | no |
| additional\_databases | A list of databases to be created in your cluster | <pre>list(object({<br> name = string<br> charset = string<br> collation = string<br> }))</pre> | `[]` | no |
| additional\_users | A list of users to be created in your cluster | <pre>list(object({<br> name = string<br> password = string<br> }))</pre> | `[]` | no |
| availability\_type | The availability type for the master instance.This is only used to set up high availability for the MSSQL instance. Can be either `ZONAL` or `REGIONAL`. | `string` | `"ZONAL"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/mssql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ resource "google_sql_database_instance" "default" {
dynamic "active_directory_config" {
for_each = var.active_directory_config
content {
domain = lookup(active_directory_config.value, "domain", null)
domain = lookup(var.active_directory_config, "domain", null)
}
}

Expand Down
6 changes: 2 additions & 4 deletions modules/mssql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@ variable "database_flags" {

variable "active_directory_config" {
description = "Active domain that the SQL instance will join."
type = list(object({
domain = string
}))
default = []
type = map(string)
default = {}
}

variable "user_labels" {
Expand Down

0 comments on commit f8a38d7

Please sign in to comment.