@@ -24,6 +24,10 @@ variable "bastion_name" {
2424 default = " bastionExample"
2525}
2626
27+ variable "bastionWithSA_name" {
28+ default = " bastionExampleWithSA"
29+ }
30+
2731variable "bastion_freeform_tags" {
2832 default = {
2933 " bar-key" = " bastion_test"
@@ -42,21 +46,20 @@ variable "tag_namespace_name" {
4246 default = " testexamples-tag-namespace"
4347}
4448
45-
4649provider "oci" {
4750 tenancy_ocid = var. tenancy_ocid
4851 user_ocid = var. user_ocid
4952 fingerprint = var. fingerprint
5053 private_key_path = var. private_key_path
5154 region = var. region
55+ # version = "7.22.0"
5256}
5357
5458resource "oci_bastion_bastion" "test_bastion" {
5559 # Required
5660 bastion_type = " STANDARD"
5761 compartment_id = var. compartment_ocid
5862 target_subnet_id = oci_core_subnet. test_subnet . id
59-
6063 # Optional
6164 client_cidr_block_allow_list = var. bastion_client_cidr_block_allow_list
6265 defined_tags = {
@@ -67,6 +70,26 @@ resource "oci_bastion_bastion" "test_bastion" {
6770 max_session_ttl_in_seconds = var. bastion_max_session_ttl_in_seconds
6871}
6972
73+ resource "oci_bastion_bastion" "test_bastion_with_security_attribute" {
74+ # Required
75+ bastion_type = " STANDARD"
76+ compartment_id = var. compartment_ocid
77+ target_subnet_id = oci_core_subnet. test_subnet . id
78+ # Optional
79+ client_cidr_block_allow_list = var. bastion_client_cidr_block_allow_list
80+ defined_tags = {
81+ " ${oci_identity_tag_namespace.bastion_tag_namespace1.name}.${oci_identity_tag.bastion_tag1.name}" = var.bastion_defined_tags_value
82+ }
83+ name = var. bastionWithSA_name
84+ freeform_tags = var. bastion_freeform_tags
85+ max_session_ttl_in_seconds = var. bastion_max_session_ttl_in_seconds
86+ # Similarly you can add SA to session
87+ security_attributes = {
88+ " oracle-zpr.sensitivity.value" = " 42"
89+ " oracle-zpr.sensitivity.mode" = " enforce"
90+ }
91+ }
92+
7093data "oci_bastion_bastions" "test_bastions" {
7194 # Required
7295 compartment_id = var. compartment_ocid
@@ -77,9 +100,6 @@ data "oci_bastion_bastions" "test_bastions" {
77100 name = var. bastion_name
78101}
79102
80- data "oci_core_services" "test_bastion_services" {
81- }
82-
83103data "oci_identity_availability_domain" "bastion_ad" {
84104 compartment_id = var. tenancy_ocid
85105 ad_number = 1
0 commit comments