Skip to content

Commit 16d56e3

Browse files
committed
v7.1.1 - 2025/10/08
- Added validation to `var.aws_cli_command` to stop an empty command being asked for. Slight improvement as this means the empty command is evaluated before it is passed to the AWS CLI. - Updated to v1.11.4 for testing. - Added v1.13.3 for testing.
1 parent 7658271 commit 16d56e3

6 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
strategy:
1111
matrix:
1212
terraform_version:
13+
- 1.13.3
1314
- 1.12.2
14-
- 1.11.3
15+
- 1.11.4
1516
- 1.10.5
1617
- 1.9.8
1718
- 1.8.5

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
# v7.1.1 - 2025/10/08
4+
- Added validation to `var.aws_cli_command` to stop an empty command being asked for. Slight improvement as this means
5+
the empty command is evaluated before it is passed to the AWS CLI.
6+
- Updated to v1.11.4 for testing.
7+
- Added v1.13.3 for testing.
8+
39
# v7.1.0 - 2025/07/03
410
- Added v1.12.2 for testing
511
- Improved support for retrying, both in terms of the retry mode and the number of retries via the new `var.retries`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ No modules.
164164
|------|-------------|------|---------|:--------:|------------|
165165
| <a name="input_alternative_path"></a> [alternative\_path](#input\_alternative\_path) | Use an alternative path for all files produced internally | `string` | `""` | no | None |
166166
| <a name="input_assume_role_arn"></a> [assume\_role\_arn](#input\_assume\_role\_arn) | The ARN of the role being assumed (optional).<br/><br/> The optional ARN must match the format documented in https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html. | `string` | `""` | no | The optional ARN must match the format documented in https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html. |
167-
| <a name="input_aws_cli_commands"></a> [aws\_cli\_commands](#input\_aws\_cli\_commands) | The AWS CLI command, subcommands, and options.<br/><br/> For options that can accept a value, then the following examples are both fine to use:<br/> 1. `"--option", "value"`<br/> 2. `"--option=value"`<br/><br/> In the event that the value contains a space, it must be wrapped with quotes.<br/> 1. `"--option", "'value with a space wrapped in single quotes'"`<br/> 2. `"--option='value with a space wrapped in single quotes'"` | `list(string)` | n/a | yes | None |
167+
| <a name="input_aws_cli_commands"></a> [aws\_cli\_commands](#input\_aws\_cli\_commands) | The AWS CLI command, subcommands, and options.<br/><br/> For options that can accept a value, then the following examples are both fine to use:<br/> 1. `"--option", "value"`<br/> 2. `"--option=value"`<br/><br/> In the event that the value contains a space, it must be wrapped with quotes.<br/> 1. `"--option", "'value with a space wrapped in single quotes'"`<br/> 2. `"--option='value with a space wrapped in single quotes'"` | `list(string)` | n/a | yes | The `var.aws_cli_commands` cannot be empty. |
168168
| <a name="input_aws_cli_query"></a> [aws\_cli\_query](#input\_aws\_cli\_query) | The `--query` value for the AWS CLI call.<br/><br/> The value for `var.aws_cli_query` is based upon JMESPath, and you can get good information from https://jmespath.org.<br/> If not supplied, then the entire results from the AWS CLI call will be returned. | `string` | `""` | no | None |
169169
| <a name="input_external_id"></a> [external\_id](#input\_external\_id) | External id for assuming the role (optional).<br/><br/> The length of optional external\_id, when supplied, must be between 2 and 1224 characters.<br/> The optional external\_id can only contain upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: `=,.@-`.<br/> The optional external\_id match the regular expression `^[\w=,.@-]*$`. | `string` | `""` | no | The length of optional external\_id, when supplied, must be between 2 and 1224 characters.<br>The optional external\_id must match the regular expression '^[\w=,.@-]*$'. |
170170
| <a name="input_profile"></a> [profile](#input\_profile) | The specific AWS profile to use (must be configured appropriately and is optional).<br/><br/> The optional profile must start with a letter and can only contain letters, numbers, hyphens, and underscores. | `string` | `""` | no | The optional profile must start with a letter and can only contain letters, numbers, hyphens, and underscores. |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"variable": "data.local_file.awscli_results_file",
3+
"variable": "var.aws_cli_commands",
44
"problems": [
5-
"usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]\nTo see help text, you can run:\n\n aws help\n aws <command> help\n aws <command> <subcommand> help\n\naws: error: the following arguments are required: command"
5+
"The `var.aws_cli_commands` cannot be empty."
66
]
77
}
88
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aws_cli_commands = []
1+
aws_cli_commands = [" ", " ", " ", "", " "]
22
region = "eu-west-1"
33

44
alternative_path = "test-reports/test_empty_command/aws"

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ variable "aws_cli_commands" {
1212
2. `"--option='value with a space wrapped in single quotes'"`
1313
EOT
1414
type = list(string)
15+
16+
validation {
17+
condition = length(trimspace(join("", var.aws_cli_commands))) > 0
18+
error_message = "The `var.aws_cli_commands` cannot be empty."
19+
}
1520
}
1621

1722
variable "aws_cli_query" {

0 commit comments

Comments
 (0)