terraform-provider-aws: race condition on published version from aws_lambda_function and aws_lambda_provisioned_concurrency_config

SUMMARY

When provisioning aws_lambda_function and attaching aws_lambda_provisioned_concurrency_config on initial provision the aws_lambda_provisioned_concurrency_config expects a published version, this is not done in time for aws_lambda_provisioned_concurrency_config to recognize the published version.

Expected results

When provisioning a new aws_lambda_function it publishes a new version attaches to an alias and successfully provisions

What actually happens:

{
  Message_: "Provisioned Concurrency Configs cannot be applied to unpublished function versions.",
  Type: "User"
}

POTENTIAL FIX

When aws Lambda provisions make it so that publish = true is required before aws_lambda_provisioned_concurrency_config can be provisioned

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 16
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Hi @justinretzolk I was doing a pair review with a friend and we found the same issue. After checking the comments here it seems like the publish option help us fixing the issue. We are using terraform version 1.0.3 and aws provider 3.38.

So I’m guessing that this option fix the issue.

Best Regards, H Colombia