Create an IAM user with Programmatic Access and make a note of access and secret key. You can use same keys in all upcoming topics.
1. Creating an instance using terraform code provider.tf file contents
provider "aws" { region = "us-west-2" access_key = "xyz" secret_key = "xyz" }
main.tf file contains
resource "aws_instance" "web" { ami = "ami-083ac7c7ecf9bb9b0" instance_type = "t2.micro" }
2. Creating an file using terraform code
main.tf file contains
resource "local_file" "foo" { content = "My hobbies are ....." filename = "urname.txt" }
Presentation Link : Introduction to Terraform
0 Comments