This is a companion repository of my talk on the same mentioned above.
Slide Deck: link
- Replace the default values in
variables.tf
with your own configuration, e.g. replace <your_cloudflare_api_token> with the actual token. - Create a gcp service account with full permission and download the service account json key.
- Replace the string <your_gcp_service_account> in
provider.tf
with the service account file name.
Go to this link to download and install as per your OS specific instruction.
Go to this link to download and install ansible. Unfortunately ansible does not run on windows, however you can hack your way to run ansible in windows using Windows Subsystem for Linux (WSL) or run ansible inside a linux docker container. Make sure ansible and all of it's commands, like ansible-galaxy
, ansible-playbook
are available in system $PATH
.
$ terraform init # Initializes terraform in current directory, and download provider dependencies
$ terraform plan -out=tfplan # Plans the infrastructure according to our config and outputs a frozen binary plan file named tfplan
$ terraform apply tfplan # Applies the plan and starts provisioning the resources. Does not stop until every action is completed.
$ terraform destroy # Cleans up all the provisioned infrastructure