format
This commit is contained in:
parent
7e8b54ff5f
commit
03837072fb
12
dns.tf
12
dns.tf
@ -3,10 +3,10 @@ resource "cloudflare_record" "dns_a1_flex" {
|
|||||||
|
|
||||||
zone_id = var.cloudflare_zone_id
|
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
|
value = oci_core_instance.a1_flex_instances[each.key].public_ip
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = 1 # For automatic
|
ttl = 1 # For automatic
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "dns_e2_micro" {
|
resource "cloudflare_record" "dns_e2_micro" {
|
||||||
@ -14,8 +14,8 @@ resource "cloudflare_record" "dns_e2_micro" {
|
|||||||
|
|
||||||
zone_id = var.cloudflare_zone_id
|
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
|
value = oci_core_instance.e2_micro_instances[each.key].public_ip
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = 1 # For automatic
|
ttl = 1 # For automatic
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
terraform {
|
terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
oci = {
|
oci = {
|
||||||
source = "oracle/oci"
|
source = "oracle/oci"
|
||||||
version = "~> 4.100.0"
|
version = "~> 4.100.0"
|
||||||
}
|
}
|
||||||
cloudflare = {
|
cloudflare = {
|
||||||
|
10
vcn.tf
10
vcn.tf
@ -29,7 +29,7 @@ resource "oci_core_default_route_table" "list" {
|
|||||||
for_each = var.vcn
|
for_each = var.vcn
|
||||||
|
|
||||||
manage_default_resource_id = oci_core_vcn.list[each.key].default_route_table_id
|
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 {
|
route_rules {
|
||||||
destination = "0.0.0.0/0"
|
destination = "0.0.0.0/0"
|
||||||
@ -42,7 +42,7 @@ resource "oci_core_default_security_list" "list" {
|
|||||||
for_each = var.vcn
|
for_each = var.vcn
|
||||||
|
|
||||||
manage_default_resource_id = oci_core_vcn.list[each.key].default_security_list_id
|
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 {
|
egress_security_rules {
|
||||||
destination = "0.0.0.0/0"
|
destination = "0.0.0.0/0"
|
||||||
@ -126,16 +126,16 @@ resource "oci_core_default_security_list" "list" {
|
|||||||
|
|
||||||
dynamic "tcp_options" {
|
dynamic "tcp_options" {
|
||||||
for_each = ingress_security_rules.value.is_udp ? [] : [1]
|
for_each = ingress_security_rules.value.is_udp ? [] : [1]
|
||||||
content{
|
content {
|
||||||
max = ingress_security_rules.value.port_max
|
max = ingress_security_rules.value.port_max
|
||||||
min = ingress_security_rules.value.port_min
|
min = ingress_security_rules.value.port_min
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamic "udp_options"{
|
dynamic "udp_options" {
|
||||||
for_each = ingress_security_rules.value.is_udp ? [1] : []
|
for_each = ingress_security_rules.value.is_udp ? [1] : []
|
||||||
|
|
||||||
content{
|
content {
|
||||||
max = ingress_security_rules.value.port_max
|
max = ingress_security_rules.value.port_max
|
||||||
min = ingress_security_rules.value.port_min
|
min = ingress_security_rules.value.port_min
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user