1 / 17

What is Terraform?

Do you want to become a certified Terraform expert? Thinkcloudlyu2019s new course can help. It has been designed by industry experts and used successfully in passing the certification exam for many years now, offering comprehensive training on basic principles as well as advanced topics like modules management with great detail about virtual machines integration through Microsoft Azure Key Vault plugin u2013 all this without ever having any prior experience whatsoever.<br>To Learn more About https://thinkcloudly.com/

Vansh5
Download Presentation

What is Terraform?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Terraform Copyright thinkcloudly, All rights reserved 1

  2. Terraform •Commandline tool (go) (OS X, Windows, Linux, …) •Developed by Hashicorp (Vagrant, Packer, Consul, Nomad) •Lets you describe and provision cloud infrastructure using HCL formatted text files •Servers, networks, load balancing, storage, containers •Multi-provider (AWS, Azure, GC, Cloudstack, …) Copyright thinkcloudly, All rights reserved 2

  3. Demo •CloudStack @ Exoscale (Switzerland) •Web servers (CentOS/Linux) •Bastion host for management/provisioning •SSH public/private key •Run Apache httpd web server •Domain name (DNS) (AWS) Copyright thinkcloudly, All rights reserved 3

  4. Provider (1) •A provider is used to connect to a cloud provider •AWS, Azure, GC, Digital Ocean, Cloudstack, Openstack, Heroku, CloudFoundry, Mailgun, easyDNS, CloudFlare… •Providers know the APIs and expose available services Copyright thinkcloudly, All rights reserved 4

  5. Resource (2) •A resource defines how to use a cloud resource/service •VM, IP-address, load balancer, network, firewall, object storage, DNS-record •The name of the provider is used as a resource name prefix •Resources have unique ids •Combination of resource type and name Copyright thinkcloudly, All rights reserved 5

  6. Dependencies (3) •A resource can depend on another resource •Can determine the order of creation Copyright thinkcloudly, All rights reserved 6

  7. terraform show •When manipulating resources, Terraform saves the current state i a .tfstate file (or S3, Consul) •Knows a resource's current state in the cloud terraform show Copyright thinkcloudly, All rights reserved 7

  8. Syntax (4) •Variables •Interpolation •Functions (math, base64, join, lower, ...) •Count Copyright thinkcloudly, All rights reserved 8

  9. provisioner (5) •A provisioner lets you provision against the resource right after creation •chef •remote-exec (script run on the server) •local-exec (script run locally) Copyright thinkcloudly, All rights reserved 9

  10. terraform taint •When resources have to be recreated from scratch, they have to be tainted terraform taint <resource_type>.<resource_id> Copyright thinkcloudly, All rights reserved 10

  11. Security first! (6) •Connect to you web server through bastion host •Limit access to bastion host to your IP range •Use smart card to protect your private key •E.g. yubikey as OpenPGP smartcard and gpg-agent emulating ssh-agent Copyright thinkcloudly, All rights reserved 11

  12. Copyright thinkcloudly, All rights reserved 12

  13. output (7) •Outputs lets you define values that will be output when Terraform applies •Can be queried easily: terraform output [-json] Copyright thinkcloudly, All rights reserved 13

  14. Multi-provider (8) •Can connect resources from different cloud providers •Unique feature in Terraform! Copyright thinkcloudly, All rights reserved 14

  15. Multi provider, multi datacenter, multi technology (9) •DNS using weighted record set •Could have used latency / geolocation •Health checks to determine data center (or service) outage Copyright thinkcloudly, All rights reserved 15

  16. Bonus: Dependency graph •Dependency graphs can be generated dynamically terraform graph | dot -Tpng | open -f -a Preview Copyright thinkcloudly, All rights reserved 16

  17. Summary •Terraform is great for defining infrastructure as code •Perform incremental changes to your infrastructure •Can combine several cloud providers in your Copyright thinkcloudly, All rights reserved 17

More Related