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

Launch template fails with SOURCEGRAPH_EXECUTOR_PROXY_PASSWORD with symbols #60

Open
ceusebi-eb opened this issue Dec 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ceusebi-eb
Copy link

Generating a password like this:

resource "random_password" "executor-password" {
  length  = 48
  special = true
}

module "executors" {
  source  = "sourcegraph/executors/aws"
  version = "4.3.0"

  executor_sourcegraph_executor_proxy_password = random_password.executor-password.result
  ...
}

Can contain symbols that end up causing the instance template to fail with error:

cloud-init[10254]: /var/lib/cloud/instance/scripts/part-001: line 28: hl: unbound variable
cloud-init[10254]: Cloud-init v. 22.4.2-0ubuntu0~20.04.2 running 'modules:final' at Wed, 28 Dec 2022 20:53:22 +0000. Up 52.15 seconds.
cloud-init[10254]: 2022-12-28 20:53:22,805 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
cloud-init[10254]: 2022-12-28 20:53:22,805 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
systemd[1]: cloud-final.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: cloud-final.service: Failed with result 'exit-code'.

Terraform can be configured to override the symbols set with override_special = "!#$%&*()-_=+[]{}<>:?" but it's not clear to me which symbols would clash when the SOURCEGRAPH_EXECUTOR_PROXY_PASSWORD="<password>" is rendered into the template.

We have changed our passwords since to not contain symbols and the problem is mitigated
This is one of the example passwords that failed: jE0QqAe2=[2Bm$hl&Y[!?xX(GWDm5>Eg
Module version: "4.3.0"

@Piszmog Piszmog added the bug Something isn't working label Feb 15, 2023
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

No branches or pull requests

2 participants