cloudposse / terraform-aws-ssm-patch-manager

Terraform module to provision AWS SSM Patch Manager maintenance window tasks, targets, patch baseline, patch groups and an s3 bucket for storing patch task logs
https://cloudposse.com/accelerate
Apache License 2.0
22 stars 17 forks source link

Minor typo on S3 bucket key prefix #39

Closed frite closed 4 months ago

frite commented 7 months ago

what

This PR fixes a minor typo on main.tf

why

The key prefix of the S3 bucket was reading scaning. I believe it should read scanning.

references

frite commented 6 months ago

Hey @jamengual & @nitrocode any updates??

frite commented 5 months ago

Hi @nitrocode and @jamengual, any updates on this?

jamengual commented 5 months ago

/terratest

jamengual commented 5 months ago

@frite could you run make precommit/terraform and commit back the changes please?

frite commented 5 months ago

Hi @jamengual, this is probably not what you asked for but...

$ make precommit/terraform
Starting cloudposse/build-harness:slim-latest
docker run --name build-harness \
        --rm -it \
        --platform linux/amd64 \
        -e PACKAGES_PREFER_HOST=true \
        -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e TERM -e AWS_PROFILE -e AWS_REGION -e AWS_DEFAULT_PROFILE -e AWS_DEFAULT_REGION -e AWS_CONFIG_FILE -e AWS_SHARED_CREDENTIALS_FILE \
         \
        -v code/terraform-aws-ssm-patch-manager:/host \
        --workdir /host \
        --entrypoint /usr/bin/make \
        cloudposse/build-harness:slim-latest terraform/precommit
tflint --enable-plugin=aws
1 issue(s) found:

Warning: [Fixable] variable "region" is declared but not used (terraform_unused_declarations)

  on variables.tf line 1:
   1: variable "region" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_unused_declarations.md

make: *** [/build-harness/modules/terraform/Makefile:35: terraform/tflint] Error 2
make: *** [build-harness/runner] Error 2

In a nutshell I get an error on tflint for not using the region variable which is not part of this PR. How would you like me to proceed forward?

frite commented 5 months ago

So @jamengual, I decided to add a directive to suppress the tflint warning. The region variable is used (e.g., in https://github.com/cloudposse/terraform-aws-ssm-patch-manager/blob/main/examples/complete/main.tf#L49). I've also included the produced README.md file following the successful output of make precommit/terraform.

Let me know what you think.