Skip to content

A terraform module for enabling Proton mail configuration with your domain on Cloudflare.

License

Notifications You must be signed in to change notification settings

arcticfox-consulting/terraform-cloudflare-proton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-cloudflare-proton

How to use this module

Follow the instructions on Proton documentation page: How to use a custom domain from Cloudflare with Proton Mail and get the following keys:

  • Domain Verification code (TXT): protonmail-verification=<YourUniqueCode>
  • DomainKeys Identified Mail (CNAME): protonmail._domainkey.<YourUniqueDKIMCode>

SPF,MX and DMRAC records will be created automatically.

Check your cloudflare configuration and get the following values:

Module Configuration

This module expects you to provide four parameters:

  • domain_key (Provided by Proton)
  • domain_verification (Provided by Proton)
  • zone_id (Provided by Cloudflare)
  • domain (Provided by Cloudflare)

Usage

module "protonmail" {
  source              = "github.com/arcticfox-consulting/terraform-cloudflare-proton//modules/proton?ref=main"
  domain              = "example.com"         # Replace with your domain
  zone_id             = "cloudflare_zone_id"  # Replace with your zone id
  domain_key          = "domain_key"          # provided by ProtonMail
  domain_verification = "domain_verification" # provider by ProtonMail
}

resource "cloudflare_record" "root" {
  name    = var.domain
  proxied = true
  ttl     = 1
  type    = "A"
  ip      = "0.0.0.0.0"
  zone_id = var.zone_id
}

Providers

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 3.0"
    }
  }
}

provider "cloudflare" {
  api_token = var.api_token
}

About

A terraform module for enabling Proton mail configuration with your domain on Cloudflare.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages