skylab
/
skylab-ansible
Archived
2
0
Fork 0

Add CDN config for space

This commit is contained in:
Ethan Paul 2023-05-07 15:43:39 -04:00
parent fcb25b79ce
commit 3df0115191
Signed by: enpaul
GPG Key ID: 9B6D99E4CFA31867
1 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,18 @@
resource "digitalocean_spaces_bucket" "cdn" {
resource "digitalocean_spaces_bucket" "enp_cdn" {
name = "en2-cdn"
region = "nyc3"
acl = "public-read"
force_destroy = false
}
resource "digitalocean_certificate" "enp_cdn" {
name = "CDN"
type = "lets_encrypt"
domains = ["cdn.enp.one", "enp.one"]
}
resource "digitalocean_cdn" "enp" {
origin = digitalocean_spaces_bucket.enp_cdn.bucket_domain_name
custom_domain = "cdn.enp.one"
certificate_name = digitalocean_certificate.enp_cdn.name
}