Netflix / consoleme

A Central Control Plane for AWS Permissions and Access
Apache License 2.0
3.11k stars 252 forks source link

Update Terraform Node Version to 14.x #9328

Closed theeternalrat closed 2 years ago

theeternalrat commented 2 years ago

Describe the bug The docker and terraform installations use different versions of Node. The Terraform version (12.x) is no longer compatible with the yarn --cwd ui command. The command fails to run on initial setup and thus will display a 404 as the templates directory will not be generated.

To Reproduce Steps to reproduce the behavior:

  1. Spin up example terraform.

  2. Navigate to given URL

  3. Will be presented with a 404

  4. Investigate cloud-init to confirm yarn did not run

    yarn install v1.22.19
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    error react-scripts@5.0.0: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "12.18.2"
    error Found incompatible module.
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    yarn --cwd ui build:prod
    yarn run v1.22.19
    $ yarn run clean:prod && yarn build && yarn run copy:prod
    $ rm -rf build && rm -rf ../consoleme/templates
    $ react-scripts build
    /bin/sh: react-scripts: command not found
    error Command failed with exit code 127.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command failed with exit code 127.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  5. Investigate consoleme dir on machine to verify the templates directory does not exist

Expected behavior Templates directory is generated on init

castrapel commented 2 years ago

Hey @ryanbajnoatkinson-drizly, thanks for reporting this. I just submitted a PR with the node updates, and a few more updates. Are you able to give it a whirl?

theeternalrat commented 2 years ago

@castrapel Thank you for updating the Terraform deployment!. I'll have to pull and re-deploy to test.