Releases: cloudposse/terraform-aws-lambda-function
v0.4.0
ignore last_modified attribute @codekitchen (#23)
what
- ignore
last_modified
attribute of theaws_lambda_function
resource
why
In the past I've used this module with a local filename
without issue, but we just used it with a new lambda function whose code we are storing externally in S3 so using the s3_key
/s3_bucket
attributes, and on every terraform apply it wants to update the last_modified
attribute e.g.:
Terraform will perform the following actions:
# module.xxx.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
id = "xxx"
~ last_modified = "2022-07-05T22:43:11.813+0000" -> (known after apply)
tags = {}
# (20 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
Adding this lifecycle rule avoids this spurious update. I'm open to other suggestions though!
v0.3.6
🚀 Enhancements
patch: Fix lambda role logic @jamengual (#18)
what
- Fix logic in iam_role policy attachment.
why
- because is fails with :
│
│ on .terraform/modules/sample_lambda.lambda_function/iam-role.tf line 35, in resource "aws_iam_role_policy_attachment" "vpc_access":
│ 35: count = local.enabled && try(length(var.vpc_config), 0) > 0 ? 1 : 0
│
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply only the resources that the count depends on.```
</details>
v0.3.5
🚀 Enhancements
Always add lambda.amazonaws.com id @nitrocode (#17)
what
- Always add lambda.amazonaws.com id
why
- lambda@edge requires both edgelambda and lambda identifiers
references
- Closes #14
v0.3.4
🚀 Enhancements
Attach VPC and XRay Roles when needed @jamengual (#16)
what
- Fix iam policy attachment logic
why
- when Xray to vpc_config is enabled the policy logic does not attach the proper managed policies.
references
v0.3.3
git.io->cloudposse.tools update @dylanbannon (#12)
what and why
Change all references to git.io/build-harness
into cloudposse.tools/build-harness
, since git.io
redirects will stop working on April 29th, 2022.
References
- DEV-143
v0.3.2
🚀 Enhancements
Attempt to fix `Invalid for_each argument` for `var.custom_iam_policy_arns` @jamengual (#11)
what
-
Attempt to fix dependency logic when policy is created at the same time as the lambda function - Expand tests to include an iam policy
- Output IAM role name
- Output IAM role ARN
- Fix remaining test
TestExamplesCompleteDisabled
cc: @mcalhoun for guidance
why
- The error message
╷
│ Error: Invalid for_each argument
│
│ on ../../iam-role.tf line 77, in resource "aws_iam_role_policy_attachment" "custom":
│ 77: for_each = local.enabled ? toset(var.custom_iam_policy_arns) : toset([])
│ ├────────────────
│ │ local.enabled is true
│ │ var.custom_iam_policy_arns is list of string with 2 elements
│
│ The "for_each" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use
│ the -target argument to first apply only the resources that the for_each depends on.
Basically, we cannot pass in a policy arn that isn't already created.
We get around this in the test by creating a local input var for the policy name and pass that local to both the aws_iam_policy
resource as well as the var.custom_iam_policy_arns
of the module.
Another way around this is to attach the custom policies outside of this module by using the role_name
output
references
- Previous PR #8
- Previous release https://github.com/cloudposse/terraform-aws-lambda-function/releases/tag/0.3.0
- cloudposse/terraform-aws-iam-role#45
v0.3.1
🤖 Automatic Updates
Update Terraform cloudposse/cloudwatch-logs/aws to v0.6.5 @renovate (#9)
This PR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
cloudposse/cloudwatch-logs/aws (source) | module | patch | 0.6.4 -> 0.6.5 |
Release Notes
cloudposse/terraform-aws-cloudwatch-logs
v0.6.5
🚀 Enhancements
Add policy boundary and enable_tags for iam resouces @jamengual (#32)
#### what * Add policy boundary to cloudwatch IAM resources * Updating to new tags_enabled variable from I am role module #### why * to pass policy_boundary and to add the ability to disable tags for IAM resources #### references * https://github.com/cloudposse/terraform-aws-iam-role/pull/44v0.3.0
Add custom policy to lambda role @jamengual (#8)
what
- Add user provides policy to be attached to lambda role
why
- Custom policies are needed for lambda to use resources like KMS, Secrets and others.
v0.2.2
🤖 Automatic Updates
Update Terraform cloudposse/cloudwatch-logs/aws to v0.6.4 @renovate (#3)
This PR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
cloudposse/cloudwatch-logs/aws (source) | module | patch | 0.6.2 -> 0.6.4 |
Release Notes
cloudposse/terraform-aws-cloudwatch-logs
v0.6.4
🤖 Automatic Updates
Update Terraform cloudposse/iam-role/aws to v0.15.0 @renovate (#29)
This PR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
cloudposse/iam-role/aws (source) | module | minor | 0.14.1 -> 0.15.0 |
Release Notes
cloudposse/terraform-aws-iam-role
##### [`v0.15.0`](https://togithub.com/cloudposse/terraform-aws-iam-role/releases/0.15.0)allow to set role and policy path @​1david5 (#​40)
##### what * Add `path` argument to role and policy resources ##### why * Allow users to set path for role and policyConfiguration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by WhiteSource Renovate. View repository job log here.
v0.6.3
🤖 Automatic Updates
Update Terraform cloudposse/iam-role/aws to v0.14.1 @renovate (#28)
This PR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
cloudposse/iam-role/aws (source) | module | patch | 0.14.0 -> 0.14.1 |
Release Notes
cloudposse/terraform-aws-iam-role
##### [`v0.14.1`](https://togithub.com/cloudposse/terraform-aws-iam-role/releases/0.14.1)Fix: Fix Variable Description Typo for `var.use_fullname` @​korenyoni (#​36)
##### what * Fix variable description typo introduced in #​35 for `var.use_fullname` ##### why * Minor typo (unmatched right bracket). ##### references * #​35Drop unused null provider @​Xerkus (#​34)
##### what * Drop `hashicorp/null` provider from dependencies ##### why * As far as I can tell the null provider is not used and I do not think it is needed for any kind of indirect dependency * I think it was needed at some point for terraform-null-label ##### references * Closes #​31Fix: fix variable description for `var.use_fullname`, run `make github/init` @​korenyoni (#​35)
##### what - Fix variable description for `var.use_fullname`. - Run `make github/init`. ##### why - The `var.use_fullname` variable description is incorrect and refers to ECR repositories instead of IAM roles. - Running `make github/init` will update GHA-workflow related files (and CODEOWNERS), the former of which is required for the `no-release` label (which allows for consolidating multiple small PRs such as this into one release). ##### references * N/AAdd tags to policy @​nitrocode (#​37)
##### what * Add tags to policy ##### why * Tag it all ##### references N/AConfiguration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by WhiteSource Renovate. View repository job log here.
v0.2.1
🚀 Enhancements
Adding function_name output @jamengual (#7)
what
- Adding function_name output
why
- Used for API gateway and others