tflint installation failing on GitLab CI #1795
-
Summarytflint installation failing with below error
we are using this command to install tflint
Commandcurl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash Terraform Configurationthis doesn't matter TFLint Configurationrule "aws_resource_missing_tags" {
enabled = true
tags = [
"Name",
"Terraform",
]
} OutputUnpacking /tmp/tflint.XXXXJBKDMj/tflint.zip ...
unzip: cannot find or open /tmp/tflint.XXXXJBKDMj/tflint.zip, /tmp/tflint.XXXXJBKDMj/tflint.zip.zip or /tmp/tflint.XXXXJBKDMj/tflint.zip.ZIP.
Installing /tmp/tflint.XXXXJBKDMj/tflint to /usr/local/bin/ ...
install: can't stat '/tmp/tflint.XXXXJBKDMj/tflint': No such file or directory
Failed to install tflint
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I haven't been able to reproduce this. $ docker run --rm -it alpine:3.16
/ # apk add curl
/ # apk add bash
/ # curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
arch=amd64
os=linux_amd64
====================================================
Looking up the latest version ...
Downloading TFLint v0.47.0
Downloaded successfully
====================================================
Unpacking /tmp/tflint.XXXXkmMjBg/tflint.zip ...
Archive: /tmp/tflint.XXXXkmMjBg/tflint.zip
inflating: tflint
Installing /tmp/tflint.XXXXkmMjBg/tflint to /usr/local/bin/ ...
'/tmp/tflint.XXXXkmMjBg/tflint' -> '/usr/local/bin/tflint'
Cleaning temporary downloaded files directory /tmp/tflint.XXXXkmMjBg ...
====================================================
Current tflint version
TFLint version 0.47.0
+ ruleset.terraform (0.4.0-bundled) |
Beta Was this translation helpful? Give feedback.
-
@wata727 we're using this in a gitlab pipeline not the way you were trying to reproduce it. not sure if you try to reproduce this in a gitlab pipeline. we're using our own aws runners, but you can test this on shared runners if you can |
Beta Was this translation helpful? Give feedback.
@bendrucker we were able to find out the issue here, we are doing this install multiple times within our gitlab pipeline in different steps in the gitlab runner environment. It appears this is causing troubles. We managed to find a way to do the installation single time within the pipeline. will monitor it for sometimes and see how it goes