-
Notifications
You must be signed in to change notification settings - Fork 85
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 nat type to nat rule resource #1480
Conversation
494508f
to
51dbc46
Compare
PASS: TestAccResourceNsxtPolicyNATRuleT1_natType (48.34s) |
aee1f8b
to
77d7615
Compare
if err != nil { | ||
return handleCreateError("NAT Rule", id, err) | ||
} | ||
|
||
d.SetId(id) | ||
d.Set("nsx_id", id) | ||
// In case nat type was not specified or got overridden by action | ||
d.Set("type", natType) |
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.
Is this to restore any change that might have been done in line 311?
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.
No, this is create flow - if nat type was left blank by the user, we need to set the Computed
nat type that was determined in line 372
77d7615
to
ccb82f3
Compare
Before this change, only NAT64 and USER nat types were supported, and the value was calculated based on action. With this change, we need to keep in mind refresh of existing nat rule resources, hence the new type will be calculated. Signed-off-by: Anna Khmelnitsky <[email protected]>
ccb82f3
to
11b6bfd
Compare
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!
No description provided.