Created
March 23, 2023 20:20
-
-
Save hendrixroa/9ac934550b23a53a7040d4a52732b9c0 to your computer and use it in GitHub Desktop.
Null resource terraform to packaging node modules given a package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "null_resource" "main" { | |
triggers = { | |
updated_at = timestamp() | |
} | |
provisioner "local-exec" { | |
command = <<EOF | |
yarn config set no-progress | |
yarn | |
mkdir -p nodejs | |
cp -r node_modules nodejs/ | |
rm -r node_modules | |
EOF | |
working_dir = "${path.module}/${var.code_location}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment