-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VPC path importer func #1235
base: master
Are you sure you want to change the base?
Conversation
/test-all |
nsxt/policy_utils.go
Outdated
func nsxtVPCPathResourceImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { | ||
rd, err := nsxtPolicyPathResourceImporterHelper(d, m) | ||
if errors.Is(err, ErrNotAPolicyPath) { | ||
return rd, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this behavior in other importer as well - could you please remind me why we swallow ErrNotAPolicyPath
error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In importers which support importing via both path
and id
, it's used to handle the id
case. In this case it's a bug, I'll fix this.
VPC resources use policy path to import resources into the TF state. This importer func does some validation that the required attributes for a policy resource import do exist. Signed-off-by: Kobi Samoray <kobi.samoray@broadcom.com>
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
VPC resources use policy path to import resources into the TF state. This importer func does some validation that the required attributes for a policy resource import do exist.