mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat(oci): add admin policy
This commit is contained in:
parent
3711cf0255
commit
0505f506d2
10 changed files with 244 additions and 12 deletions
26
tf/oci_common_private_network/nsg.tf
Normal file
26
tf/oci_common_private_network/nsg.tf
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
resource "oci_core_network_security_group" "this" {
|
||||
compartment_id = var.tenancy_ocid
|
||||
vcn_id = oci_core_vcn.this.id
|
||||
|
||||
display_name = oci_core_vcn.this.display_name
|
||||
}
|
||||
|
||||
locals {
|
||||
protocol_number = {
|
||||
icmp = 1
|
||||
icmpv6 = 58
|
||||
tcp = 6
|
||||
udp = 17
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "this" {
|
||||
direction = "INGRESS"
|
||||
network_security_group_id = oci_core_network_security_group.this.id
|
||||
protocol = local.protocol_number.icmp
|
||||
source = "0.0.0.0/0"
|
||||
}
|
||||
|
||||
output "nsg_id" {
|
||||
value = oci_core_network_security_group.this.id
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue