Skip to content

Commit ea44f07

Browse files
Prakash Rrashik-bhasin
authored andcommitted
Added - Support for Operator Access Control Service
1 parent fdad431 commit ea44f07

File tree

36 files changed

+5413
-0
lines changed

36 files changed

+5413
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright (c) 2017, 2021, 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 "access_request_resource_name" {
12+
default = "resourceName"
13+
}
14+
15+
variable "access_request_resource_type" {
16+
default = "EXADATAINFRASTRUCTURE"
17+
}
18+
19+
variable "access_request_state" {
20+
default = "APPROVED"
21+
}
22+
23+
variable "access_request_time_end" {
24+
default = "2020-01-02T15:04:05Z"
25+
}
26+
27+
variable "access_request_time_start" {
28+
default = "2006-01-02T15:04:05Z"
29+
}
30+
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+
data "oci_operator_access_control_access_requests" "test_access_requests" {
42+
#Required
43+
compartment_id = var.compartment_id
44+
resource_type = var.access_request_resource_type
45+
46+
47+
#Optional
48+
#resource_name = var.access_request_resource_name
49+
#resource_type = var.access_request_resource_type
50+
#state = var.access_request_state
51+
#time_end = var.access_request_time_end
52+
#time_start = var.access_request_time_start
53+
}
54+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (c) 2017, 2021, 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 "access_request_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_operator_access_control_access_request_history" "test_access_request_history" {
21+
#Required
22+
access_request_id = var.access_request_id
23+
}
24+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright (c) 2017, 2021, 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 "operator_action_name" {
12+
default = "name"
13+
}
14+
15+
variable "operator_action_resource_type" {
16+
default = "EXADATAINFRASTRUCTURE"
17+
}
18+
19+
variable "operator_action_state" {
20+
default = "ACTIVE"
21+
}
22+
23+
24+
25+
provider "oci" {
26+
tenancy_ocid = var.tenancy_ocid
27+
user_ocid = var.user_ocid
28+
fingerprint = var.fingerprint
29+
private_key_path = var.private_key_path
30+
region = var.region
31+
}
32+
33+
data "oci_operator_access_control_operator_actions" "test_operator_actions" {
34+
#Required
35+
compartment_id = var.compartment_id
36+
state = var.operator_action_state
37+
38+
#Optional
39+
name = var.operator_action_name
40+
resource_type = var.operator_action_resource_type
41+
42+
}
43+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// Copyright (c) 2017, 2021, 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 "operator_control_approver_groups_list" {
12+
default = []
13+
}
14+
15+
variable "operator_control_approvers_list" {
16+
default = []
17+
}
18+
19+
variable "operator_control_defined_tags_value" {
20+
default = "definedTags"
21+
}
22+
23+
variable "operator_control_description" {
24+
default = "description"
25+
}
26+
27+
variable "operator_control_display_name" {
28+
default = "displayName"
29+
}
30+
31+
variable "operator_control_email_id_list" {
32+
default = []
33+
}
34+
35+
variable "operator_control_freeform_tags" {
36+
default = "freeformTags"
37+
}
38+
39+
variable "operator_control_is_fully_pre_approved" {
40+
default = false
41+
}
42+
43+
variable "operator_control_pre_approved_op_action_list" {
44+
default = []
45+
}
46+
47+
variable "operator_control_resource_type" {
48+
default = "EXADATAINFRASTRUCTURE"
49+
}
50+
51+
variable "operator_control_state" {
52+
default = "CREATED"
53+
}
54+
55+
variable "operator_control_system_message" {
56+
default = "systemMessage"
57+
}
58+
59+
60+
61+
provider "oci" {
62+
tenancy_ocid = var.tenancy_ocid
63+
user_ocid = var.user_ocid
64+
fingerprint = var.fingerprint
65+
private_key_path = var.private_key_path
66+
region = var.region
67+
}
68+
69+
data "oci_identity_groups" "get_admin_approver_group" {
70+
#Required
71+
compartment_id = var.tenancy_ocid
72+
73+
#Optional
74+
name = "Administrators"
75+
}
76+
77+
resource "oci_operator_access_control_operator_control" "test_operator_control" {
78+
#Required
79+
compartment_id = var.compartment_id
80+
operator_control_name = "tfexample-opctl51"
81+
82+
#Optional
83+
approver_groups_list = [data.oci_identity_groups.get_admin_approver_group.groups[0].id]
84+
approvers_list = var.operator_control_approvers_list
85+
#defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.operator_control_defined_tags_value)
86+
description = var.operator_control_description
87+
email_id_list = var.operator_control_email_id_list
88+
#freeform_tags = var.operator_control_freeform_tags
89+
is_fully_pre_approved = var.operator_control_is_fully_pre_approved
90+
pre_approved_op_action_list = var.operator_control_pre_approved_op_action_list
91+
resource_type = var.operator_control_resource_type
92+
system_message = var.operator_control_system_message
93+
}
94+
95+
data "oci_operator_access_control_operator_controls" "test_operator_controls" {
96+
#Required
97+
compartment_id = var.compartment_id
98+
99+
#Optional
100+
display_name = var.operator_control_display_name
101+
resource_type = var.operator_control_resource_type
102+
state = var.operator_control_state
103+
}

0 commit comments

Comments
 (0)