Skip to content

Commit

Permalink
feat: set defaults equal to provider
Browse files Browse the repository at this point in the history
The first approach to this var passed in null values when an explicit value was not set.
This approach sets default values of 60m for al operations, equal to those in the Terraform provider
  • Loading branch information
Adam262 committed Nov 18, 2024
1 parent e58c043 commit c110502
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ No modules.
| <a name="input_event_subscriptions"></a> [event\_subscriptions](#input\_event\_subscriptions) | Map of objects that define the event subscriptions to be created | `any` | `{}` | no |
| <a name="input_iam_role_permissions_boundary"></a> [iam\_role\_permissions\_boundary](#input\_iam\_role\_permissions\_boundary) | ARN of the policy that is used to set the permissions boundary for the role | `string` | `null` | no |
| <a name="input_iam_role_tags"></a> [iam\_role\_tags](#input\_iam\_role\_tags) | A map of additional tags to apply to the DMS IAM roles | `map(string)` | `{}` | no |
| <a name="input_repl_config_timeouts"></a> [repl\_config\_timeouts](#input\_repl\_config\_timeouts) | A map of timeouts for serverless replication config create/update/delete operations | `map(string)` | `{}` | no |
| <a name="input_repl_config_timeouts"></a> [repl\_config\_timeouts](#input\_repl\_config\_timeouts) | A map of timeouts for serverless replication config create/update/delete operations | `map(string)` | <pre>{<br/> "create": "60m",<br/> "delete": "60m",<br/> "update": "60m"<br/>}</pre> | no |
| <a name="input_repl_instance_allocated_storage"></a> [repl\_instance\_allocated\_storage](#input\_repl\_instance\_allocated\_storage) | The amount of storage (in gigabytes) to be initially allocated for the replication instance. Min: 5, Max: 6144, Default: 50 | `number` | `null` | no |
| <a name="input_repl_instance_allow_major_version_upgrade"></a> [repl\_instance\_allow\_major\_version\_upgrade](#input\_repl\_instance\_allow\_major\_version\_upgrade) | Indicates that major version upgrades are allowed | `bool` | `true` | no |
| <a name="input_repl_instance_apply_immediately"></a> [repl\_instance\_apply\_immediately](#input\_repl\_instance\_apply\_immediately) | Indicates whether the changes should be applied immediately or during the next maintenance window | `bool` | `null` | no |
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ resource "aws_dms_replication_config" "this" {
tags = merge(var.tags, try(each.value.tags, {}))

timeouts {
create = try(var.repl_config_timeouts.create, null)
update = try(var.repl_config_timeouts.update, null)
delete = try(var.repl_config_timeouts.delete, null)
create = var.repl_config_timeouts.create
update = var.repl_config_timeouts.update
delete = var.repl_config_timeouts.delete
}
}

Expand Down
6 changes: 5 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ variable "repl_instance_timeouts" {
variable "repl_config_timeouts" {
description = "A map of timeouts for serverless replication config create/update/delete operations"
type = map(string)
default = {}
default = {
"create" = "60m"
"update" = "60m"
"delete" = "60m"
}
}

################################################################################
Expand Down

0 comments on commit c110502

Please sign in to comment.