googleMonitoringMonitoredProject
Monitored Project allows you to set a project as monitored by a metrics scope, which is a term for a project used to group the metrics of multiple projects, potentially across multiple organizations. This enables you to view these groups in the Monitoring page of the cloud console.
For more information, see:
Example Usage - basic_monitored_project
A basic example of a monitoring monitored project
/*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 googleProjectBasic = new google.project.Project(this, "basic", {
name: "my-monitored-project",
org_id: "123456789",
project_id: "my-monitored-project",
});
new google.monitoringMonitoredProject.MonitoringMonitoredProject(
this,
"primary",
{
metrics_scope: "existing-metrics-scope-project",
name: googleProjectBasic.name,
}
);
Argument Reference
The following arguments are supported:
-
metricsScope
- (Required) Required. The resource name of the existing Metrics Scope that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER} -
name
- (Required) Immutable. The resource name of themonitoredProject
. On input, the resource name includes the scoping project ID and monitored project ID. On output, it contains the equivalent project numbers. Example:locations/global/metricsScopes/{scopingProjectIdOrNumber}/projects/{monitoredProjectIdOrNumber}
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
-
id
- an identifier for the resource with formatlocations/global/metricsScopes/{{metricsScope}}/projects/{{name}}
-
createTime
- Output only. The time when thismonitoredProject
was created.
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.
Import
MonitoredProject can be imported using any of these accepted formats: