-
Notifications
You must be signed in to change notification settings - Fork 4
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
using modules & adding tflint #1
base: main
Are you sure you want to change the base?
Conversation
@@ -31,4 +31,4 @@ override.tf.json | |||
|
|||
# Ignore CLI configuration files | |||
.terraformrc | |||
terraform.rc | |||
terraform.rc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to put an empty line at the end of file
terraform fmt | ||
terraform validate | ||
tflint . | ||
echo "********** Verication done ************ " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line at the end of file
install_lint : | ||
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash | ||
|
||
verify : install_lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should check if tflint
exists we don't have to reinstall it
### Install yq , yaml template engine . | ||
|
||
```bash | ||
sudo add-apt-repository ppa:rmescandon/yq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're assuming that people have ubuntu here 😂, just put a link to the repo and they would install it from there depending on their platform
instance_id = aws_instance.minikube_instance.id | ||
allocation_id = aws_eip.instance_elastic_ip.id | ||
} | ||
data "aws_ami" "ubuntu" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project is already a module if we put it in a different project with the repo link as a source.
Since we don't have any other module it doesn't make a lot of sense to put it inside a modules folder
@@ -17,10 +17,4 @@ chmod 400 $TMP_PEM_FILE | |||
# Getting the KuebConfig | |||
ssh -i $TMP_PEM_FILE -o StrictHostKeyChecking=no $REMOTE_USER@$REMOTE_ADDR "sudo cat /root/.kube/config" >$TMP_KUBECONFIG | |||
|
|||
if ! command -v yq &> /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed these checks which are quite helpful
restructuring the code into a modular block (using terraform modules for integrity and simplicity)