Skip to content

Commit a467303

Browse files
thoufic67mthoufic
andauthored
cloudsecuritycompliace: add google_cloud_security_compliance_framework_deployment resource (#15361)
Co-authored-by: Thoufic <[email protected]>
1 parent 83730c0 commit a467303

File tree

4 files changed

+532
-0
lines changed

4 files changed

+532
-0
lines changed
Lines changed: 317 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,317 @@
1+
# Copyright 2025 Google Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
---
15+
name: FrameworkDeployment
16+
description: Framework deployments represent the assignment of a framework to a target resource. Supported target resources are organizations, folders, and projects.
17+
references:
18+
api: https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.frameworkDeployments
19+
base_url: organizations/{{organization}}/locations/{{location}}/frameworkDeployments
20+
immutable: true
21+
self_link: organizations/{{organization}}/locations/{{location}}/frameworkDeployments/{{framework_deployment_id}}
22+
create_url: organizations/{{organization}}/locations/{{location}}/frameworkDeployments?frameworkDeploymentId={{framework_deployment_id}}
23+
id_format: organizations/{{organization}}/locations/{{location}}/frameworkDeployments/{{framework_deployment_id}}
24+
import_format:
25+
- organizations/{{organization}}/locations/{{location}}/frameworkDeployments/{{framework_deployment_id}}
26+
examples:
27+
- name: "cloudsecuritycompliance_framework_deployment_basic"
28+
primary_resource_id: "example"
29+
vars:
30+
deployment_name: "example-deployment"
31+
framework_name: "example-framework"
32+
test_env_vars:
33+
org_id: "ORG_ID"
34+
- name: "cloudsecuritycompliance_framework_deployment_folder_creation"
35+
primary_resource_id: "example"
36+
vars:
37+
deployment_name: "example-deployment-folder"
38+
framework_name: "example-framework-folder"
39+
folder_display_name: "cm-folder"
40+
test_env_vars:
41+
org_id: "ORG_ID"
42+
- name: "cloudsecuritycompliance_framework_deployment_project_creation"
43+
primary_resource_id: "example"
44+
vars:
45+
deployment_name: "example-deployment-project"
46+
framework_name: "example-framework-project"
47+
project_display_name: "cm-project"
48+
test_env_vars:
49+
org_id: "ORG_ID"
50+
billing_account: "BILLING_ACCT"
51+
autogen_async: true
52+
async:
53+
operation:
54+
timeouts:
55+
insert_minutes: 20
56+
delete_minutes: 20
57+
base_url: "{{op_id}}"
58+
actions:
59+
- create
60+
- delete
61+
type: OpAsync
62+
result:
63+
resource_inside_response: true
64+
include_project: false
65+
autogen_status: RnJhbWV3b3JrRGVwbG95bWVudA==
66+
parameters:
67+
- name: organization
68+
type: String
69+
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
70+
immutable: true
71+
url_param_only: true
72+
required: true
73+
- name: location
74+
type: String
75+
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
76+
immutable: true
77+
url_param_only: true
78+
required: true
79+
- name: frameworkDeploymentId
80+
type: String
81+
description: |-
82+
User provided identifier. It should be unique in scope of a parent.
83+
This is optional and if not provided, a random UUID will be generated.
84+
immutable: true
85+
url_param_only: true
86+
required: true
87+
properties:
88+
- name: cloudControlDeploymentReferences
89+
type: Array
90+
description: |-
91+
The references to the cloud control deployments. It has all the
92+
CloudControlDeployments which are either directly added in the framework or
93+
through a CloudControlGroup.
94+
Example: If a framework deployment deploys two
95+
cloud controls, cc-deployment-1 and cc-deployment-2, then the
96+
cloud_control_deployment_references will be:
97+
{
98+
cloud_control_deployment_reference: {
99+
cloud_control_deployment:
100+
"organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-1"
101+
},
102+
cloud_control_deployment_reference: {
103+
cloud_control_deployment:
104+
"organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2"
105+
}
106+
output: true
107+
item_type:
108+
type: NestedObject
109+
properties:
110+
- name: cloudControlDeployment
111+
type: String
112+
description: |-
113+
The name of the CloudControlDeployment. The format is:
114+
organizations/{org}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}
115+
output: true
116+
- name: cloudControlMetadata
117+
type: Array
118+
description: |-
119+
Deployment mode and parameters for each of the Cloud Controls in
120+
the framework. Every Cloud Control in the framework must have a
121+
CloudControlMetadata.
122+
required: true
123+
item_type:
124+
type: NestedObject
125+
properties:
126+
- name: cloudControlDetails
127+
type: NestedObject
128+
description: CloudControlDetails contains the details of a CloudControl.
129+
required: true
130+
properties:
131+
- name: majorRevisionId
132+
type: String
133+
description: Major revision of cloudcontrol
134+
required: true
135+
- name: name
136+
type: String
137+
description: |-
138+
The name of the CloudControl in the format:
139+
“organizations/{organization}/locations/{location}/
140+
cloudControls/{cloud-control}”
141+
required: true
142+
- name: parameters
143+
type: Array
144+
description: |-
145+
Parameters is a key-value pair that is required by the CloudControl. The
146+
specification of these parameters will be present in cloudcontrol.Eg: {
147+
"name": "location","value": "us-west-1"}.
148+
item_type:
149+
type: NestedObject
150+
properties:
151+
- name: name
152+
type: String
153+
description: The name of the parameter.
154+
required: true
155+
- name: parameterValue
156+
type: NestedObject
157+
description: Possible parameter value types.
158+
required: true
159+
properties:
160+
- name: boolValue
161+
type: Boolean
162+
description: Represents a boolean value.
163+
- name: numberValue
164+
type: Double
165+
description: Represents a double value.
166+
- name: stringListValue
167+
type: NestedObject
168+
description: A list of strings.
169+
properties:
170+
- name: values
171+
type: Array
172+
description: The strings in the list.
173+
required: true
174+
item_type:
175+
type: String
176+
- name: stringValue
177+
type: String
178+
description: Represents a string value.
179+
- name: enforcementMode
180+
type: String
181+
description: |-
182+
Enforcement mode for the framework deployment.
183+
Possible values:
184+
PREVENTIVE
185+
DETECTIVE
186+
AUDIT
187+
required: true
188+
- name: computedTargetResource
189+
type: String
190+
description: |-
191+
The resource on which the Framework is deployed based on the provided
192+
TargetResourceConfig in the following format:
193+
organizations/{organization}, folders/{folder} or projects/{project}
194+
output: true
195+
- name: createTime
196+
type: String
197+
description: The time at which the resource was created.
198+
output: true
199+
- name: deploymentState
200+
type: String
201+
description: |-
202+
The deployment state of the framework.
203+
Possible values:
204+
DEPLOYMENT_STATE_VALIDATING
205+
DEPLOYMENT_STATE_CREATING
206+
DEPLOYMENT_STATE_DELETING
207+
DEPLOYMENT_STATE_FAILED
208+
DEPLOYMENT_STATE_READY
209+
DEPLOYMENT_STATE_PARTIALLY_DEPLOYED
210+
DEPLOYMENT_STATE_PARTIALLY_DELETED
211+
output: true
212+
- name: description
213+
type: String
214+
description: User provided description of the Framework deployment
215+
- name: etag
216+
type: String
217+
description: |-
218+
To prevent concurrent updates from overwriting each other, always provide
219+
the `etag` when you update a FrameworkDeployment. You can also
220+
provide the `etag` when you delete a FrameworkDeployment, to help
221+
ensure that you're deleting the intended version of the
222+
FrameworkDeployment.
223+
output: true
224+
- name: framework
225+
type: NestedObject
226+
description: FrameworkReference contains the reference of a framework.
227+
required: true
228+
properties:
229+
- name: framework
230+
type: String
231+
description: |-
232+
In the format:
233+
organizations/{org}/locations/{location}/frameworks/{framework}
234+
required: true
235+
- name: majorRevisionId
236+
type: String
237+
description: |-
238+
Major revision id of the framework.
239+
required: true
240+
- name: name
241+
type: String
242+
description: |-
243+
Identifier. FrameworkDeployment name in the following format:
244+
organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}
245+
output: true
246+
- name: targetResourceConfig
247+
type: NestedObject
248+
description: |-
249+
TargetResourceConfig contains either the name of the target_resource or
250+
contains the config to create a new target_resource.
251+
required: true
252+
properties:
253+
- name: existingTargetResource
254+
type: String
255+
description: |-
256+
CRM node in format organizations/{organization}, folders/{folder},
257+
or projects/{project}
258+
exactly_one_of:
259+
- "target_resource_config.0.existing_target_resource"
260+
- "target_resource_config.0.target_resource_creation_config"
261+
- name: targetResourceCreationConfig
262+
type: NestedObject
263+
description: |-
264+
TargetResourceCreationConfig contains the config to create a new resource to
265+
be used as the target_resource of a deployment.
266+
exactly_one_of:
267+
- "target_resource_config.0.existing_target_resource"
268+
- "target_resource_config.0.target_resource_creation_config"
269+
properties:
270+
- name: folderCreationConfig
271+
type: NestedObject
272+
description: |-
273+
FolderCreationConfig contains the config to create a new folder to be used
274+
as the target_resource of a deployment.
275+
exactly_one_of:
276+
- "target_resource_config.0.target_resource_creation_config.0.folder_creation_config"
277+
- "target_resource_config.0.target_resource_creation_config.0.project_creation_config"
278+
properties:
279+
- name: folderDisplayName
280+
type: String
281+
description: Display name of the folder to be created
282+
required: true
283+
- name: parent
284+
type: String
285+
description: |-
286+
The parent of the folder to be created. It can be an organizations/{org} or
287+
folders/{folder}
288+
required: true
289+
- name: projectCreationConfig
290+
type: NestedObject
291+
description: |-
292+
ProjectCreationConfig contains the config to create a new project to be used
293+
as the target_resource of a deployment.
294+
exactly_one_of:
295+
- "target_resource_config.0.target_resource_creation_config.0.folder_creation_config"
296+
- "target_resource_config.0.target_resource_creation_config.0.project_creation_config"
297+
properties:
298+
- name: billingAccountId
299+
type: String
300+
description: Billing account id to be used for the project.
301+
required: true
302+
- name: parent
303+
type: String
304+
description: organizations/{org} or folders/{folder}
305+
required: true
306+
- name: projectDisplayName
307+
type: String
308+
description: Display name of the project to be created.
309+
required: true
310+
- name: targetResourceDisplayName
311+
type: String
312+
description: The display name of the target resource.
313+
output: true
314+
- name: updateTime
315+
type: String
316+
description: The time at which the resource last updated.
317+
output: true

0 commit comments

Comments
 (0)