When using the data source rancher2_principal to search for a principal, it may return wrong result when one principal name is the prefix of another principal, for example: k8s-admin, k8s-admin-test
Solution
In this code , check the return result is really match the request name.
Testing
As the issue describe.
## Engineering Testing
### Manual Testing
Now the data source rancher2_principal will always return k8s-admin when you set the name as k8s-admin, instead of return k8s-admin-test.
Issue: https://github.com/rancher/terraform-provider-rancher2/issues/1330
Problem
When using the data source rancher2_principal to search for a principal, it may return wrong result when one principal name is the prefix of another principal, for example: k8s-admin, k8s-admin-test
Solution
In this code , check the return result is really match the request name.
Testing
As the issue describe. ## Engineering Testing ### Manual TestingNow the data source rancher2_principal will always return k8s-admin when you set the name as k8s-admin, instead of return k8s-admin-test.
Automated Testing
QA Testing Considerations
Regressions Considerations