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
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
oci = {
|
||||
source = "oracle/oci"
|
||||
source = "oracle/oci"
|
||||
version = "~> 4.100.0"
|
||||
}
|
||||
cloudflare = {
|
||||
|
12
vcn.tf
12
vcn.tf
@ -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"
|
||||
@ -117,7 +117,7 @@ resource "oci_core_default_security_list" "list" {
|
||||
|
||||
dynamic "ingress_security_rules" {
|
||||
for_each = each.value.firewall_rules
|
||||
|
||||
|
||||
content {
|
||||
description = ingress_security_rules.value.description
|
||||
protocol = ingress_security_rules.value.is_udp ? "17" : "6"
|
||||
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user