feat(oci): add admin policy

This commit is contained in:
Kat Inskip 2024-06-09 10:44:54 -07:00
parent 3711cf0255
commit 0505f506d2
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
10 changed files with 244 additions and 12 deletions

View 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
}