Monitored Project
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
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.monitoring.MonitoredProject;
import com.pulumi.gcp.monitoring.MonitoredProjectArgs;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new MonitoredProject("primary", MonitoredProjectArgs.builder()
.metricsScope("existing-metrics-scope-project")
.build());
var basic = new Project("basic", ProjectArgs.builder()
.projectId("my-monitored-project")
.orgId("123456789")
.build());
}
}
Content copied to clipboard
Import
MonitoredProject can be imported using any of these accepted formats
$ pulumi import gcp:monitoring/monitoredProject:MonitoredProject default locations/global/metricsScopes/{{metrics_scope}}/projects/{{name}}
Content copied to clipboard
$ pulumi import gcp:monitoring/monitoredProject:MonitoredProject default {{metrics_scope}}/{{name}}
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
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}
Link copied to clipboard