diff --git a/addrs/resource.go b/addrs/resource.go index 2c1743e9a..a57a29255 100644 --- a/addrs/resource.go +++ b/addrs/resource.go @@ -22,7 +22,9 @@ func (r Resource) String() string { case DataResourceMode: return fmt.Sprintf("data.%s.%s", r.Type, r.Name) default: - panic(fmt.Errorf("resource address with invalid mode %s", r.Mode)) + // Should never happen, but we'll return a string here rather than + // crashing just in case it does. + return fmt.Sprintf(".%s.%s", r.Type, r.Name) } }