An open API service indexing awesome lists of open source software.

https://github.com/brainsik/terraform-cloudflare-dns-https

Create Cloudflare DNS HTTPS records
https://github.com/brainsik/terraform-cloudflare-dns-https

cloudflare dns https opentofu opentofu-modules terraform terraform-modules

Last synced: 9 months ago
JSON representation

Create Cloudflare DNS HTTPS records

Awesome Lists containing this project

README

          

# terraform-cloudflare-dns-https

Create ServiceMode [DNS HTTPS records](https://kalfeher.com/https-records-simple/) in Cloudflare.

The Zone ID can be found on the Cloudflare overview page for the domain you
want to add records to.

## Usage

To create an HTTPS record saying `example.com` is available via http/2 over TLS:

```hcl
module "example_com_https" {
source = "brainsik/dns-https/cloudflare"

zone_id = "313372600deadcodebea5751993defc0"
name = "example.com"

alpn = "h2"
}
```

To create an HTTPS record saying `example.com` is available via http/3 or http/2 over TLS with IPs to use for initially establishing a connection:

```hcl
module "example_com_https" {
source = "brainsik/dns-https/cloudflare"

zone_id = "313372600deadcodebea5751993defc0"
name = "example.com"

alpn = "h3,h2"
ipv4hint = "192.0.2.1"
ipv6hint = "2001:db8::1,2001:db8::2"
}
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.6 |
| [cloudflare](#requirement\_cloudflare) | ~> 4 |

## Providers

| Name | Version |
|------|---------|
| [cloudflare](#provider\_cloudflare) | ~> 4 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [cloudflare_record.https](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/record) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [alpn](#input\_alpn) | A comma separated list of short form ALPN identifiers (e.g., "h2" or "h3,h2") | `string` | n/a | yes |
| [ipv4hint](#input\_ipv4hint) | A comma separated list of IPs | `string` | `""` | no |
| [ipv6hint](#input\_ipv6hint) | A comma separated list of IPs | `string` | `""` | no |
| [name](#input\_name) | The name of the record | `string` | n/a | yes |
| [priority](#input\_priority) | Resource record priority | `number` | `1` | no |
| [zone\_id](#input\_zone\_id) | The Cloudflare DNS zone ID to add the record to | `string` | n/a | yes |

## Outputs

No outputs.