cloudposse / terraform-aws-lambda-function

A module for launching Lambda Fuctions
https://cloudposse.com/accelerate
Apache License 2.0
30 stars 40 forks source link

fix: Add context tags to the IAM resources #45

Closed natemccurdy closed 11 months ago

natemccurdy commented 11 months ago

what

Add tags = module.this.tags to each of the IAM resources so that they use the tags determined by the null/label context or the tags input.

why

Prior to this, the aws_iam_role and the aws_iam_policy created by this module did not include any of the tags passed via tags or via context.

Gowiem commented 11 months ago

/terratest

Gowiem commented 11 months ago

@natemccurdy Please run the following commands, commit, and push the changes:

make init
make github/init
make readme
Gowiem commented 11 months ago

/terratest

Gowiem commented 11 months ago

@natemccurdy on both PRs, you're getting this failure with the README:

diff --git a/README.md b/README.md
index e2c38[11](https://github.com/cloudposse/terraform-aws-lambda-function/actions/runs/6459584281/job/17535684364?pr=45#step:6:12)..76c[12](https://github.com/cloudposse/terraform-aws-lambda-function/actions/runs/6459584281/job/17535684364?pr=45#step:6:13)07 100644
--- a/README.md
+++ b/README.md
@@ -[14](https://github.com/cloudposse/terraform-aws-lambda-function/actions/runs/6459584281/job/17535684364?pr=45#step:6:15)1,7 +141,7 @@ Available targets:

 | Name | Version |
 |------|---------|
-| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.20.0 |
+| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.0 |

 ## Modules

diff --git a/docs/terraform.md b/docs/terraform.md
index 9bcd6a8..8d423b4 100644
--- a/docs/terraform.md
+++ b/docs/terraform.md
@@ -10,7 +10,7 @@

 | Name | Version |
 |------|---------|
-| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.[20](https://github.com/cloudposse/terraform-aws-lambda-function/actions/runs/6459584281/job/17535684364?pr=45#step:6:21).0 |
+| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.0 |

 ## Modules

README.md is outdated. Please run the following commands locally and push the file:
  make init
  make readme

That shouldn't happen because make readme should use a specific version of tf-docs and be consistent... Do you have pre-commit installed globally maybe? If you can, check that out and if worst comes to worst, I'd change the README.yaml / README.md manually to address that.

natemccurdy commented 11 months ago

Do you have pre-commit installed globally maybe?

I do not have pre-commit installed globally.

I've fixed the docs manually as per your suggestion.

Gowiem commented 11 months ago

/terratest

natemccurdy commented 11 months ago

@Gowiem Great, tests are passing. What are the next steps now? Looks like we need another approval?

Gowiem commented 11 months ago

@natemccurdy Yeah -- Need an org owner to approve. I've requested someone to do that in our contributor channel. Will follow up!