A project being monitored by a Metrics Scope.
To get more information about MonitoredProject, see:
resource "google_monitoring_monitored_project" "primary" {
metrics_scope = "my-project-name"
name = google_project.basic.project_id
}
resource "google_project" "basic" {
project_id = "m-id"
name = "m-id-display"
org_id = "123456789"
}
The following arguments are supported:
name
-
(Required)
Immutable. The resource name of the MonitoredProject
. 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/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}
metrics_scope
-
(Required)
Required. The resource name of the existing Metrics Scope that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format locations/global/metricsScopes/{{metrics_scope}}/projects/{{name}}
create_time
-
Output only. The time when this MonitoredProject
was created.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.MonitoredProject can be imported using any of these accepted formats:
v1/locations/global/metricsScopes/{{name}}
{{name}}
In Terraform v1.5.0 and later, use an import
block to import MonitoredProject using one of the formats above. For example:
import {
id = "v1/locations/global/metricsScopes/{{name}}"
to = google_monitoring_monitored_project.default
}
When using the terraform import
command, MonitoredProject can be imported using one of the formats above. For example:
$ terraform import google_monitoring_monitored_project.default v1/locations/global/metricsScopes/{{name}}
$ terraform import google_monitoring_monitored_project.default {{name}}