Infrastructure as Code: Introduction to Terraform
-
Upload
alexander-popov -
Category
Technology
-
view
114 -
download
2
Transcript of Infrastructure as Code: Introduction to Terraform
![Page 1: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/1.jpg)
infrastructure as code
Alexander Popov
GPAWSUG meetup 07.27.16
$ intro to terraform
![Page 2: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/2.jpg)
We are hiring like crazy, of course…
![Page 3: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/3.jpg)
What is it?
![Page 4: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/4.jpg)
not this…
![Page 5: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/5.jpg)
![Page 6: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/6.jpg)
Oh, great… So, it’s like Chef, Puppet, Ansible, Vagrant, CloudFormation, Heat, etc.?
![Page 7: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/7.jpg)
Why not just use CloudFormation or Heat?
![Page 8: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/8.jpg)
also
![Page 9: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/9.jpg)
vs.
![Page 10: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/10.jpg)
install
![Page 11: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/11.jpg)
define
https://github.com/hashicorp/hcl
![Page 12: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/12.jpg)
define - JSON
![Page 13: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/13.jpg)
plan
![Page 14: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/14.jpg)
apply
![Page 15: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/15.jpg)
relish
![Page 16: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/16.jpg)
discard
![Page 17: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/17.jpg)
discard
![Page 18: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/18.jpg)
destroy
![Page 19: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/19.jpg)
magic
![Page 20: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/20.jpg)
ta da
![Page 21: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/21.jpg)
state?
![Page 22: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/22.jpg)
before and after
![Page 23: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/23.jpg)
modules
![Page 24: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/24.jpg)
terraform get
![Page 25: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/25.jpg)
• chef (runs chef client)
• connection (connects via ssh/winrm)
• file (copies files)
• local-exec (invokes local exe)
• eemote-exec (invokes remote exe)
• null_resource
provisioners
![Page 26: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/26.jpg)
local-exec
![Page 27: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/27.jpg)
• modules
• provisioners
• state management & remotes
• resource graphs
• parallelism
“advanced” topics
![Page 28: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/28.jpg)
References• https://www.terraform.io/intro/
• https://github.com/hashicorp/terraform
• https://github.com/hashicorp/hcl
• https://github.com/terraform-community-modules
![Page 29: Infrastructure as Code: Introduction to Terraform](https://reader035.fdocuments.us/reader035/viewer/2022062400/5877de8a1a28abaa6c8b6dc7/html5/thumbnails/29.jpg)
Questions?