Create real-world like ASW security groups using Terraform

[dzhang@localhost terraform]$ cat instance.tf provider "aws" { access_key = "my_access_key" secret_key = "my_secret_key" region = "ap-southeast-2" } resource "aws_security_group" "app_server" { name = "app_server" description = "app server security group" vpc_id = "vpc-d808xxxx" ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["6x.24x.5x.16x/32"] } tags { Name = "APP" } } …

Continue reading Create real-world like ASW security groups using Terraform

Build Your First AWS Virtual Instance using Terraform

Step 0: create a API user and make sure that this API user has the proper access Step 1: create instance.tf file as the below. This will creare a micro virtual instance in AWS Sydney provider "aws" { access_key = "myaccess_key" secret_key = "mysecre_key" region = "ap-southeast-2" } resource "aws_instance" "terraform_linux" { ami = "ami-fe71759d" …

Continue reading Build Your First AWS Virtual Instance using Terraform

Install Terraform on Centos 7

Firstly, download the latest Terraform from https://www.terraform.io/downloads.html, then upload the zip package to your Centos 7. Make a new folder for Terraform and unzip the Terraform package [dzhang@localhost ~]$ cd terraform/ [dzhang@localhost terraform]$ unzip ~/terraform_0.8.6_linux_amd64.zip Archive: /home/dzhang/terraform_0.8.6_linux_amd64.zip inflating: terraform[dzhang@localhost terraform]$ ls -al total 91324 drwxrwxr-x. 2 dzhang dzhang 22 Feb 11 21:37 . drwx------. 20 dzhang …

Continue reading Install Terraform on Centos 7