googleComputeSnapshot
To get more information about Snapshot, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage
/*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.*/
new google.dataGoogleComputeSnapshot.DataGoogleComputeSnapshot(
this,
"latest-snapshot",
{
filter: "name != my-snapshot",
most_recent: true,
}
);
new google.dataGoogleComputeSnapshot.DataGoogleComputeSnapshot(
this,
"snapshot",
{
name: "my-snapshot",
}
);
Argument Reference
The following arguments are supported:
-
name- (Optional) The name of the compute snapshot. One ofnameorfiltermust be provided. -
filter- (Optional) A filter to retrieve the compute snapshot. See gcloud topic filters for reference. If multiple compute snapshot match, either adjust the filter or specifymostRecent. One ofnameorfiltermust be provided. -
mostRecent- (Optional) Iffilteris provided, ensures the most recent snapshot is returned when multiple compute snapshot match.
project- (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Attributes Reference
See google_compute_snapshot resource for details of the available attributes.