際際滷
Submit Search
London HUG 8/3 - Developing a (VCD) Terraform Provider
3 likes
656 views
L
London HashiCorp User Group
Follow
OpenCredo's Brett Mack and Nicki Watt discuss Developing a (VCD) Terraform Provider
Read less
Read more
1 of 36
Download now
Downloaded 12 times
More Related Content
London HUG 8/3 - Developing a (VCD) Terraform Provider
1.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Developing a (VCD) Terraform
Provider Brett Mack Nicki Watt @phpops @techiewatt 28/01/2016 1
2.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 Who are
we? Hands on consultants Worked with a variety of clients using various HashiCorp products HashiCorp partner
3.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 https://www.opencredo.com/2015/08/10/ boot-my-secure-government-cloud
4.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 Agenda Terraform
Introduction The VCD Terraform provider approach and lessons learned Conclusion
5.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Super Quick 5 Terraform Introduction ^
6.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 Creates, manages,
and manipulates infrastructure resources.
7.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 7 Multiple Infrastructure
Providers - IAAS, PAAS, SAAS
8.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 8
9.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 9
10.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 Developing a
(VCD) Terraform provider
11.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 11 What is
a Terraform Provider Plugin?
12.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12 Atlas DNSMadeEasy
PowerDNS AWS Docker Rundeck Azure Dyn StatusCake CloudFlare Google Cloud Template CloudStack Heroku Terraform Consul Mailgun TLS Datadog OpenStack VMware vCloud Director DigitalOcean Packet VMware vSphere
13.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 13 Atlas DNSMadeEasy
PowerDNS AWS Docker Rundeck Azure Dyn StatusCake CloudFlare Google Cloud Template CloudStack Heroku Terraform Consul Mailgun TLS Datadog OpenStack VMware vCloud Director DigitalOcean Packet VMware vSphere
14.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 14 De鍖ne what
you want to control with Terraform
15.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- vCloud Director 15 Edge Gateway Internal
Network Destination NAT Source NATFirewall Rules VApp VApp
16.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- vCloud Director 16 Edge Gateway Internal
Network Destination NAT Source NATFirewall Rules VApp VApp
17.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 17 Core Terraform
Provider Plugin Concepts
18.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 18 Provider
19.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 19 Provider Resource
20.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 Resource Schema Provider
21.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Plugin 21 Resource Schema Provider
22.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 22 provider "vcd"
{ } resource vcd_vapp web } vms.tf VCD Provider Terraform launches provider binary Preferred method of communication Starts listening Address given back to Terraform
23.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 23 How do
these concepts map to VCD?
24.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 24 vCloud Director Edge
Gateway VDC Network Destinati SourceFirewall VApp VApp Plugin Details to establish connection Individual components which can be controlled Contract defining rules when interacting with resources
25.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 25 Schema Provider user password org url vdc
26.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 26 Schema user ValueType Flags Description Default Computed Required Optional ForceNew
27.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 27 Schema user ValueType Flags Description Default Computed Required Optional ValueType: TypeString Description:
vCD Username Required: True Computed ForceNew
28.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 28 Resource Provider Network VApp Firewall
Rules DNAT SNAT
29.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 29 Resource Create Read Update Delete
30.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 30 Resource Create Read Update Delete Exists
31.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 31 De鍖ning the
Provider in Go
32.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 32 func Provider()
terraform.ResourceProvider { return &schema.Provider{ Schema: map[string]*schema.Schema{ "user": &schema.Schema{ Type: schema.TypeString, Required: true, Description: vCloud Director Username.", }, "password": &schema.Schema{ Type: schema.TypeString, Required: true, Description: vCloud Director Password.", }, provider.go
33.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 33 func Provider()
terraform.ResourceProvider { return &schema.Provider{ Schema: , ResourcesMap: map[string]*schema.Resource{ "vcd_network": resourceVcdNetwork(), "vcd_vapp": resourceVcdVApp(), "vcd_firewall_rules": resourceVcdFirewallRules(), "vcd_dnat": resourceVcdDNAT(), "vcd_snat": resourceVcdSNAT(), }, } provider.go
34.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 34 Issues we
encountered
35.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 35 Conclusion
36.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 36 Thanks Questions
Download