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 while trying to add new domain #68

Closed
aylton-almeida opened this issue Sep 15, 2021 · 4 comments · Fixed by #69
Closed

Error while trying to add new domain #68

aylton-almeida opened this issue Sep 15, 2021 · 4 comments · Fixed by #69
Labels
bug Something isn't working
Milestone

Comments

@aylton-almeida
Copy link

So far, I had the following configuration, and it worked great.

image

But when I added the second domain in the list the error bellow started to appear.

image

Apparently, it's an error related to the provider. Are you aware of this issue? How can we fix it?

@ofhouse
Copy link
Member

ofhouse commented Sep 15, 2021

Hi, the error mostly occurs when we release a new version of the module (Like we did yesterday).
Every new release of the module changes the content of the Lambda (that's handling the optimization work).

Since the content of the Lambda is updated while terraform apply (not terraform init) runs, the content of the Lambda has a different source code hash at the beginning and at the end of the Terraform apply command.
This is basically what the error message is trying to say.

I currently have no permanent fix for this issue, but running terraform apply a second time should fix it.

@ofhouse
Copy link
Member

ofhouse commented Sep 15, 2021

Related issue in the Terraform AWS provider: hashicorp/terraform-provider-aws#14267

@ofhouse
Copy link
Member

ofhouse commented Sep 15, 2021

We could probably workaround the issue by waiting for the download to be finished, before publishing the output in the download module.
Currently the file path is immediately returned from the module and the download happens in parallel.
When we wait with the return of the file path until the download is finished, we should be able to produce the correct result.

Opened a new issue in our download module, will try to include a fix in the next release: milliHQ/terraform-npm-download#3

@ofhouse ofhouse added this to the v11.1.3 milestone Sep 15, 2021
@ofhouse ofhouse added the bug Something isn't working label Sep 15, 2021
@ofhouse
Copy link
Member

ofhouse commented Sep 18, 2021

Updated the download script so this error should not appear when upgrading to future versions.
Thanks for reporting! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants