Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Churn with aws_iam_role.this #62

Open
kevcube opened this issue May 9, 2024 · 1 comment
Open

Churn with aws_iam_role.this #62

kevcube opened this issue May 9, 2024 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@kevcube
Copy link
Contributor

kevcube commented May 9, 2024

Describe the Bug

There is a permanent name change with aws_iam_role.this which is causing the resource to be recreated on every apply.

This is causing further issues with KMS permissions in the lambda function being revoked, including permissions to the default KMS key.

See serverless/examples#279 for context regarding KMS key

Expected Behavior

IAM role should not be constantly recreated.

Steps to Reproduce

Apply module, apply again.

Screenshots

No response

Environment

No response

Additional Context

No response

@kevcube kevcube added the bug 🐛 An issue with the system label May 9, 2024
@kevcube
Copy link
Contributor Author

kevcube commented May 9, 2024

It appears this is only a problem when using this module with...

module "lambda" {
  ...
  ...

  depends_on = [data.archive_file.lambda_zip]
}

Because the zip file gets refreshed on every deploy, then the data sources for region, partition etc are refreshed

causing the roles to think they must be re-created because they depend on apply-time stuff.

this is a tricky one to fix. I am going to implement a workaround in my infra now so I can continue moving forward. Idk if I will find time to implement a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant