Skip to content
Snippets Groups Projects
Verified Commit 49004c8d authored by Daniel Sonck's avatar Daniel Sonck
Browse files

Initial pages

parents
No related merge requests found
# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
# Crash log files
crash.log
crash.*.log
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json
# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json
# Ignore transient lock info files created by terraform apply
.terraform.tfstate.lock.info
# Include override files you do wish to add to version control using negated pattern
# !example_override.tf
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*
plan
# Ignore CLI configuration files
.terraformrc
terraform.rc
\ No newline at end of file
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/cloudflare/cloudflare" {
version = "4.36.0"
constraints = "~> 4.0"
hashes = [
"h1:Xx6WUD/zB8fM9SjkFx06Fgx2K7aGJIVvsJS2pwqALEM=",
"zh:02665712b3893307596b3caab99cf1f2502d5caca18e22d4b37bb535e628e102",
"zh:1514b0d3ef62934484ac471113ee68cddec0c21e56b4f710922741fe9b6e6fdf",
"zh:1fab4dfcecbcea13267b42e5ff05ba0692aa2dcb247b8e633fea0daf49feb156",
"zh:24d8367295fe1f1b2be37802aecb96edf32f743364663ffe781d1bb92438395d",
"zh:34e84e7940c99dcf65663cfd25afac22bf5c8a5ff2cd21900c67180d3a072be9",
"zh:3d71d63204a329acf1d1de8638f2c725243cb94cf444d2d7acde54b3d1ac1696",
"zh:57831ba88e779a762bcfa224ba9eac8bc22ef9cd70cd541d848b351e0ba6a75c",
"zh:6407560f2e548afcb4852c91efc664627a9ee565c31a9c81fc9ea1806fca0567",
"zh:738ddbc664d75f4859aa09444a27809bc398795a8ea8f5be8531040690287712",
"zh:841ca2b2d78b6f8d33ec3435bc090c5e04a3a7d85c80df11227a7ea00d36f6b1",
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
"zh:8b3d3d63354032ab9b2403c50728e9aa4e83c7367eaad2d18794221addeafc0f",
"zh:9e293443fe3127e488f540229983c1b9688268185f87567bb3d18e794697acd2",
"zh:b3a22439156e46461213db183e2e89569cd2e8d7cbcfc4b9f90469090e105807",
"zh:f430feb5d51891e84028459e57039045dea4f1f5fcf671161d8ac2d8f28763f3",
]
}
main.tf 0 → 100644
provider "cloudflare" {}
locals {
account_id = "77bc0a87290187c2095a15a0cf02b868"
}
module "thyra_inflatables" {
source = "./pages"
name = "thyra-inflatables-eu"
account_id = local.account_id
domains = toset([
"thyra-inflatables.eu",
"www.thyra-inflatables.eu",
])
}
module "streamplayer_sonck_nl" {
source = "./pages"
name = "streamplayer-sonck-nl"
account_id = local.account_id
domains = toset([
"streamplayer.sonck.nl"
])
}
\ No newline at end of file
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.0"
}
}
}
resource "cloudflare_pages_project" "project" {
account_id = var.account_id
name = var.name
production_branch = "production"
}
resource "cloudflare_pages_domain" "domains" {
account_id = var.account_id
domain = each.value
project_name = var.name
for_each = var.domains
}
\ No newline at end of file
variable "domains" {
description = "The domains to associate to the pages project"
type = set(string)
}
variable "name" {
description = "The name of the pages project"
type = string
}
variable "account_id" {
description = "The account id to associate the pages project with"
type = string
}
\ No newline at end of file
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.0"
}
}
required_version = "~> 1.8.5"
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment