googleProjects
Retrieve information about a set of projects based on a filter. See the REST API for more details.
Example Usage - searching for projects about to be deleted in an org
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const dataGoogleProjectsMyOrgProjects =
new google.dataGoogleProjects.DataGoogleProjects(this, "my-org-projects", {
filter: "parent.id:012345678910 lifecycleState:DELETE_REQUESTED",
});
new google.dataGoogleProject.DataGoogleProject(this, "deletion-candidate", {
project_id: `\${${dataGoogleProjectsMyOrgProjects.projects.fqn}[0].project_id}`,
});
Argument Reference
The following arguments are supported:
filter
- (Required) A string filter as defined in the REST API.
Attributes Reference
The following attributes are exported:
projects
- A list of projects matching the provided filter. Structure is defined below.
projectId
- The project id of the project.number
- The numeric identifier of the project.name
- The optional user-assigned display name of the project.labels
- A set of key/value label pairs assigned on a project.lifecycleState
- The Project lifecycle state.createTime
- Creation time in RFC3339 UTC "Zulu" format.parent
- An optional reference to a parent resource.