Documentation
¶
Index ¶
- func CreateHttpReqPayload(ctx context.Context, data *NetworksApplianceVLANModel) (openApiClient.CreateNetworkApplianceVlanRequest, diag.Diagnostics)
- func CreateHttpResponse(ctx context.Context, data *NetworksApplianceVLANModel, ...) diag.Diagnostics
- func DatasourceReadHttpResponse(ctx context.Context, data *NetworksApplianceVLANModel, ...) diag.Diagnostics
- func Ipv6AttrTypes() map[string]attr.Type
- func Ipv6PrefixAssignmentAttrTypes() map[string]attr.Type
- func Ipv6PrefixAssignmentOriginAttrMap(origin *Ipv6PrefixAssignmentOrigin) map[string]attr.Value
- func Ipv6PrefixAssignmentOriginAttrTypes() map[string]attr.Type
- func NewNDatasource() datasource.DataSource
- func NewResource() resource.Resource
- func ReadHttpResponse(ctx context.Context, data *NetworksApplianceVLANModel, ...) diag.Diagnostics
- func UpdateHttpReqPayload(ctx context.Context, data *NetworksApplianceVLANModel) (*openApiClient.UpdateNetworkApplianceVlanRequest, diag.Diagnostics)
- type Datasource
- func (r *Datasource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (r *Datasource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (r *Datasource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (r *Datasource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type FixedIpAssignment
- type FixedIpAssignmentTerraform
- type Ipv6PrefixAssignment
- func (pa *Ipv6PrefixAssignment) FromAPIResponse(ctx context.Context, ...) diag.Diagnostics
- func (pa *Ipv6PrefixAssignment) ToAPIModel(ctx context.Context) (...)
- func (pa *Ipv6PrefixAssignment) ToAPIPayload(ctx context.Context) (...)
- func (pa *Ipv6PrefixAssignment) ToTerraformObject(ctx context.Context) (map[string]attr.Value, diag.Diagnostics)
- type Ipv6PrefixAssignmentOrigin
- type NetworksApplianceVLANModel
- type NetworksApplianceVLANModelIpv6
- type NetworksApplianceVLANModelMandatoryDhcp
- type NetworksApplianceVLANModelReservedIpRange
- type NetworksApplianceVLANResourceModelDhcpOption
- type Resource
- func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHttpReqPayload ¶
func CreateHttpReqPayload(ctx context.Context, data *NetworksApplianceVLANModel) (openApiClient.CreateNetworkApplianceVlanRequest, diag.Diagnostics)
func CreateHttpResponse ¶
func CreateHttpResponse(ctx context.Context, data *NetworksApplianceVLANModel, response *openApiClient.CreateNetworkApplianceVlan201Response) diag.Diagnostics
func DatasourceReadHttpResponse ¶
func DatasourceReadHttpResponse(ctx context.Context, data *NetworksApplianceVLANModel, response *openApiClient.GetNetworkApplianceVlans200ResponseInner) diag.Diagnostics
func Ipv6AttrTypes ¶
Ipv6AttrTypes is Used in both the vlan_resource and vlan_datasource
func Ipv6PrefixAssignmentAttrTypes ¶
Ipv6PrefixAssignmentAttrTypes returns the attribute types for a prefix assignment.
func Ipv6PrefixAssignmentOriginAttrMap ¶
func Ipv6PrefixAssignmentOriginAttrMap(origin *Ipv6PrefixAssignmentOrigin) map[string]attr.Value
Ipv6PrefixAssignmentOriginAttrMap returns the attribute map for a given origin. It converts a Ipv6PrefixAssignmentOrigin instance to a map suitable for ObjectValueFrom.
func Ipv6PrefixAssignmentOriginAttrTypes ¶
Ipv6PrefixAssignmentOriginAttrTypes returns the attribute types for the origin. This function is useful to define the schema of the origin in a consistent manner.
func NewNDatasource ¶
func NewNDatasource() datasource.DataSource
func NewResource ¶
func ReadHttpResponse ¶
func ReadHttpResponse(ctx context.Context, data *NetworksApplianceVLANModel, response *openApiClient.GetNetworkApplianceVlans200ResponseInner) diag.Diagnostics
ReadHttpResponse - used by READ, UPDATE & DELETE funcs
func UpdateHttpReqPayload ¶
func UpdateHttpReqPayload(ctx context.Context, data *NetworksApplianceVLANModel) (*openApiClient.UpdateNetworkApplianceVlanRequest, diag.Diagnostics)
Types ¶
type Datasource ¶
type Datasource struct {
// contains filtered or unexported fields
}
Datasource defines the resource implementation.
func (*Datasource) Configure ¶
func (r *Datasource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*Datasource) Metadata ¶
func (r *Datasource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*Datasource) Read ¶
func (r *Datasource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*Datasource) Schema ¶
func (r *Datasource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type FixedIpAssignment ¶
type Ipv6PrefixAssignment ¶
type Ipv6PrefixAssignment struct { Autonomous types.Bool `tfsdk:"autonomous" json:"autonomous"` StaticPrefix types.String `tfsdk:"static_prefix" json:"staticPrefix"` StaticApplianceIp6 types.String `tfsdk:"static_appliance_ip6" json:"staticApplianceIp6"` Origin types.Object `tfsdk:"origin" json:"origin"` }
Ipv6PrefixAssignment represents a prefix assignment for an IPv6 configuration in the VLAN resource model.
func (*Ipv6PrefixAssignment) FromAPIResponse ¶
func (pa *Ipv6PrefixAssignment) FromAPIResponse(ctx context.Context, apiPA *openApiClient.GetNetworkApplianceVlans200ResponseInnerIpv6PrefixAssignmentsInner) diag.Diagnostics
FromAPIResponse fills the Ipv6PrefixAssignment with data from the API response. This method transforms the OpenAPI response into the format expected by the Terraform provider. This method is used in both the vlan_resource and the vlan_datasource
func (*Ipv6PrefixAssignment) ToAPIModel ¶
func (pa *Ipv6PrefixAssignment) ToAPIModel(ctx context.Context) (*openApiClient.UpdateNetworkApplianceSingleLanRequestIpv6PrefixAssignmentsInner, diag.Diagnostics)
func (*Ipv6PrefixAssignment) ToAPIPayload ¶
func (pa *Ipv6PrefixAssignment) ToAPIPayload(ctx context.Context) (*openApiClient.UpdateNetworkApplianceSingleLanRequestIpv6PrefixAssignmentsInner, diag.Diagnostics)
ToAPIPayload converts the Terraform prefix assignment into the API prefix assignment payload.
func (*Ipv6PrefixAssignment) ToTerraformObject ¶
func (pa *Ipv6PrefixAssignment) ToTerraformObject(ctx context.Context) (map[string]attr.Value, diag.Diagnostics)
ToTerraformObject converts the Ipv6PrefixAssignment instance to a map suitable for ObjectValueFrom.
type Ipv6PrefixAssignmentOrigin ¶
type Ipv6PrefixAssignmentOrigin struct { Type types.String `tfsdk:"type" json:"type"` Interfaces types.Set `tfsdk:"interfaces" json:"interfaces"` }
Ipv6PrefixAssignmentOrigin represents the origin data structure for a VLAN resource model.
func (*Ipv6PrefixAssignmentOrigin) FromAPIResponse ¶
func (o *Ipv6PrefixAssignmentOrigin) FromAPIResponse(ctx context.Context, apiOrigin *openApiClient.CreateNetworkAppliancePrefixesDelegatedStaticRequestOrigin) diag.Diagnostics
FromAPIResponse fills the Ipv6PrefixAssignmentOrigin with data from the API response. This method transforms the OpenAPI response into the format expected by the Terraform provider.
func (*Ipv6PrefixAssignmentOrigin) ToAPIPayload ¶
func (o *Ipv6PrefixAssignmentOrigin) ToAPIPayload(ctx context.Context) (*openApiClient.UpdateNetworkApplianceSingleLanRequestIpv6PrefixAssignmentsInnerOrigin, diag.Diagnostics)
ToAPIPayload converts the Terraform origin into the API origin payload.
type NetworksApplianceVLANModel ¶
type NetworksApplianceVLANModel struct { Id types.String `tfsdk:"id" json:"-"` NetworkId types.String `tfsdk:"network_id" json:"networkId"` VlanId types.Int64 `tfsdk:"vlan_id" json:"id"` InterfaceId types.String `tfsdk:"interface_id" json:"interfaceId,omitempty"` Name types.String `tfsdk:"name" json:"name"` Subnet types.String `tfsdk:"subnet" json:"subnet"` ApplianceIp types.String `tfsdk:"appliance_ip" json:"applianceIp"` GroupPolicyId types.String `tfsdk:"group_policy_id" json:"groupPolicyId"` TemplateVlanType types.String `tfsdk:"template_vlan_type" json:"templateVlanType"` Cidr types.String `tfsdk:"cidr" json:"cidr"` Mask types.Int64 `tfsdk:"mask" json:"mask"` DhcpRelayServerIps types.List `tfsdk:"dhcp_relay_server_ips" json:"dhcpRelayServerIps"` DhcpHandling types.String `tfsdk:"dhcp_handling" json:"dhcpHandling"` DhcpLeaseTime types.String `tfsdk:"dhcp_lease_time" json:"dhcpLeaseTime"` DhcpBootOptionsEnabled types.Bool `tfsdk:"dhcp_boot_options_enabled" json:"dhcpBootOptionsEnabled"` DhcpBootNextServer types.String `tfsdk:"dhcp_boot_next_server" json:"dhcpBootNextServer"` DhcpBootFilename types.String `tfsdk:"dhcp_boot_filename" json:"dhcpBootFilename"` FixedIpAssignments types.Map `tfsdk:"fixed_ip_assignments" json:"fixedIpAssignments"` ReservedIpRanges types.List `tfsdk:"reserved_ip_ranges" json:"reservedIpRanges"` DnsNameservers types.String `tfsdk:"dns_nameservers" json:"dnsNameservers"` DhcpOptions types.List `tfsdk:"dhcp_options" json:"dhcpOptions"` VpnNatSubnet types.String `tfsdk:"vpn_nat_subnet" json:"vpnNatSubnet"` MandatoryDhcp types.Object `tfsdk:"mandatory_dhcp" json:"MandatoryDhcp"` IPv6 types.Object `tfsdk:"ipv6" json:"ipv6"` }
NetworksApplianceVLANModel is Used in both the vlan_resource and vlan_datasource
type NetworksApplianceVLANModelIpv6 ¶
type NetworksApplianceVLANModelIpv6 struct { Enabled types.Bool `tfsdk:"enabled" json:"enabled"` PrefixAssignments types.List `tfsdk:"prefix_assignments" json:"prefixAssignments"` }
NetworksApplianceVLANModelIpv6 represents the IPv6 configuration for a VLAN resource model. For both the vlan_resource and vlan_datasource
func (*NetworksApplianceVLANModelIpv6) FromAPIResponse ¶
func (m *NetworksApplianceVLANModelIpv6) FromAPIResponse(ctx context.Context, apiResponse *openApiClient.GetNetworkApplianceVlans200ResponseInnerIpv6) diag.Diagnostics
FromAPIResponse transforms an API response into the NetworksApplianceVLANModelIpv6 Terraform structure.
func (*NetworksApplianceVLANModelIpv6) ToAPIPayload ¶
func (m *NetworksApplianceVLANModelIpv6) ToAPIPayload(ctx context.Context) (*openApiClient.UpdateNetworkApplianceSingleLanRequestIpv6, diag.Diagnostics)
ToAPIPayload converts the Terraform resource data model into the API payload.
type NetworksApplianceVLANModelReservedIpRange ¶
type NetworksApplianceVLANModelReservedIpRange struct { Start types.String `tfsdk:"start" json:"start"` End types.String `tfsdk:"end" json:"end"` Comment types.String `tfsdk:"comment" json:"comment"` }
func (*NetworksApplianceVLANModelReservedIpRange) FromTerraformValue ¶
func (n *NetworksApplianceVLANModelReservedIpRange) FromTerraformValue(val tftypes.Value) error
type NetworksApplianceVLANResourceModelDhcpOption ¶
type NetworksApplianceVLANResourceModelDhcpOption struct { Code types.String `tfsdk:"code" json:"code"` Type types.String `tfsdk:"type" json:"type"` Value types.String `tfsdk:"value" json:"value"` }
func (*NetworksApplianceVLANResourceModelDhcpOption) FromTerraformValue ¶
func (n *NetworksApplianceVLANResourceModelDhcpOption) FromTerraformValue(val tftypes.Value) error
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource defines the resource implementation.
func (*Resource) Configure ¶
func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*Resource) Create ¶
func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*Resource) Delete ¶
func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶
func (r *Resource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*Resource) Read ¶
func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*Resource) Schema ¶
func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*Resource) Update ¶
func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)