Skip to content

Commit

Permalink
update: get zone_id from data sources
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Dec 19, 2021
1 parent 2bb3600 commit 690d37e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions terraform/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ locals {
}

resource "cloudflare_record" "minecraft" {
zone_id = var.CF_ZONE_ID
zone_id = data.cloudflare_zone.yohanesu.id
name = "mc"
type = "A"
value = "45.76.188.189"
}

resource "cloudflare_record" "gh_pages" {
zone_id = var.CF_ZONE_ID
zone_id = data.cloudflare_zone.yohanesu.id
name = "yohane.su"
type = "A"
proxied = true
Expand Down
4 changes: 4 additions & 0 deletions terraform/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ provider "oci" {
provider "cloudflare" {
api_token = var.CF_DNS_TOKEN
}

data "cloudflare_zone" "yohanesu" {
name = "yohane.su"
}
1 change: 0 additions & 1 deletion terraform/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ variable "OCID_COMPARTMENT" {}
variable "OCID_SUBNET" {}
variable "OCID_SOURCE" {}
variable "OCID_VCN" {}
variable "CF_ZONE_ID" {}
variable "CF_DNS_TOKEN" {}

0 comments on commit 690d37e

Please sign in to comment.