-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
config { | ||
module = true | ||
} | ||
|
||
plugin "aws" { | ||
enabled = true | ||
version = "0.12.0" | ||
source = "github.com/terraform-linters/tflint-ruleset-aws" | ||
} | ||
|
||
rule "terraform_naming_convention" { | ||
enabled = true | ||
} | ||
rule "terraform_typed_variables" { | ||
enabled = true | ||
} | ||
rule "terraform_unused_required_providers" { | ||
enabled = true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. maybe we should check if |
||
terraform fmt | ||
terraform validate | ||
tflint . | ||
echo "********** Verication done ************ " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty line at the end of file |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,60 @@ | ||
# EC2-Minikube | ||
|
||
## Architecture | ||
|
||
 | ||
|
||
## Pre-requisite | ||
- yq on your host instance, go [here](https://github.com/mikefarah/yq) to install | ||
|
||
## Usage | ||
|
||
### Provisioning the Infrastructure | ||
|
||
```bash | ||
terraform apply | ||
``` | ||
|
||
### Connecting to the k8s cluster | ||
|
||
You can export the Kubeconfig file using this helper | ||
```bash | ||
$(terraform output -raw kubeconfig_command) | ||
``` | ||
|
||
### Checking the connection | ||
|
||
```bash | ||
kubectl cluster-info | ||
``` | ||
# EC2-Minikube | ||
|
||
## Architecture | ||
|
||
 | ||
|
||
## Usage | ||
|
||
### Set up the aws Cli | ||
|
||
Use your access key and secret access key to authenticate | ||
|
||
```bash | ||
aws configure | ||
``` | ||
|
||
### Add execution permission on "downoad_kubeconfig" script | ||
|
||
```bash | ||
sudo chmod +x ./scripts/download_kubeconfig.sh | ||
``` | ||
|
||
### 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 commentThe 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 |
||
sudo apt-get install yq | ||
``` | ||
|
||
### Check your provisioning plan | ||
|
||
```bash | ||
terraform plan | ||
``` | ||
|
||
### Provisioning the Infrastructure | ||
|
||
```bash | ||
terraform apply | ||
``` | ||
|
||
### Connecting to the k8s cluster "check output" | ||
|
||
You can export the Kubeconfig file using this helper | ||
|
||
```bash | ||
$(terraform output -raw kubeconfig_command) | ||
``` | ||
|
||
### Checking the connection | ||
|
||
```bash | ||
kubectl cluster-info | ||
``` | ||
|
||
### You can validate and check your Iac with TFlint | ||
|
||
```bash | ||
make verify | ||
``` |
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