terraform update2
This commit is contained in:
15
terraform/examples/cloud-deployment-example/civo.tf
Normal file
15
terraform/examples/cloud-deployment-example/civo.tf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
data "civo_ssh_key" "sshkey" {
|
||||||
|
name = "your-ssh-key-name"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "civo_instance" "server" {
|
||||||
|
hostname = "servername"
|
||||||
|
size = "g3.small"
|
||||||
|
disk_image = "ubuntu-focal"
|
||||||
|
# (optional):
|
||||||
|
# ---
|
||||||
|
# tags = ["python", "nginx"]
|
||||||
|
# notes = "this is a note for the server"
|
||||||
|
# initial_user = "user"
|
||||||
|
# sshkey_id = data.civo_ssh_key.sshkey.id
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
variable "zone_id" {}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "server" {
|
||||||
|
zone_id = var.zone_id
|
||||||
|
name = "your-dns-name"
|
||||||
|
value = civo_instance.server.public_ip
|
||||||
|
type = "A"
|
||||||
|
proxied = false
|
||||||
|
}
|
||||||
17
terraform/examples/cloud-deployment-example/main.tf
Normal file
17
terraform/examples/cloud-deployment-example/main.tf
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# For more information, see https://www.terraform.io/docs/backends/types/remote.html
|
||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
cloudflare = {
|
||||||
|
source = "cloudflare/cloudflare"
|
||||||
|
version = "~> 3.0"
|
||||||
|
}
|
||||||
|
civo = {
|
||||||
|
source = "civo/civo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "cloudflare" {
|
||||||
|
email = var.cloudflare_email
|
||||||
|
api_key = var.cloudflare_api_key
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user