-
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 PolicyTransportZone resource #940
Conversation
} | ||
siteID = d.Get("site_id").(string) | ||
if siteID == "" { | ||
siteID = defaultSite |
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 there a reason not to specify this default in the schema instead?
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.
Sure. Will make it default in schema.
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.
@annakhm Actually we can't use default with computed.
Default must be nil if computed
For our use case this must be computed I assume, so we have to set the fallback value in CRUD logic.
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.
Why does this need to be computed, in case default is set whenever the user does not specify the value? Does platform ever override this value?
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.
OK I got what you're saying.
Also want to confirm that for enforcement_point_id
this has to be done with current approach, correct?
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.
Yes, I don't think enforcement point has a default
Code LGTM, no doc or test? |
1bb18f6
to
a995a2d
Compare
/test-all |
2 similar comments
/test-all |
/test-all |
Default: defaultInfraSitePath, | ||
ValidateFunc: validatePolicyPath(), | ||
}, | ||
"enforcement_point_id": { |
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 would suggest to rename this to enforcement_point
to be consistent with provider attribute
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.
done
/test-all |
|
||
# nsxt_policy_transport_zone | ||
|
||
This resource provides a method for the management of Policy based Transport Zones (TZ). A Transport Zone defines the scope to which a network can extend in NSX. For example an overlay based Transport Zone is associated with both hypervisors and logical switches and defines which hypervisors will be able to serve the defined logical switch. Virtual machines on the hypervisor associated with a Transport Zone can be attached to logical switches in that same Transport Zone. |
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 think we should use policy terminology here (segment rather than logical switch)
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.
done
/test-all |
/test-all |
Signed-off-by: Shawn Wang <[email protected]>
Signed-off-by: Shawn Wang <[email protected]>
Signed-off-by: Shawn Wang <[email protected]>
Signed-off-by: Shawn Wang <[email protected]>
Signed-off-by: Shawn Wang <[email protected]>
Signed-off-by: Shawn Wang <[email protected]>
/test-all |
This change adds PolicyTransportZone as resource.
Compared to existing data source, the following changes are made:
site_path
andenforcement_point_id
in case a TZ is to be created under non-default site / ep. When left out, the resource will still be CRUD'ed from default / default, or default /nsxt.enforcement_point
in case of VMCsite_path
,enforcement_point_id
andtransport_type
are madeForceNew
as they are immutable.uplink_teaming_policy_names
which is only supported onVLAN_BACKED
transport zones.Fields not added due to missing from current SDK:
forwarding_mode
: Choice ofIPV4_ONLY
,IPV6_ONLY
,IPV4_AND_IPV6
infra
client is used.Fields not added due to missing data source and unclear use case:
transport_zone_profile_paths
: List of/infra/transport-zone-profiles
. This option is not even showing up on current UI.