Open quipcode opened 1 year ago
Sorry for the inconvience @quipcode I've just dug into this and also encountered issues.
Using the following reproduction code:
const metric = new google.logging.v2.Metric("test", {
filter: "resource.type=gae_app AND severity>=ERROR",
});
I actually ran into a slightly different issue.
projects/***/metrics/test-30ec313
object retrieval failure after successful create / read state: googleapi: Error 404: Metric test-be96141 does not exist
test-be96141
(different to preview).pulumi refresh
to retry the read.For now I'd recommend using the Google Cloud Classic provider:
const metric = new gcp.logging.Metric("test", {
filter: "resource.type=gae_app AND severity>=ERROR",
metricDescriptor: {
metricKind: "DELTA",
valueType: "INT64",
},
});
I worked through the same workflow you described above and encountered no issues.
Thank you will use the classic provider
What happened?
When initially creating a new Metric resource we observed the resource is named as
projects/[YOUR-PROJECT-ID]/metrics/[METRIC_NAME]
. Any subsequent updates to said resources creates a new resource with the expected name ofMETRIC_NAME
Steps to reproduce
projects/[YOUR-PROJECT-ID]/metrics/[METRIC_NAME]
METRIC_NAME
Expected Behavior
Metric's resource should be created with user specified resource name
Actual Behavior
Provider creates Metric's resource pre-pending the following relative path
projects/[YOUR-PROJECT-ID]/metrics
to the user specified resource nameOutput of
pulumi about
No response
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).