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

Unable to use more than one instance of Lambda function in account with default configuration #9

Open
ronaldtse opened this issue May 20, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

I just encountered this:

* aws_iam_role.this: Error creating IAM Role terraform-aws-lambda-edge-authentication: EntityAlreadyExists: Role with name terraform-aws-lambda-edge-authentication already exists.
	status code: 409, request id: 483c53ff-7b1a-11e9-876d-2de5551cb17c

This is due to the hardcoded name inside this terraform module. All resources MUST use DYNAMIC NAMES.

In this case, the name variable can be passed into the module to override the lambda function name. So I had to change both instances of my module.

Perhaps we make this a hard requirement? @phuonghuynh ?

@ronaldtse ronaldtse added the enhancement New feature or request label May 20, 2019
@igormq
Copy link
Contributor

igormq commented Feb 12, 2020

Just pass the name parameter inside module

module "staging_lambda" {
  source       = "github.com/riboseinc/terraform-aws-lambda-edge-authentication"
  name         = "your-custom-name"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants