# Providers

▪ Plugins Terraform uses to manage the resources&#x20;

&#x20;   ▪ Providers expose resources for specific infrastructure platform (e.g. AWS)&#x20;

&#x20;   ▪ <mark style="color:red;">**Responsible for understanding API of that platform**</mark>&#x20;

&#x20;   ▪ Just code that knows how to talk to specific technology or platform

![](https://2601183865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8QpIzz6VwCOTMwaqKYa3%2Fuploads%2FVXdtgXlyR3pq9PD5JLVe%2Fimage.png?alt=media\&token=40fdad59-22aa-47f8-9859-c66c2dca25fc)

### Provision AWS EC2 Instance Using Terraform <a href="#h-provision-aws-ec2-instance-using-terraform" id="h-provision-aws-ec2-instance-using-terraform"></a>

Create a working directory for this Terraform demo.

```
geekflare@geekflare:~$ mkdir terraform_demo
```

Go to the directory and create a terraform configuration file where you define the provider and resources to launch an AWS EC2 instance.

```
geekflare@geekflare:~$ cd terraform_demo/
geekflare@geekflare:~/terraform_demo$ gedit awsec2.tf

provider "aws" {
access_key = "B5KG6Fe5GUKIATUF5UD"
secret_key = "R4gb65y56GBF6765ejYSJA4YtaZ+T6GY7H"
region = "us-west-2"
}

resource "aws_instance" "terraform_demo" {
ami = "ami-0a634ae95e11c6f91"
instance_type = "t2.micro"
}
```

#### terraform init <a href="#h-terraform-init" id="h-terraform-init"></a>

Now, the first step is to initialize terraform.

```
geekflare@geekflare:~/terraform_demo$ terraform init

Initializing the backend...
```
