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

Error "image_uri" is not expected here. #16911

Closed
nirsv opened this issue Dec 27, 2020 · 2 comments
Closed

Error "image_uri" is not expected here. #16911

nirsv opened this issue Dec 27, 2020 · 2 comments
Labels
service/lambda Issues and PRs that pertain to the lambda service.

Comments

@nirsv
Copy link

nirsv commented Dec 27, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.12.25

  • provider.aws v3.5.0

Affected Resource(s)

  • aws_lambda_function

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_lambda_function" "my-dockerized-lambda" {
  image_uri                      = var.lambda_image_uri
  description                    = "Lambda using docker image"
  function_name                  = "my-lambda-function"
  role                           = aws_iam_role.lambda-role.arn
  handler                        = "my_lambda.lambda_handler"
  runtime                        = "python3.6"
  timeout                        = "780"
  memory_size                    = "512"
  reserved_concurrent_executions = "-1"
  publish                        = false

  vpc_config {
    subnet_ids         = var.subnets
    security_group_ids = [data.aws_security_group.default_sg.id]
  }

  environment {
    variables = merge(
      var.env_vars
    )
  }
}

Debug Output

Panic Output

Expected Behavior

I expect the lambda to be created (at least the plan to succeed)

Actual Behavior

Error: Unsupported argument
An argument named "image_uri" is not expected here.

Steps to Reproduce

  1. terraform plan

Important Factoids

References

  • #0000
@ghost ghost added the service/lambda Issues and PRs that pertain to the lambda service. label Dec 27, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 27, 2020
@ewbankkit
Copy link
Contributor

@nirsv Thanks for raising this issue.
AWS Lambda container image support (and the image_uri attribute) was added in #16512 and released in v3.19.0 of the Terraform AWS Provider.
You will need to upgrade to at least that version of the provider for the functionality you require.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 27, 2020
@ghost
Copy link

ghost commented Jan 27, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

No branches or pull requests

2 participants