https://github.com/rsginer/terraform-aws-snippets
Terraform AWS snippets - Infrastructure as Code 💪
https://github.com/rsginer/terraform-aws-snippets
amazon-web-services aws infrastructure-as-code terraform terraform-aws terraform-scripts
Last synced: 2 months ago
JSON representation
Terraform AWS snippets - Infrastructure as Code 💪
- Host: GitHub
- URL: https://github.com/rsginer/terraform-aws-snippets
- Owner: RSginer
- Created: 2019-03-07T14:40:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-20T09:33:54.000Z (over 7 years ago)
- Last Synced: 2025-03-23T05:26:44.029Z (over 1 year ago)
- Topics: amazon-web-services, aws, infrastructure-as-code, terraform, terraform-aws, terraform-scripts
- Language: HCL
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform AWS Snippets - Infrastructure as Code 💪
Didn't know what is Terraform? [Take a look](https://www.terraform.io)
For sure you already know what is AWS 😉
## Install terraform
Download the terraform binary for your platform here [Terraform binary file](https://www.terraform.io/downloads.html)
Unzip and copy the terraform file to `/usr/local/bin`
Or add your terraform path inside `.profile`
```bash
export PATH = $PATH/your/terraform/path
```
and then run
```bash
source .profile
```
## Configure your credentials
Create a file named `provider.tf` with the following content
```
provider "aws" {
access_key = "YOUR_ACCESS_KEY"
secret_key = "YOUR_SECRET_KEY"
region = "eu-west-1"
}
```
## Install plugins
```bash
terraform init
```
## Scripts
Show the plan
```bash
terraform plan
````
Apply plan
```
terraform apply
```
Passing variables
```bash
terraform plan -var region='eu-west-1'
```