Closed yaronya closed 2 years ago
Interesting. What is the AWS CLI call you're making and what output is generated?
To date, all our use cases have been to retrieve known data.
And apologies for not responding earlier.
OOI, is your local environment configured such that JSON is not the default output of the AWS CLI? (See https://github.com/digitickets/terraform-aws-cli/pull/2 which I'm about to release).
I've have managed to replicate the issue in our own setup! So thank you for the report. Hopefully the fix I'm about to release will work for us. Hopefully it'll work for you also.
Hi. I've just released https://github.com/digitickets/terraform-aws-cli/releases/tag/v5.0.2. I'd be very grateful if you could see if this release fixes the issue you're facing.
I have the same problem. I use version 5.0.2. I'm trying to update service settings and command does not have a response body. As stated in documentation "If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.". Response is in JSON.
Can you send me the module resource you're using please? Hopefully with that, I can replicate the issue and provide a solution.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/guardduty/update-detector.html
Example of the command:
aws guardduty update-detector --finding-publishing-frequency ONE_HOUR
So, is the issue that you've not supplied a --detector-id
?
$ aws guardduty update-detector --finding-publishing-frequency ONE_HOUR
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: --detector-id
So tracking errors from the AWS CLI and reporting that back is what's needed.
Sorry I didn't add it into the example I am using this syntax:
aws guardduty --detector-id XXXXXXXXXXXXXXXXXX update-detector --finding-publishing-frequency ONE_HOUR
Thank you for that. Replicated. It does seem that Terraform already supports this (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/guardduty_detector#finding_publishing_frequency).
But having replicated the issue using your example, I think the fix is relatively simple.
I've documented a new test that demonstrates the fix.
Releasing v5.0.3 shortly.
Getting this error (during plan) when applying an existing stack:
Deleting the
.terraform/modules/stack.enable_asg_metrics_collection
folder or re-runningterraform init --upgrade
(which removes the folder) is the workaround I'm current doing, but how can I overcome this in a better way? I would've expected the module to notjsondecode
in case there is no output...