Open umairidris opened 5 years ago
Same for google_monitoring_notification_channel.
I'm looking at adding import formats for both of these that accept project as well. The import format will change, looking something like terraform import google_logging_metric.iam-policy-change-count my-project/iam-policy-change-count
As a workaround you can set your provider default project to the project these resources live in and import should work
Thanks Sam. I have already been using the workaround, but thought it's worth filing a bug as it was an unexpected behaviour.
Changing import format SGTM.
Any progress on this? The suggested workaround is giving me the same error:
Error: project: required field is not set
If you set the project and the metric name between double quote and with space, the import work well. Example:
terraform import google_logging_metric.iam-policy-change-count "my-project iam-policy-change-count"
A good fix can be to add a new import format on this resource like say @slevenick
Community Note
Terraform Version
0.12.6 (provider version 2.8.0)
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Import should have succeeded.
Actual Behavior
Import raised error:
Error: project: required field is not set
Steps to Reproduce
terraform import google_logging_metric.iam-policy-change-count iam-policy-change-count
Important Factoids
References
973
1410
b/299443214