Skip to content

Commit

Permalink
udpate validity_days condition
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 31, 2024
1 parent 13b3a1e commit 5e879d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion acmpca-iam-rolesanywhere/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ certificate_subject = {
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | IAM RolesAnywhere Role Name (including r- prefix if necessary) | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources | `map(string)` | `{}` | no |
| <a name="input_validity_days"></a> [validity\_days](#input\_validity\_days) | Number of days for which the certificate is valid. For the short lived certificate, this must be <= 7 | `number` | `365` | no |
| <a name="input_validity_days"></a> [validity\_days](#input\_validity\_days) | Number of days for which the certificate is valid, 1 to 365. For the short lived certificate, this must be <= 7. Default is 365 days (also the maximum). | `number` | `365` | no |

## Outputs

Expand Down
6 changes: 3 additions & 3 deletions acmpca-iam-rolesanywhere/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ variable "contact_email" {
}

variable "validity_days" {
description = "Number of days for which the certificate is valid. For the short lived certificate, this must be <= 7"
description = "Number of days for which the certificate is valid, 1 to 365. For the short lived certificate, this must be <= 7. Default is 365 days (also the maximum)."
type = number
default = 365

validation {
condition = var.validity_days > 0
error_message = "validity_days must be larger than 0."
condition = var.validity_days > 0 && var.validity_days <= 365
error_message = "validity_days must be larger than 0 and less than or equal to 365 (1 year)."
}
}

Expand Down

0 comments on commit 5e879d6

Please sign in to comment.