DevOps Engineer
Visual Studio Code
DevOps
terraform --version
. This command will print the version of terraform installed.aws --version
. This command will print the version of AWS CLI that is installed.aws configure
.AWS_ACCESS_KEY_ID
: < AWS_Access_Key_ID >AWS_SECRET_ACCESS_KEY
: < AWS_Secret_Access_Key >AWS_DEFAULT_REGION
: < Preferred_AWS_region (e.g., us-east-1
) >Default output format
: jsoncd
into this repository:mkdir
command creates the directory, and the cd
command changes the working directory to the newly created "Terraform" directory.main.tf
for the main Terraform configuration, variables.tf
to define variables (helpful for managing settings), and outputs.tf
to define outputs (display useful information after running terraform apply
).nano main.tf
and paste the code from main.tf inside:
Repeat same steps for variables.tf
and outputs.tf
and paste the code from variables.tf and outputs.tf respectively.yes
and press Enter to confirm and apply the changes. To see the state of the infrastructure, run the command below:.gitignore
file by running the command nano .gitignore
.
Input the files you don't want to commit to gitHub in this .gitignore file. This includes variable files and terraform state files. Any file added here will not be pushed to GitHub. Add below files to the .gitignore file:yes
when prompted:Posted Feb 27, 2025
Objectives: To use infrastructure-as-code tools (Terraform): Set up Elastic Kubernetes... Tagged with cloud, aws, terraform, devops.
0
0
DevOps Engineer
Visual Studio Code
DevOps