blob: 704ff2c6011d3ccc1a49cc41f537902ae26b8947 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Create everything from an existing tenancy
resource "oci_identity_compartment" "borealis" {
compartment_id = var.oracle_tenancy_ocid
description = "For my personal infra"
name = "borealis"
}
data "oci_identity_availability_domains" "borealis" {
compartment_id = oci_identity_compartment.borealis.id
}
output "borealis-first-availability-domain" {
value = data.oci_identity_availability_domains.borealis.availability_domains[0].name
}
resource "oci_core_vcn" "borealis" {
compartment_id = oci_identity_compartment.borealis.id
display_name = "borealis"
}
resource "oci_core_subnet" "borealis_global" {
cidr_block = "10.0.0.0/24"
compartment_id = oci_core_vcn.borealis.compartment_id
vcn_id = oci_core_vcn.borealis.id
display_name = "global"
}
resource "oci_core_security_list" "borealis_global" {
compartment_id = oci_core_vcn.borealis.compartment_id
vcn_id = oci_core_vcn.borealis.id
display_name = "default"
egress_security_rules {
destination = "0.0.0.0/0"
protocol = "all"
}
ingress_security_rules {
icmp_options {
code = "4"
type = "3"
}
protocol = "1"
source = "0.0.0.0/0"
}
ingress_security_rules {
icmp_options {
code = "-1"
type = "3"
}
protocol = "1"
source = "10.0.0.0/16"
}
}
|