d
This commit is contained in:
0
cloudflare/zones/azuredevops/backend.tf
Executable file
0
cloudflare/zones/azuredevops/backend.tf
Executable file
41
cloudflare/zones/azuredevops/main.tf
Executable file
41
cloudflare/zones/azuredevops/main.tf
Executable file
@@ -0,0 +1,41 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
cloudflare = {
|
||||
source = "cloudflare/cloudflare"
|
||||
version = "~> 5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "cloudflare" {
|
||||
api_token = var.cloudflare_apitoken
|
||||
}
|
||||
locals {
|
||||
azure_records = {
|
||||
root_a = { name = "@", type = "A", content = "185.139.7.37", ttl = 1, proxied = true }
|
||||
root_uk_aaaa = { name = "@", type = "AAAA", content = "2a12:ab46:5344:fd::a", ttl = 1, proxied = true }
|
||||
|
||||
autodiscover = { name = "autodiscover", type = "CNAME", content = "eu1.workspace.org.", ttl = 360, proxied = false }
|
||||
mail = { name = "mail", type = "CNAME", content = "eu1.workspace.org.", ttl = 360, proxied = false }
|
||||
mail_mx = { name = "@", type = "MX", content = "eu1.workspace.org.", priority = 10, proxied = false }
|
||||
|
||||
spf_txt = { name = "@", content = "v=spf1 include:_spf.workspace.org -all", type = "TXT", ttl = 3600 }
|
||||
verify_txt = { name = "workspace-verification", content = "44856072-5cde-458d-86c9-c8f86c0ab7bd", type = "TXT", ttl = 360 }
|
||||
dkim_txt = { name = "cf8DDF69382578883._domainKey", content = "v=DKIM1;k=rsa;h=sha256;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr/Mu/P1bfiMIGkHNnvhLB1oVcAaSOg4QoKTCF9N6F/eVV7JCoERTSSHiMyS74V/xq0i3kUJYjspFgrXKicVaEl6jHmRJ4jSyb2b52frWzLakW1SB9LJwXZ/n0PDm90iSPToQOEvQTSl+pg9B9RWfhqr3Tv5hz9YvsjQP1tn7yNwJSbyhU944PWZimu0ryqwAQyLGNP+CsIeMTinwe0B8Rdtc52TusInwhcMddL9XgGYi/IsWsuri85R5yvzIOKk/sklfuDHOSQoCap7RW+Lm22B/DzC0spdjV42n0k4tGtv6Rz0bYT/2DpcqRVIQd9EAcTeUFq3qOYZCHsN0Q+iS2QIDAQAB", type = "TXT", ttl = 3600 }
|
||||
dmarc_txt = { name = "_dmarc", content = "v=DMARC1; p=quarantine; rua=mailto:postmaster@azuredevops.co.uk; ruf=mailto:postmaster@azuredevops.co.uk; fo=1; adkim=s; aspf=s", type = "TXT", ttl = 3600 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resource "cloudflare_dns_record" "this" {
|
||||
for_each = local.azure_records
|
||||
|
||||
zone_id = var.zone_id
|
||||
name = each.value.name
|
||||
content = each.value.content
|
||||
type = each.value.type
|
||||
ttl = each.value.ttl
|
||||
|
||||
proxied = lookup(each.value, "proxied", false)
|
||||
priority = lookup(each.value, "priority", null)
|
||||
}
|
||||
258
cloudflare/zones/azuredevops/terraform.tfstate
Normal file
258
cloudflare/zones/azuredevops/terraform.tfstate
Normal file
@@ -0,0 +1,258 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.13.3",
|
||||
"serial": 59,
|
||||
"lineage": "87d4a795-db19-508c-0f53-1e6bdd9b5d93",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "cloudflare_dns_record",
|
||||
"name": "this",
|
||||
"provider": "provider[\"registry.terraform.io/cloudflare/cloudflare\"]",
|
||||
"instances": [
|
||||
{
|
||||
"index_key": "autodiscover",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "eu1.workspace.org.",
|
||||
"created_on": "2025-10-03T10:35:51Z",
|
||||
"data": null,
|
||||
"id": "2c03ba416645db773ec3b0bdc7514d1e",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-04T13:37:12Z",
|
||||
"name": "autodiscover.azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": true,
|
||||
"proxied": false,
|
||||
"settings": {
|
||||
"flatten_cname": false,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 360,
|
||||
"type": "CNAME",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "dkim_txt",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "v=DKIM1;k=rsa;h=sha256;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr/Mu/P1bfiMIGkHNnvhLB1oVcAaSOg4QoKTCF9N6F/eVV7JCoERTSSHiMyS74V/xq0i3kUJYjspFgrXKicVaEl6jHmRJ4jSyb2b52frWzLakW1SB9LJwXZ/n0PDm90iSPToQOEvQTSl+pg9B9RWfhqr3Tv5hz9YvsjQP1tn7yNwJSbyhU944PWZimu0ryqwAQyLGNP+CsIeMTinwe0B8Rdtc52TusInwhcMddL9XgGYi/IsWsuri85R5yvzIOKk/sklfuDHOSQoCap7RW+Lm22B/DzC0spdjV42n0k4tGtv6Rz0bYT/2DpcqRVIQd9EAcTeUFq3qOYZCHsN0Q+iS2QIDAQAB",
|
||||
"created_on": "2025-10-03T10:35:51Z",
|
||||
"data": null,
|
||||
"id": "d5bf0503497e76584ffbe03173f8d644",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-03T10:35:51Z",
|
||||
"name": "cf8DDF69382578883._domainKey",
|
||||
"priority": null,
|
||||
"proxiable": false,
|
||||
"proxied": false,
|
||||
"settings": {
|
||||
"flatten_cname": null,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 3600,
|
||||
"type": "TXT",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "dmarc_txt",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "v=DMARC1; p=quarantine; rua=mailto:postmaster@azuredevops.co.uk; ruf=mailto:postmaster@azuredevops.co.uk; fo=1; adkim=s; aspf=s",
|
||||
"created_on": "2025-10-03T10:35:50Z",
|
||||
"data": null,
|
||||
"id": "50d45619b699b9482803d7f4a624127a",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-03T10:35:50Z",
|
||||
"name": "_dmarc.azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": false,
|
||||
"proxied": false,
|
||||
"settings": {
|
||||
"flatten_cname": null,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 3600,
|
||||
"type": "TXT",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "mail",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "eu1.workspace.org.",
|
||||
"created_on": "2025-10-03T10:35:51Z",
|
||||
"data": null,
|
||||
"id": "9f0db2a3b0ad84d1037580611c84a348",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-04T13:37:12Z",
|
||||
"name": "mail.azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": true,
|
||||
"proxied": false,
|
||||
"settings": {
|
||||
"flatten_cname": false,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 360,
|
||||
"type": "CNAME",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "root_a",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "185.139.7.37",
|
||||
"created_on": "2025-10-03T10:35:51Z",
|
||||
"data": null,
|
||||
"id": "9868e7bf3f8cc58583eda37a9f45434f",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-04T13:37:12Z",
|
||||
"name": "azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": true,
|
||||
"proxied": true,
|
||||
"settings": {
|
||||
"flatten_cname": null,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 1,
|
||||
"type": "A",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "root_uk_aaaa",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "2a12:ab46:5344:fd::a",
|
||||
"created_on": "2025-10-04T13:33:21Z",
|
||||
"data": null,
|
||||
"id": "a9db6975674cf2e19cc3e99cf79a2904",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-04T13:37:12Z",
|
||||
"name": "azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": true,
|
||||
"proxied": true,
|
||||
"settings": {
|
||||
"flatten_cname": null,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 1,
|
||||
"type": "AAAA",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "spf_txt",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "v=spf1 include:_spf.workspace.org -all",
|
||||
"created_on": "2025-10-03T10:35:50Z",
|
||||
"data": null,
|
||||
"id": "7fef7251bb88c2b501343951705cdb3b",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-03T10:35:50Z",
|
||||
"name": "azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": false,
|
||||
"proxied": false,
|
||||
"settings": {
|
||||
"flatten_cname": null,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 3600,
|
||||
"type": "TXT",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
},
|
||||
{
|
||||
"index_key": "verify_txt",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"comment": null,
|
||||
"comment_modified_on": null,
|
||||
"content": "44856072-5cde-458d-86c9-c8f86c0ab7bd",
|
||||
"created_on": "2025-10-03T10:35:50Z",
|
||||
"data": null,
|
||||
"id": "43850a81936261408d3cd135c064c199",
|
||||
"meta": "{}",
|
||||
"modified_on": "2025-10-03T10:35:50Z",
|
||||
"name": "workspace-verification.azuredevops.co.uk",
|
||||
"priority": null,
|
||||
"proxiable": false,
|
||||
"proxied": false,
|
||||
"settings": {
|
||||
"flatten_cname": null,
|
||||
"ipv4_only": null,
|
||||
"ipv6_only": null
|
||||
},
|
||||
"tags": [],
|
||||
"tags_modified_on": null,
|
||||
"ttl": 360,
|
||||
"type": "TXT",
|
||||
"zone_id": "d2697ef5d69f322186bdbc812fdad150"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"identity_schema_version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": null
|
||||
}
|
||||
15
cloudflare/zones/azuredevops/variables.tf
Executable file
15
cloudflare/zones/azuredevops/variables.tf
Executable file
@@ -0,0 +1,15 @@
|
||||
variable "cloudflare_apitoken" {
|
||||
description = "Cloudflare API token"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "zone_id" {
|
||||
description = "Cloudflare zone ID"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "current_ip" {
|
||||
description = "Current public IP address"
|
||||
type = string
|
||||
}
|
||||
Reference in New Issue
Block a user