This commit is contained in:
Djeeberjr 2022-12-03 15:06:26 +01:00
parent 7e8b54ff5f
commit 03837072fb
3 changed files with 13 additions and 13 deletions

12
dns.tf
View File

@ -3,10 +3,10 @@ resource "cloudflare_record" "dns_a1_flex" {
zone_id = var.cloudflare_zone_id
name = "${each.key}.${var.base_domain}"
name = "${each.key}.${var.base_domain}"
value = oci_core_instance.a1_flex_instances[each.key].public_ip
type = "A"
ttl = 1 # For automatic
type = "A"
ttl = 1 # For automatic
}
resource "cloudflare_record" "dns_e2_micro" {
@ -14,8 +14,8 @@ resource "cloudflare_record" "dns_e2_micro" {
zone_id = var.cloudflare_zone_id
name = "${each.key}.${var.base_domain}"
name = "${each.key}.${var.base_domain}"
value = oci_core_instance.e2_micro_instances[each.key].public_ip
type = "A"
ttl = 1 # For automatic
type = "A"
ttl = 1 # For automatic
}

View File

@ -1,7 +1,7 @@
terraform {
required_providers {
oci = {
source = "oracle/oci"
source = "oracle/oci"
version = "~> 4.100.0"
}
cloudflare = {

10
vcn.tf
View File

@ -29,7 +29,7 @@ resource "oci_core_default_route_table" "list" {
for_each = var.vcn
manage_default_resource_id = oci_core_vcn.list[each.key].default_route_table_id
compartment_id = var.compartment_ocid
compartment_id = var.compartment_ocid
route_rules {
destination = "0.0.0.0/0"
@ -42,7 +42,7 @@ resource "oci_core_default_security_list" "list" {
for_each = var.vcn
manage_default_resource_id = oci_core_vcn.list[each.key].default_security_list_id
compartment_id = var.compartment_ocid
compartment_id = var.compartment_ocid
egress_security_rules {
destination = "0.0.0.0/0"
@ -126,16 +126,16 @@ resource "oci_core_default_security_list" "list" {
dynamic "tcp_options" {
for_each = ingress_security_rules.value.is_udp ? [] : [1]
content{
content {
max = ingress_security_rules.value.port_max
min = ingress_security_rules.value.port_min
}
}
dynamic "udp_options"{
dynamic "udp_options" {
for_each = ingress_security_rules.value.is_udp ? [1] : []
content{
content {
max = ingress_security_rules.value.port_max
min = ingress_security_rules.value.port_min
}