You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a resource where I need to compose the id of the resource from two other fields. I recalled k8s resource does something like that for example -
It's all theory in my head at this point. But looks like we should return some meaningful error from the function which decomposes the id into sub-parts, probably something like func idParts(string) (string, string, error)
The text was updated successfully, but these errors were encountered:
ashishth09
changed the title
Terraform import command failures for resources with ids of the form x/y
Terraform import command crash failures for resources with ids of the form x/y
Aug 6, 2017
Hi @radeksimko ,
I am writing a resource where I need to compose the
id
of the resource from two other fields. I recalledk8s
resource does something like that for example -https://github.com/terraform-providers/terraform-provider-kubernetes/blob/master/kubernetes/structures.go#L15-L18
It just clicked me that calls like below would lead to a crash if some one would do -
terraform import resource_kubernetes_config_map.mymap mapname
like someone forgets that actual id is
namespace/mapname
https://github.com/terraform-providers/terraform-provider-kubernetes/blob/master/kubernetes/resource_kubernetes_config_map.go#L79
It's all theory in my head at this point. But looks like we should return some meaningful error from the function which decomposes the id into sub-parts, probably something like
func idParts(string) (string, string, error)
The text was updated successfully, but these errors were encountered: