Skip to content
This repository was archived by the owner on Oct 23, 2018. It is now read-only.

Files

Latest commit

 

History

History

Terraform_Cloudflare

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Let’s say you have a webserver for your domain that’s accessible on 10.10.101.102.
Your domain : e-g.com

Create your config file : cloudflare.tf

Exec this command line : terraform init
To initializing provider plugins (cloudflare)
provider.cloudflare: version = "1.0"

Exec : terraform plan 
To refresh terraform state
you can see the "execution plan", a new DNS A record : 10.10.101.102

Applying your changes with : terraform apply --auto-approve

Verifying the results on the Cloudflare Dashboard (DNS)

You can show informations with : terraform show
==> domain = e-g.com
==> hostname = www.e-g.com
==> name = www
==> type = A
==> value = 10.10.101.102
etc


To conclude, you can exec : curl https://www.e-g.com
=> Hello, this is 10.10.101.102!