mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-22 00:03:16 +01:00
more terraform boilerplates
This commit is contained in:
parent
cda48ece9d
commit
e4fa5990f4
13
terraform/cloudflare/credentials.tf
Normal file
13
terraform/cloudflare/credentials.tf
Normal file
@ -0,0 +1,13 @@
|
||||
# Cloudflare Credentials
|
||||
# ---
|
||||
# Credential Variables needed for Cloudflare
|
||||
|
||||
# Cloudflare Config
|
||||
variable "cloudflare_email" {
|
||||
description = "The email address for your Cloudflare account"
|
||||
type = string
|
||||
}
|
||||
variable "cloudflare_api_key" {
|
||||
description = "The API key for your Cloudflare account"
|
||||
type = string
|
||||
}
|
12
terraform/cloudflare/dns.tf
Normal file
12
terraform/cloudflare/dns.tf
Normal file
@ -0,0 +1,12 @@
|
||||
# Cloudflare DNS
|
||||
# ---
|
||||
# Templates to manage DNS Records on Cloudflare
|
||||
|
||||
# A Record
|
||||
resource "cloudflare_record" "your-dns-record-name" {
|
||||
zone_id = "your-zone-id"
|
||||
name = "your-public-dns-value"
|
||||
value = "your-public-ip-address"
|
||||
type = "A"
|
||||
proxied = false # set to true, to hide public IP
|
||||
}
|
19
terraform/cloudflare/provider.tf
Normal file
19
terraform/cloudflare/provider.tf
Normal file
@ -0,0 +1,19 @@
|
||||
# Cloudflare Provider
|
||||
# ---
|
||||
# Initial Provider Configuration for Cloudflare
|
||||
|
||||
terraform {
|
||||
required_version = ">= 0.13.0"
|
||||
|
||||
required_providers {
|
||||
cloudflare = {
|
||||
source = "cloudflare/cloudflare"
|
||||
version = "~> 3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "cloudflare" {
|
||||
email = var.cloudflare_email
|
||||
api_key = var.cloudflare_api_key
|
||||
}
|
23
terraform/kubernetes/provider.tf
Normal file
23
terraform/kubernetes/provider.tf
Normal file
@ -0,0 +1,23 @@
|
||||
# Kubectl Provider
|
||||
# ---
|
||||
# Initial Provider Configuration for Kubectl
|
||||
|
||||
terraform {
|
||||
required_version = ">= 0.13.0"
|
||||
|
||||
required_providers {
|
||||
kubectl = {
|
||||
source = "gavinbunney/kubectl"
|
||||
version = "1.13.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Dynamic Configuration from CIVO Kubernetes deployment
|
||||
# provider "kubectl" {
|
||||
# host = "${yamldecode(civo_kubernetes_cluster.your-kubernetes-cluster.kubeconfig).clusters.0.cluster.server}"
|
||||
# client_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.your-kubernetes-cluster.kubeconfig).users.0.user.client-certificate-data)}"
|
||||
# client_key = "${base64decode(yamldecode(civo_kubernetes_cluster.your-kubernetes-cluster.kubeconfig).users.0.user.client-key-data)}"
|
||||
# cluster_ca_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.your-kubernetes-cluster.kubeconfig).clusters.0.cluster.certificate-authority-data)}"
|
||||
# load_config_file = false
|
||||
# }
|
Loading…
Reference in New Issue
Block a user