Performing a terraform import on an xray_watch resource fails to set the name attribute in the state file and hence, causes Terraform to want to re-create the resource on the next apply to correctly set the name.
Looking at the xray_security_policy (which does work), it appears that when packing the watch, the code was missing the assignment of the name attribute.
Performing a
terraform import
on anxray_watch
resource fails to set thename
attribute in the state file and hence, causes Terraform to want to re-create the resource on the next apply to correctly set the name.Looking at the
xray_security_policy
(which does work), it appears that when packing thewatch
, the code was missing the assignment of thename
attribute.(See as per https://github.com/jfrog/terraform-provider-xray/blob/c7c60cc970811fdf214c2f1170d2a5dabdf59517/pkg/xray/policies.go#L620 in the
xray_security_policy
)