Skip to content

Commit 7e124d6

Browse files
Prakash RjiaqchenO
authored andcommitted
Added - Support for Delegated Access Control for Exadata Cloud Services
1 parent 77f68d4 commit 7e124d6

File tree

154 files changed

+18136
-40
lines changed

Some content is hidden

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

154 files changed

+18136
-40
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright (c) 2017, 2024, 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_id" {}
10+
11+
variable "test_delegation_control_id" {}
12+
13+
variable "delegated_resource_access_request_request_status" {
14+
default = "CREATED"
15+
}
16+
17+
variable "delegated_resource_access_request_state" {
18+
default = "SUCCEEDED"
19+
}
20+
21+
variable "delegated_resource_access_request_time_end" {
22+
default = "timeEnd"
23+
}
24+
25+
variable "delegated_resource_access_request_time_start" {
26+
default = "timeStart"
27+
}
28+
29+
30+
31+
provider "oci" {
32+
tenancy_ocid = var.tenancy_ocid
33+
user_ocid = var.user_ocid
34+
fingerprint = var.fingerprint
35+
private_key_path = var.private_key_path
36+
region = var.region
37+
}
38+
39+
data "oci_delegation_management_delegated_resource_access_requests" "test_delegated_resource_access_requests" {
40+
#Required
41+
compartment_id = var.compartment_id
42+
43+
#Optional
44+
delegation_control_id = var.test_delegation_control_id
45+
request_status = var.delegated_resource_access_request_request_status
46+
#resource_id = oci_usage_proxy_resource.test_resource.id
47+
state = var.delegated_resource_access_request_state
48+
#time_end = var.delegated_resource_access_request_time_end
49+
#time_start = var.delegated_resource_access_request_time_start
50+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (c) 2017, 2024, 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 "test_access_req_id" {}
10+
11+
variable "delegated_resource_access_request_audit_log_report_is_process_tree_enabled" {
12+
default = false
13+
}
14+
15+
16+
17+
provider "oci" {
18+
tenancy_ocid = var.tenancy_ocid
19+
user_ocid = var.user_ocid
20+
fingerprint = var.fingerprint
21+
private_key_path = var.private_key_path
22+
region = var.region
23+
}
24+
25+
data "oci_delegation_management_delegated_resource_access_request_audit_log_report" "test_delegated_resource_access_request_audit_log_report" {
26+
#Required
27+
delegated_resource_access_request_id = var.test_access_req_id
28+
29+
#Optional
30+
is_process_tree_enabled = var.delegated_resource_access_request_audit_log_report_is_process_tree_enabled
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2017, 2024, 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 "test_access_req_id" {}
10+
11+
12+
provider "oci" {
13+
tenancy_ocid = var.tenancy_ocid
14+
user_ocid = var.user_ocid
15+
fingerprint = var.fingerprint
16+
private_key_path = var.private_key_path
17+
region = var.region
18+
}
19+
20+
data "oci_delegation_management_delegated_resource_access_request_histories" "test_delegated_resource_access_request_histories" {
21+
#Required
22+
delegated_resource_access_request_id = var.test_access_req_id
23+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Copyright (c) 2017, 2024, 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_id" {}
10+
11+
variable "test_notification_topic_id"{
12+
}
13+
14+
variable "delegation_control_defined_tags_value" {
15+
default = "value"
16+
}
17+
18+
variable "delegation_control_delegation_subscription_ids" {
19+
}
20+
21+
variable "delegation_control_description" {
22+
default = "description"
23+
}
24+
25+
variable "delegation_control_display_name" {
26+
default = "displayName"
27+
}
28+
29+
variable "delegation_control_freeform_tags" {
30+
default = { "Department" = "Finance2" }
31+
}
32+
33+
variable "delegation_control_is_auto_approve_during_maintenance" {
34+
default = false
35+
}
36+
37+
variable "delegation_control_notification_message_format" {
38+
default = "JSON"
39+
}
40+
41+
variable "delegation_control_num_approvals_required" {
42+
default = 1
43+
}
44+
45+
variable "delegation_control_pre_approved_service_provider_action_names" {
46+
default = ["DLGT_MGMT_SYS_DIAG", "DLGT_MGMT_DBAAS_API_ACCESS"]
47+
}
48+
49+
variable "delegation_control_resource_ids" {
50+
}
51+
52+
variable "delegation_control_resource_type" {
53+
default = "VMCLUSTER"
54+
}
55+
56+
variable "delegation_control_state" {
57+
default = "AVAILABLE"
58+
}
59+
60+
61+
62+
provider "oci" {
63+
tenancy_ocid = var.tenancy_ocid
64+
user_ocid = var.user_ocid
65+
fingerprint = var.fingerprint
66+
private_key_path = var.private_key_path
67+
region = var.region
68+
}
69+
70+
resource "oci_delegation_management_delegation_control" "test_delegation_control" {
71+
#Required
72+
compartment_id = var.compartment_id
73+
delegation_subscription_ids = var.delegation_control_delegation_subscription_ids
74+
display_name = var.delegation_control_display_name
75+
notification_message_format = var.delegation_control_notification_message_format
76+
notification_topic_id = var.test_notification_topic_id
77+
resource_ids = var.delegation_control_resource_ids
78+
resource_type = var.delegation_control_resource_type
79+
80+
#Optional
81+
#defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.delegation_control_defined_tags_value)
82+
description = var.delegation_control_description
83+
freeform_tags = var.delegation_control_freeform_tags
84+
is_auto_approve_during_maintenance = var.delegation_control_is_auto_approve_during_maintenance
85+
num_approvals_required = var.delegation_control_num_approvals_required
86+
pre_approved_service_provider_action_names = var.delegation_control_pre_approved_service_provider_action_names
87+
#vault_id = oci_kms_vault.test_vault.id
88+
#vault_key_id = oci_kms_key.test_key.id
89+
}
90+
91+
data "oci_delegation_management_delegation_controls" "test_delegation_controls" {
92+
#Required
93+
compartment_id = var.compartment_id
94+
95+
#Optional
96+
#display_name = var.delegation_control_display_name
97+
#resource_id = oci_usage_proxy_resource.test_resource.id
98+
#resource_type = var.delegation_control_resource_type
99+
#state = var.delegation_control_state
100+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2017, 2024, 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 "test_delegation_control_id" {}
10+
11+
12+
provider "oci" {
13+
tenancy_ocid = var.tenancy_ocid
14+
user_ocid = var.user_ocid
15+
fingerprint = var.fingerprint
16+
private_key_path = var.private_key_path
17+
region = var.region
18+
}
19+
20+
data "oci_delegation_management_delegation_control_resources" "test_delegation_control_resources" {
21+
#Required
22+
delegation_control_id = var.test_delegation_control_id
23+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// Copyright (c) 2017, 2024, 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_id" {}
10+
11+
variable "delegation_subscription_defined_tags_value" {
12+
default = "value"
13+
}
14+
15+
variable "delegation_subscription_description" {
16+
default = "description"
17+
}
18+
19+
variable "delegation_subscription_display_name" {
20+
default = "displayName"
21+
}
22+
23+
variable "delegation_subscription_freeform_tags" {
24+
default = { "Department" = "Finance" }
25+
}
26+
27+
variable "delegation_subscription_state" {
28+
default = "ACTIVE"
29+
}
30+
31+
variable "delegation_subscription_subscribed_service_type" {
32+
default = "TROUBLESHOOTING"
33+
}
34+
35+
variable "test_service_provider_id" {
36+
}
37+
38+
variable "root_compartment_id" {
39+
}
40+
41+
42+
43+
provider "oci" {
44+
tenancy_ocid = var.tenancy_ocid
45+
user_ocid = var.user_ocid
46+
fingerprint = var.fingerprint
47+
private_key_path = var.private_key_path
48+
region = var.region
49+
}
50+
51+
resource "oci_delegation_management_delegation_subscription" "test_delegation_subscription" {
52+
#Required
53+
compartment_id = var.root_compartment_id
54+
service_provider_id = var.test_service_provider_id
55+
subscribed_service_type = var.delegation_subscription_subscribed_service_type
56+
57+
#Optional
58+
#defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.delegation_subscription_defined_tags_value)
59+
description = var.delegation_subscription_description
60+
#freeform_tags = var.delegation_subscription_freeform_tags
61+
}
62+
63+
data "oci_delegation_management_delegation_subscriptions" "test_delegation_subscriptions" {
64+
#Required
65+
compartment_id = var.compartment_id
66+
67+
#Optional
68+
display_name = var.delegation_subscription_display_name
69+
state = var.delegation_subscription_state
70+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright (c) 2017, 2024, 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_id" {}
10+
11+
variable "service_provider_name" {
12+
default = "name"
13+
}
14+
15+
variable "service_provider_service_provider_type" {
16+
default = "ORACLE_PROVIDED"
17+
}
18+
19+
variable "service_provider_state" {
20+
default = "ACTIVE"
21+
}
22+
23+
variable "service_provider_supported_resource_type" {
24+
default = "VMCLUSTER"
25+
}
26+
27+
variable "root_compartment_id" {
28+
default = "ocid1.tenancy.region1..aaaaaaaagyw5okosjg54csr3u5qgaxvtjufz55537h44mjy2umiqur4z5w3a"
29+
}
30+
31+
provider "oci" {
32+
tenancy_ocid = var.tenancy_ocid
33+
user_ocid = var.user_ocid
34+
fingerprint = var.fingerprint
35+
private_key_path = var.private_key_path
36+
region = var.region
37+
}
38+
39+
data "oci_delegation_management_service_providers" "test_service_providers" {
40+
#Required
41+
compartment_id = var.root_compartment_id
42+
43+
#Optional
44+
name = var.service_provider_name
45+
service_provider_type = var.service_provider_service_provider_type
46+
state = var.service_provider_state
47+
supported_resource_type = var.service_provider_supported_resource_type
48+
}

0 commit comments

Comments
 (0)