AWS IAM for Terraform requires API access only. No need for Console Access
Create Admin group for terraform
Save the SSH keys using lastpast Desktop. Keys dont work with Web version.
Whenever you create new directory or a project, run terraform init.
terraform apply
Diginex codes, Can you run this directly to AWS, Test space? Yes but how?
DONT blindly apply to your insfrastruccture. Make it a habit to run terraform plan and save it to a file. Command tf plan out filename.txt.
The apply the file. tf apply filename.txt
Terraform
Terraform types
resource - AWS resource like EC2, IAM, VPC
Basics
Variable types
string
integer
bool
list - Ordered
map - keypair
tuple - like a list but can have different variable types.
Filenames (plural)
provider.tf - contains the provider like AWS but the access keys are variables
variables.tf - provider.tf look up at this file. ex. $vars.AWS_ACCESS_KEY
terraform.tfvars - Contains the actual value and will be git ingnored.
# Set as Variable
AWS_SDK_LOAD_CONFIG=1
AWS_PROFILE=devops
GotChas
Asking for MFA but its not enabled.
Set the AWS_PROFILE env value/