Skip to content

Commit 41aa92a

Browse files
Vivek Shastriravinitp
authored andcommitted
Added - Support for DB firewall support in Data Safe
1 parent 36c99ed commit 41aa92a

File tree

116 files changed

+13981
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+13981
-65
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
variable "database_security_config_ocid" {}
11+
12+
variable "database_security_config_access_level" {
13+
default = "RESTRICTED"
14+
}
15+
16+
variable "database_security_config_compartment_id_in_subtree" {
17+
default = false
18+
}
19+
20+
variable "database_security_config_defined_tags_value" {
21+
default = "value"
22+
}
23+
24+
variable "database_security_config_description" {
25+
default = "updated-description"
26+
}
27+
28+
variable "database_security_config_display_name" {
29+
default = "updated-name"
30+
}
31+
32+
variable "database_security_config_freeform_tags" {
33+
default = { "Department" = "Finance" }
34+
}
35+
36+
variable "database_security_config_status" {
37+
default = "ACTIVE"
38+
}
39+
40+
41+
42+
provider "oci" {
43+
tenancy_ocid = var.tenancy_ocid
44+
user_ocid = var.user_ocid
45+
fingerprint = var.fingerprint
46+
private_key_path = var.private_key_path
47+
region = var.region
48+
}
49+
50+
resource "oci_data_safe_database_security_config" "test_database_security_config" {
51+
#Required
52+
database_security_config_id = var.database_security_config_ocid
53+
54+
#Optional
55+
description = var.database_security_config_description
56+
display_name = var.database_security_config_display_name
57+
freeform_tags = var.database_security_config_freeform_tags
58+
}
59+
60+
data "oci_data_safe_database_security_configs" "test_database_security_configs" {
61+
#Required
62+
compartment_id = var.compartment_ocid
63+
64+
#Optional
65+
database_security_config_id = oci_data_safe_database_security_config.test_database_security_config.id
66+
access_level = var.database_security_config_access_level
67+
compartment_id_in_subtree = var.database_security_config_compartment_id_in_subtree
68+
}
69+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
11+
variable "allowed_sql_sort_by" {
12+
default = "timeCollected"
13+
}
14+
15+
variable "access_level" {
16+
default = "ACCESSIBLE"
17+
}
18+
19+
variable "allowed_sql_compartment_id_in_subtree" {
20+
default = false
21+
}
22+
23+
provider "oci" {
24+
tenancy_ocid = var.tenancy_ocid
25+
user_ocid = var.user_ocid
26+
fingerprint = var.fingerprint
27+
private_key_path = var.private_key_path
28+
region = var.region
29+
}
30+
31+
data "oci_data_safe_sql_firewall_allowed_sqls" "test_sql_firewall_allowed_sqls" {
32+
#Required
33+
compartment_id = var.compartment_ocid
34+
35+
#Optional
36+
compartment_id_in_subtree = var.allowed_sql_compartment_id_in_subtree
37+
access_level = var.access_level
38+
}
39+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
variable "security_policy_ocid" {}
11+
12+
variable "security_policy_access_level" {
13+
default = "RESTRICTED"
14+
}
15+
16+
variable "security_policy_compartment_id_in_subtree" {
17+
default = false
18+
}
19+
20+
variable "security_policy_defined_tags_value" {
21+
default = "value"
22+
}
23+
24+
variable "security_policy_description" {
25+
default = "updated-description"
26+
}
27+
28+
variable "security_policy_display_name" {
29+
default = "updated-name"
30+
}
31+
32+
variable "security_policy_freeform_tags" {
33+
default = { "Department" = "Finance" }
34+
}
35+
36+
variable "security_policy_status" {
37+
default = "ACTIVE"
38+
}
39+
40+
41+
42+
provider "oci" {
43+
tenancy_ocid = var.tenancy_ocid
44+
user_ocid = var.user_ocid
45+
fingerprint = var.fingerprint
46+
private_key_path = var.private_key_path
47+
region = var.region
48+
}
49+
50+
resource "oci_data_safe_security_policy" "test_security_policy" {
51+
#Required
52+
security_policy_id = var.security_policy_ocid
53+
54+
#Optional
55+
description = var.security_policy_description
56+
display_name = var.security_policy_display_name
57+
freeform_tags = var.security_policy_freeform_tags
58+
}
59+
60+
data "oci_data_safe_security_policies" "test_security_policies" {
61+
#Required
62+
compartment_id = var.compartment_ocid
63+
64+
#Optional
65+
security_policy_id = oci_data_safe_security_policy.test_security_policy.id
66+
access_level = var.security_policy_access_level
67+
compartment_id_in_subtree = var.security_policy_compartment_id_in_subtree
68+
}
69+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
variable "security_policy_deployment_id" {}
11+
12+
variable "description" {
13+
default = "description"
14+
}
15+
16+
variable "display_name" {
17+
default = "security_policy_deployment_updated"
18+
}
19+
20+
provider "oci" {
21+
tenancy_ocid = var.tenancy_ocid
22+
user_ocid = var.user_ocid
23+
fingerprint = var.fingerprint
24+
private_key_path = var.private_key_path
25+
region = var.region
26+
}
27+
28+
resource "oci_data_safe_security_policy_deployment" "test_security_policy_deployment" {
29+
#Required
30+
compartment_id = var.compartment_ocid
31+
security_policy_deployment_id = var.security_policy_deployment_id
32+
33+
#Optional
34+
description = var.description
35+
display_name = var.display_name
36+
}
37+
38+
data "oci_data_safe_security_policy_deployments" "test_security_policy_deployments" {
39+
#Required
40+
compartment_id = var.compartment_ocid
41+
security_policy_deployment_id = var.security_policy_deployment_id
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
variable "security_policy_deployment_ocid" {}
11+
variable "security_policy_entry_state_ocid" {}
12+
13+
14+
provider "oci" {
15+
tenancy_ocid = var.tenancy_ocid
16+
user_ocid = var.user_ocid
17+
fingerprint = var.fingerprint
18+
private_key_path = var.private_key_path
19+
region = var.region
20+
}
21+
22+
data "oci_data_safe_security_policy_deployment_security_policy_entry_states" "test_security_policy_deployment_security_policy_entry_states" {
23+
#Required
24+
security_policy_deployment_id = var.security_policy_deployment_ocid
25+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
variable "data_safe_target_ocid" {}
11+
variable "data_safe_db_user_name" {}
12+
13+
variable "sql_collection_compartment_id_in_subtree" {
14+
default = false
15+
}
16+
17+
variable "sql_collection_access_level" {
18+
default = "RESTRICTED"
19+
}
20+
21+
variable "sql_collection_display_name" {
22+
default = "displayName"
23+
}
24+
25+
variable "sql_collection_sql_level" {
26+
default = "ALL_SQL"
27+
}
28+
29+
variable "sql_collection_status" {
30+
default = "DISABLED"
31+
}
32+
33+
provider "oci" {
34+
tenancy_ocid = var.tenancy_ocid
35+
user_ocid = var.user_ocid
36+
fingerprint = var.fingerprint
37+
private_key_path = var.private_key_path
38+
region = var.region
39+
}
40+
41+
resource "oci_data_safe_sql_collection" "test_sql_collection" {
42+
#Required
43+
compartment_id = var.compartment_ocid
44+
db_user_name = var.data_safe_db_user_name
45+
target_id = var.data_safe_target_ocid
46+
47+
#Optional
48+
display_name = var.sql_collection_display_name
49+
sql_level = var.sql_collection_sql_level
50+
status = var.sql_collection_status
51+
}
52+
53+
data "oci_data_safe_sql_collections" "test_sql_collections" {
54+
#Required
55+
compartment_id = var.compartment_ocid
56+
57+
#Optional
58+
sql_collection_id = oci_data_safe_sql_collection.test_sql_collection.id
59+
compartment_id_in_subtree = var.sql_collection_compartment_id_in_subtree
60+
access_level = var.sql_collection_access_level
61+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_ocid" {}
10+
variable "data_safe_target_ocid" {}
11+
12+
variable "sql_collection_analytic_compartment_id_in_subtree" {
13+
default = false
14+
}
15+
16+
variable "sql_collection_analytic_access_level" {
17+
default = "RESTRICTED"
18+
}
19+
20+
variable "sql_collection_analytic_group_by"{
21+
default = ["targetId"]
22+
}
23+
24+
variable "sql_collection_analytic_state" {
25+
default = "COMPLETED"
26+
}
27+
28+
variable "sql_collection_analytic_time_ended" {
29+
default = "2038-01-01T00:00:00.000Z"
30+
}
31+
32+
variable "sql_collection_analytic_time_started" {
33+
default = "2018-01-01T00:00:00.000Z"
34+
}
35+
36+
provider "oci" {
37+
tenancy_ocid = var.tenancy_ocid
38+
user_ocid = var.user_ocid
39+
fingerprint = var.fingerprint
40+
private_key_path = var.private_key_path
41+
region = var.region
42+
}
43+
44+
data "oci_data_safe_sql_collection_analytics" "test_sql_collection_analytics" {
45+
#Required
46+
compartment_id = var.compartment_ocid
47+
48+
#Optional
49+
compartment_id_in_subtree = var.sql_collection_analytic_compartment_id_in_subtree
50+
access_level = var.sql_collection_analytic_access_level
51+
group_by = var.sql_collection_analytic_group_by
52+
}

0 commit comments

Comments
 (0)