Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

How to write cloud-agnostic Terraform code - Incontro DevOps Italia 2020

22-23 Oct 2020
Incontro DevOps Italia (Bologna)
How to write cloud-agnostic Terraform code

Livres associés

Gratuit avec un essai de 30 jours de Scribd

Tout voir
  • Identifiez-vous pour voir les commentaires

  • Soyez le premier à aimer ceci

How to write cloud-agnostic Terraform code - Incontro DevOps Italia 2020

  1. 1. How to write cloud-agnostic Terraform code Giulio Vian 21/22 October 2020
  2. 2. Why this session? Image by Sammy Williams
  3. 3. Assumption #1: You know Terraform
  4. 4. Assumption #2: Terraform ≥0.13
  5. 5. Code is provider specific: AWS
  6. 6. Code is provider specific: Azure
  7. 7. Abstraction
  8. 8. Cross-cutting services Region Cross-cutting services Global Networking services Networking Networking Computing & Data Blocks Computing & Data Blocks Abstract the architecture Cross-cutting services Region Networking Networking Computing & Data Blocks Computing & Data Blocks Region
  9. 9. Computing Block Function as a Service Container as a Service Platform as a Service Inside a Component Virtual Machine Instance Stateless Firewall (IP/Port restriction) Load Balancer Subnet(s)
  10. 10. Enough slides
  11. 11. Enough slides
  12. 12. Goodies #1 count module azure { source = "../vm" count = var.platform == "vm" ? 1 : 0 }
  13. 13. Goodies #2 variable location { type = object({ cloud = string, geography = string, section = string }) }
  14. 14. Goodies #4 variable platform { type = string validation { condition = can(contains([ "vm", "k8s"], var.platform)) error_message = "Only "vm " and "k8s" are supported." }}
  15. 15. Goodies #3 region provider "aws" { region = local.primary }
  16. 16. Goodies #5 data aws_subnet app_subnet { filter { name = "tag:Name" values = [var.subnet_name] } }
  17. 17. Links https://www.terraform.io/ Y.Brikman, Terraform - Up and Running, O′Reilly (2019, 2nd ed.) https://www.amazon.co.uk/dp/1492046906 https://docs.microsoft.com/en-us/azure/architecture/aws- professional/services https://docs.microsoft.com/en-us/azure/architecture/gcp- professional/services https://github.com/giuliov/terraform-fun https://www.slideshare.net/giuliov
  18. 18. Hardware spec: 1 KB RAM (16KB after upgrade) 4 KB ROM (8KB after upgrade) First computer Past Companies Communities Giulio Vian Senior DevOps Engineer
  19. 19. Address giulio.dev@casavian.eu @giulio_vian https://www.slideshare.net/giuliov http://blog.casavian.eu https://medium.com/@giuliovdev https://github.com/giuliov
  20. 20. End of trasmissions 21

×