blueprint

package
v0.57.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommentTemplateReplacements = []string{"{{.TerraformVersion}}", "{{.ProviderVersion}}"}

Functions

func NodeTags

func NodeTags(ctx context.Context, id string, client apstra.TwoStageL3ClosClient, diags *diag.Diagnostics) []string

Types

type Anomalies

type Anomalies struct {
	BlueprintId      types.String `tfsdk:"blueprint_id"`
	Details          types.Set    `tfsdk:"details"`
	SummaryByNode    types.Set    `tfsdk:"summary_by_node"`
	SummaryByService types.Set    `tfsdk:"summary_by_service"`
}

func (Anomalies) DataSourceAttributes

func (o Anomalies) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (*Anomalies) ReadAnomalyDetailsFromApi

func (o *Anomalies) ReadAnomalyDetailsFromApi(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (*Anomalies) ReadAnomalyNodeSummariesFromApi

func (o *Anomalies) ReadAnomalyNodeSummariesFromApi(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (*Anomalies) ReadAnomalyServiceSummariesFromApi

func (o *Anomalies) ReadAnomalyServiceSummariesFromApi(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (*Anomalies) ReadFromApi

func (o *Anomalies) ReadFromApi(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

type AntiAffinityPolicy added in v0.53.0

type AntiAffinityPolicy struct {
	MaxLinksCountPerSlot          types.Int64 `tfsdk:"max_links_count_per_slot"`
	MaxLinksCountPerSystemPerSlot types.Int64 `tfsdk:"max_links_count_per_system_per_slot"`
	MaxLinksCountPerPort          types.Int64 `tfsdk:"max_links_count_per_port"`
	MaxLinksCountPerSystemPerPort types.Int64 `tfsdk:"max_links_count_per_system_per_port"`
}

type Blueprint

type Blueprint struct {
	Id               types.String `tfsdk:"id"`
	Name             types.String `tfsdk:"name"`
	TemplateId       types.String `tfsdk:"template_id"`
	FabricAddressing types.String `tfsdk:"fabric_addressing"`

	// status
	Status                types.String `tfsdk:"status"`
	SuperspineCount       types.Int64  `tfsdk:"superspine_switch_count"`
	SpineCount            types.Int64  `tfsdk:"spine_switch_count"`
	LeafCount             types.Int64  `tfsdk:"leaf_switch_count"`
	AccessCount           types.Int64  `tfsdk:"access_switch_count"`
	GenericCount          types.Int64  `tfsdk:"generic_system_count"`
	ExternalCount         types.Int64  `tfsdk:"external_router_count"`
	HasUncommittedChanges types.Bool   `tfsdk:"has_uncommitted_changes"`
	Version               types.Int64  `tfsdk:"version"`
	BuildErrorsCount      types.Int64  `tfsdk:"build_errors_count"`
	BuildWarningsCount    types.Int64  `tfsdk:"build_warnings_count"`

	// fabric settings
	AntiAffinityMode                      types.String `tfsdk:"anti_affinity_mode"`
	AntiAffinityPolicy                    types.Object `tfsdk:"anti_affinity_policy"`
	DefaultIpLinksToGenericMtu            types.Int64  `tfsdk:"default_ip_links_to_generic_mtu"`
	DefaultSviL3Mtu                       types.Int64  `tfsdk:"default_svi_l3_mtu"`
	EsiMacMsb                             types.Int64  `tfsdk:"esi_mac_msb"`
	EvpnType5Routes                       types.Bool   `tfsdk:"evpn_type_5_routes"`
	FabricMtu                             types.Int64  `tfsdk:"fabric_mtu"`
	Ipv6Applications                      types.Bool   `tfsdk:"ipv6_applications"`
	JunosEvpnMaxNexthopAndInterfaceNumber types.Bool   `tfsdk:"junos_evpn_max_nexthop_and_interface_number"`
	JunosEvpnRoutingInstanceModeMacVrf    types.Bool   `tfsdk:"junos_evpn_routing_instance_mode_mac_vrf"`
	JunosExOverlayEcmp                    types.Bool   `tfsdk:"junos_ex_overlay_ecmp"`
	JunosGracefulRestart                  types.Bool   `tfsdk:"junos_graceful_restart"`
	MaxEvpnRoutesCount                    types.Int64  `tfsdk:"max_evpn_routes_count"`
	MaxExternalRoutesCount                types.Int64  `tfsdk:"max_external_routes_count"`
	MaxFabricRoutesCount                  types.Int64  `tfsdk:"max_fabric_routes_count"`
	MaxMlagRoutesCount                    types.Int64  `tfsdk:"max_mlag_routes_count"`
	OptimizeRoutingZoneFootprint          types.Bool   `tfsdk:"optimize_routing_zone_footprint"`
}

func (Blueprint) DataSourceAttributes

func (o Blueprint) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (*Blueprint) FabricSettings added in v0.53.0

func (o *Blueprint) FabricSettings(ctx context.Context, diags *diag.Diagnostics) *apstra.FabricSettings

func (*Blueprint) GetFabricSettings added in v0.53.0

func (o *Blueprint) GetFabricSettings(ctx context.Context, bp *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

func (*Blueprint) LoadAntiAffninityPolicy added in v0.53.0

func (o *Blueprint) LoadAntiAffninityPolicy(ctx context.Context, antiAffinitypolicy *apstra.AntiAffinityPolicy, diags *diag.Diagnostics)

func (*Blueprint) LoadApiData

func (o *Blueprint) LoadApiData(_ context.Context, in *apstra.BlueprintStatus, _ *diag.Diagnostics)

func (*Blueprint) LoadFabricSettings added in v0.53.0

func (o *Blueprint) LoadFabricSettings(ctx context.Context, settings *apstra.FabricSettings, diags *diag.Diagnostics)

func (*Blueprint) Request

func (Blueprint) ResourceAttributes

func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute

func (*Blueprint) SetFabricSettings added in v0.53.0

func (o *Blueprint) SetFabricSettings(ctx context.Context, bp *apstra.TwoStageL3ClosClient, state *Blueprint, diags *diag.Diagnostics)

func (*Blueprint) SetName

func (o *Blueprint) SetName(ctx context.Context, bpClient *apstra.TwoStageL3ClosClient, state *Blueprint, diags *diag.Diagnostics)

func (Blueprint) VersionConstraints added in v0.50.1

func (o Blueprint) VersionConstraints() apiversions.Constraints

type CommentTemplate

type CommentTemplate struct {
	ProviderVersion  string
	TerraformVersion string
}

type ConnectivityTemplate

type ConnectivityTemplate struct {
	Id          types.String `tfsdk:"id"`
	BlueprintId types.String `tfsdk:"blueprint_id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Tags        types.Set    `tfsdk:"tags"`
	Primitives  types.Set    `tfsdk:"primitives"`
}

func (*ConnectivityTemplate) LoadApiData

func (ConnectivityTemplate) Request

func (ConnectivityTemplate) ResourceAttributes

func (o ConnectivityTemplate) ResourceAttributes() map[string]resourceSchema.Attribute

type ConnectivityTemplateAssignments added in v0.46.0

type ConnectivityTemplateAssignments struct {
	BlueprintId            types.String `tfsdk:"blueprint_id"`
	ConnectivityTemplateId types.String `tfsdk:"connectivity_template_id"`
	ApplicationPointIds    types.Set    `tfsdk:"application_point_ids"`
}

func (*ConnectivityTemplateAssignments) Request added in v0.46.0

func (ConnectivityTemplateAssignments) ResourceAttributes added in v0.46.0

type ConnectivityTemplatesAssignment added in v0.46.0

type ConnectivityTemplatesAssignment struct {
	BlueprintId             types.String `tfsdk:"blueprint_id"`
	ConnectivityTemplateIds types.Set    `tfsdk:"connectivity_template_ids"`
	ApplicationPointId      types.String `tfsdk:"application_point_id"`
}

func (*ConnectivityTemplatesAssignment) AddDelRequest added in v0.46.0

func (ConnectivityTemplatesAssignment) ResourceAttributes added in v0.46.0

type DatacenterConfiglet added in v0.35.0

type DatacenterConfiglet struct {
	BlueprintId        types.String `tfsdk:"blueprint_id"`
	Id                 types.String `tfsdk:"id"`
	Condition          types.String `tfsdk:"condition"`
	CatalogConfigletID types.String `tfsdk:"catalog_configlet_id"`
	Name               types.String `tfsdk:"name"`
	Generators         types.List   `tfsdk:"generators"`
}

func (DatacenterConfiglet) DataSourceAttributes added in v0.35.0

func (o DatacenterConfiglet) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (*DatacenterConfiglet) LoadApiData added in v0.35.0

func (*DatacenterConfiglet) Request added in v0.35.0

func (DatacenterConfiglet) ResourceAttributes added in v0.35.0

func (o DatacenterConfiglet) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterExternalGateway added in v0.41.0

type DatacenterExternalGateway struct {
	Id                types.String        `tfsdk:"id"`
	BlueprintId       types.String        `tfsdk:"blueprint_id"`
	Name              types.String        `tfsdk:"name"`
	IpAddress         iptypes.IPv4Address `tfsdk:"ip_address"`
	Asn               types.Int64         `tfsdk:"asn"`
	Ttl               types.Int64         `tfsdk:"ttl"`
	KeepaliveTime     types.Int64         `tfsdk:"keepalive_time"`
	HoldTime          types.Int64         `tfsdk:"hold_time"`
	EvpnRouteTypes    types.String        `tfsdk:"evpn_route_types"`
	LocalGatewayNodes types.Set           `tfsdk:"local_gateway_nodes"`
	Password          types.String        `tfsdk:"password"`
}

func (DatacenterExternalGateway) DataSourceAttributes added in v0.41.0

func (o DatacenterExternalGateway) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterExternalGateway) DataSourceAttributesAsFilter added in v0.41.0

func (o DatacenterExternalGateway) DataSourceAttributesAsFilter() map[string]dataSourceSchema.Attribute

func (*DatacenterExternalGateway) FilterMatch added in v0.41.0

func (*DatacenterExternalGateway) LoadApiData added in v0.41.0

func (*DatacenterExternalGateway) Read added in v0.41.0

func (*DatacenterExternalGateway) ReadProtocolPassword added in v0.41.0

func (o *DatacenterExternalGateway) ReadProtocolPassword(ctx context.Context, bp *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

func (*DatacenterExternalGateway) Request added in v0.41.0

func (DatacenterExternalGateway) ResourceAttributes added in v0.41.0

func (o DatacenterExternalGateway) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterGenericSystem

type DatacenterGenericSystem struct {
	Id                types.String         `tfsdk:"id"`
	BlueprintId       types.String         `tfsdk:"blueprint_id"`
	Name              types.String         `tfsdk:"name"`
	Hostname          types.String         `tfsdk:"hostname"`
	Tags              types.Set            `tfsdk:"tags"`
	Links             types.Set            `tfsdk:"links"`
	Asn               types.Int64          `tfsdk:"asn"`
	LoopbackIpv4      cidrtypes.IPv4Prefix `tfsdk:"loopback_ipv4"`
	LoopbackIpv6      cidrtypes.IPv6Prefix `tfsdk:"loopback_ipv6"`
	PortChannelIdMin  types.Int64          `tfsdk:"port_channel_id_min"`
	PortChannelIdMax  types.Int64          `tfsdk:"port_channel_id_max"`
	External          types.Bool           `tfsdk:"external"`
	DeployMode        types.String         `tfsdk:"deploy_mode"`
	ClearCtsOnDestroy types.Bool           `tfsdk:"clear_cts_on_destroy"`
}
func (o *DatacenterGenericSystem) ClearConnectivityTemplatesFromLinks(ctx context.Context, linkIds []apstra.ObjectId, bp *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

func (*DatacenterGenericSystem) CreateRequest

func (*DatacenterGenericSystem) ReadSystemProperties added in v0.33.0

func (o *DatacenterGenericSystem) ReadSystemProperties(ctx context.Context, bp *apstra.TwoStageL3ClosClient, overwriteKnownValues bool) error

ReadSystemProperties returns an error rather than appending to a []diag.Diagnosics because some callers might need to invoke RemoveResource() based on the error type.

func (*DatacenterGenericSystem) ReadTags

func (DatacenterGenericSystem) ResourceAttributes

func (o DatacenterGenericSystem) ResourceAttributes() map[string]resourceSchema.Attribute

func (*DatacenterGenericSystem) SetProperties added in v0.33.0

func (*DatacenterGenericSystem) UpdateHostnameAndName

UpdateHostnameAndName uses the node patch API to set the label and hostname fields.

func (*DatacenterGenericSystem) UpdateLinkSet

UpdateLinkSet uses the old state to determine which links in the plan should be added, removed and kept. Individual links are then added or removed and the "keeper" links are updated with the correct tags, modes, etc...

func (*DatacenterGenericSystem) UpdateTags

UpdateTags uses the tagging API to set the tag set

func (DatacenterGenericSystem) VersionConstraints added in v0.52.2

type DatacenterGenericSystemLink struct {
	TargetSwitchId            types.String `tfsdk:"target_switch_id"`
	TargetSwitchIfName        types.String `tfsdk:"target_switch_if_name"`
	TargetSwitchIfTransformId types.Int64  `tfsdk:"target_switch_if_transform_id"`
	GroupLabel                types.String `tfsdk:"group_label"`
	LagMode                   types.String `tfsdk:"lag_mode"`
	Tags                      types.Set    `tfsdk:"tags"`
}

func (DatacenterGenericSystemLink) ResourceAttributes

func (o DatacenterGenericSystemLink) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterPropertySet

type DatacenterPropertySet struct {
	BlueprintId     types.String `tfsdk:"blueprint_id"`
	Id              types.String `tfsdk:"id"`
	Name            types.String `tfsdk:"name"`
	Data            types.String `tfsdk:"data"`
	Keys            types.Set    `tfsdk:"keys"`
	Stale           types.Bool   `tfsdk:"stale"`
	SyncWithCatalog types.Bool   `tfsdk:"sync_with_catalog"`
	SyncRequired    types.Bool   `tfsdk:"sync_required"`
}

func (DatacenterPropertySet) AttrTypes

func (o DatacenterPropertySet) AttrTypes() map[string]attr.Type

func (DatacenterPropertySet) DataSourceAttributes

func (o DatacenterPropertySet) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (*DatacenterPropertySet) LoadApiData

func (DatacenterPropertySet) ResourceAttributes

func (o DatacenterPropertySet) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterRoutingPolicy

type DatacenterRoutingPolicy struct {
	Id                types.String `tfsdk:"id"`
	Name              types.String `tfsdk:"name"`
	Description       types.String `tfsdk:"description"`
	BlueprintId       types.String `tfsdk:"blueprint_id"`
	ImportPolicy      types.String `tfsdk:"import_policy"`
	ExportPolicy      types.Object `tfsdk:"export_policy"`
	ExpectV4Default   types.Bool   `tfsdk:"expect_default_ipv4"`
	ExpectV6Default   types.Bool   `tfsdk:"expect_default_ipv6"`
	AggregatePrefixes types.List   `tfsdk:"aggregate_prefixes"`
	ExtraImports      types.List   `tfsdk:"extra_imports"`
	ExtraExports      types.List   `tfsdk:"extra_exports"`
}

func (DatacenterRoutingPolicy) DataSourceAttributes

func (o DatacenterRoutingPolicy) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterRoutingPolicy) DataSourceAttributesAsFilter added in v0.38.0

func (o DatacenterRoutingPolicy) DataSourceAttributesAsFilter() map[string]dataSourceSchema.Attribute

func (*DatacenterRoutingPolicy) FilterMatch added in v0.38.0

FilterMatch returns true if 'in' has values which match those in 'o'

func (*DatacenterRoutingPolicy) LoadApiData

func (o *DatacenterRoutingPolicy) LoadApiData(ctx context.Context, policyData *apstra.DcRoutingPolicyData, diags *diag.Diagnostics)

func (*DatacenterRoutingPolicy) Request

func (DatacenterRoutingPolicy) ResourceAttributes

func (o DatacenterRoutingPolicy) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterRoutingZone

type DatacenterRoutingZone struct {
	Id                   types.String `tfsdk:"id"`
	BlueprintId          types.String `tfsdk:"blueprint_id"`
	Name                 types.String `tfsdk:"name"`
	VrfName              types.String `tfsdk:"vrf_name"`
	VlanId               types.Int64  `tfsdk:"vlan_id"`
	HadPriorVlanIdConfig types.Bool   `tfsdk:"had_prior_vlan_id_config"`
	Vni                  types.Int64  `tfsdk:"vni"`
	HadPriorVniConfig    types.Bool   `tfsdk:"had_prior_vni_config"`
	DhcpServers          types.Set    `tfsdk:"dhcp_servers"`
	RoutingPolicyId      types.String `tfsdk:"routing_policy_id"`
	ImportRouteTargets   types.Set    `tfsdk:"import_route_targets"`
	ExportRouteTargets   types.Set    `tfsdk:"export_route_targets"`
	JunosEvpnIrbMode     types.String `tfsdk:"junos_evpn_irb_mode"`
}

func (DatacenterRoutingZone) DataSourceAttributes

func (o DatacenterRoutingZone) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterRoutingZone) DataSourceFilterAttributes

func (o DatacenterRoutingZone) DataSourceFilterAttributes() map[string]dataSourceSchema.Attribute

func (*DatacenterRoutingZone) DhcpServerRequest

func (o *DatacenterRoutingZone) DhcpServerRequest(_ context.Context, _ *diag.Diagnostics) []net.IP

func (*DatacenterRoutingZone) LoadApiData

func (o *DatacenterRoutingZone) LoadApiData(ctx context.Context, data apstra.SecurityZoneData, diags *diag.Diagnostics)

func (*DatacenterRoutingZone) LoadApiDhcpServers

func (o *DatacenterRoutingZone) LoadApiDhcpServers(ctx context.Context, IPs []net.IP, diags *diag.Diagnostics)

func (*DatacenterRoutingZone) Query

func (o *DatacenterRoutingZone) Query(szResultName string) *apstra.MatchQuery

func (*DatacenterRoutingZone) Read added in v0.52.6

func (*DatacenterRoutingZone) Request

func (DatacenterRoutingZone) ResourceAttributes

func (o DatacenterRoutingZone) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterSecurityPolicy added in v0.48.0

type DatacenterSecurityPolicy struct {
	BlueprintId   types.String `tfsdk:"blueprint_id"`
	Id            types.String `tfsdk:"id"`
	Name          types.String `tfsdk:"name"`
	Description   types.String `tfsdk:"description"`
	Enabled       types.Bool   `tfsdk:"enabled"`
	SrcAppPointId types.String `tfsdk:"source_application_point_id"`
	DstAppPointId types.String `tfsdk:"destination_application_point_id"`
	Rules         types.List   `tfsdk:"rules"`
	Tags          types.Set    `tfsdk:"tags"`
}

func (DatacenterSecurityPolicy) DataSourceAttributes added in v0.48.0

func (o DatacenterSecurityPolicy) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterSecurityPolicy) DataSourceFilterAttributes added in v0.48.0

func (o DatacenterSecurityPolicy) DataSourceFilterAttributes() map[string]dataSourceSchema.Attribute

func (*DatacenterSecurityPolicy) Query added in v0.48.0

func (o *DatacenterSecurityPolicy) Query(resultName string) apstra.QEQuery

func (*DatacenterSecurityPolicy) Read added in v0.48.0

func (*DatacenterSecurityPolicy) Request added in v0.48.0

func (DatacenterSecurityPolicy) ResourceAttributes added in v0.48.0

func (o DatacenterSecurityPolicy) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterSecurityPolicyRule added in v0.48.0

type DatacenterSecurityPolicyRule struct {
	Id          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Protocol    types.String `tfsdk:"protocol"`
	Action      types.String `tfsdk:"action"`
	SrcPorts    types.Set    `tfsdk:"source_ports"`
	DstPorts    types.Set    `tfsdk:"destination_ports"`
	Established types.Bool   `tfsdk:"established"`
}

func (DatacenterSecurityPolicyRule) DataSourceAttributes added in v0.48.0

func (o DatacenterSecurityPolicyRule) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterSecurityPolicyRule) DataSourceFilterAttributes added in v0.48.0

func (o DatacenterSecurityPolicyRule) DataSourceFilterAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterSecurityPolicyRule) ResourceAttributes added in v0.48.0

func (o DatacenterSecurityPolicyRule) ResourceAttributes() map[string]resourceSchema.Attribute

type DatacenterSecurityPolicyRulePortRange added in v0.48.0

type DatacenterSecurityPolicyRulePortRange struct {
	FromPort types.Int64 `tfsdk:"from_port"`
	ToPort   types.Int64 `tfsdk:"to_port"`
}

func (DatacenterSecurityPolicyRulePortRange) DataSourceAttributes added in v0.48.0

func (DatacenterSecurityPolicyRulePortRange) DataSourceFilterAttributes added in v0.48.0

func (o DatacenterSecurityPolicyRulePortRange) DataSourceFilterAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterSecurityPolicyRulePortRange) ResourceAttributes added in v0.48.0

type DatacenterSvis added in v0.35.0

type DatacenterSvis struct {
	BlueprintId    types.String `tfsdk:"blueprint_id"`
	InterfaceToSvi types.Map    `tfsdk:"by_id"`
	NetworkToSvi   types.Map    `tfsdk:"by_virtual_network"`
	SystemToSvi    types.Map    `tfsdk:"by_system"`
	GraphQuery     types.String `tfsdk:"graph_query"`
}

func (DatacenterSvis) DataSourceAttributes added in v0.35.0

func (o DatacenterSvis) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterSvis) GetSviInfo added in v0.35.0

type DatacenterVirtualNetwork

type DatacenterVirtualNetwork struct {
	Id                      types.String `tfsdk:"id"`
	Name                    types.String `tfsdk:"name"`
	BlueprintId             types.String `tfsdk:"blueprint_id"`
	Type                    types.String `tfsdk:"type"`
	RoutingZoneId           types.String `tfsdk:"routing_zone_id"`
	Vni                     types.Int64  `tfsdk:"vni"`
	HadPriorVniConfig       types.Bool   `tfsdk:"had_prior_vni_config"`
	ReserveVlan             types.Bool   `tfsdk:"reserve_vlan"`
	Bindings                types.Map    `tfsdk:"bindings"`
	DhcpServiceEnabled      types.Bool   `tfsdk:"dhcp_service_enabled"`
	IPv4ConnectivityEnabled types.Bool   `tfsdk:"ipv4_connectivity_enabled"`
	IPv6ConnectivityEnabled types.Bool   `tfsdk:"ipv6_connectivity_enabled"`
	IPv4Subnet              types.String `tfsdk:"ipv4_subnet"`
	IPv6Subnet              types.String `tfsdk:"ipv6_subnet"`
	IPv4GatewayEnabled      types.Bool   `tfsdk:"ipv4_virtual_gateway_enabled"`
	IPv6GatewayEnabled      types.Bool   `tfsdk:"ipv6_virtual_gateway_enabled"`
	IPv4Gateway             types.String `tfsdk:"ipv4_virtual_gateway"`
	IPv6Gateway             types.String `tfsdk:"ipv6_virtual_gateway"`
	L3Mtu                   types.Int64  `tfsdk:"l3_mtu"`
	ImportRouteTargets      types.Set    `tfsdk:"import_route_targets"`
	ExportRouteTargets      types.Set    `tfsdk:"export_route_targets"`
}

func (DatacenterVirtualNetwork) DataSourceAttributes added in v0.43.0

func (o DatacenterVirtualNetwork) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (DatacenterVirtualNetwork) DataSourceFilterAttributes

func (o DatacenterVirtualNetwork) DataSourceFilterAttributes() map[string]dataSourceSchema.Attribute

func (*DatacenterVirtualNetwork) Ipv6Gateway

func (*DatacenterVirtualNetwork) Ipv6Subnet

func (o *DatacenterVirtualNetwork) Ipv6Subnet(_ context.Context, path path.Path, diags *diag.Diagnostics) *net.IPNet

func (*DatacenterVirtualNetwork) LoadApiData

func (*DatacenterVirtualNetwork) Query

func (o *DatacenterVirtualNetwork) Query(resultName string) apstra.QEQuery

func (*DatacenterVirtualNetwork) Request

func (DatacenterVirtualNetwork) ResourceAttributes

func (o DatacenterVirtualNetwork) ResourceAttributes() map[string]resourceSchema.Attribute

func (DatacenterVirtualNetwork) ValidateConfigBindingsReservation added in v0.50.1

func (o DatacenterVirtualNetwork) ValidateConfigBindingsReservation(ctx context.Context, diags *diag.Diagnostics)

ValidateConfigBindingsReservation ensures that all bindings use the same VLAN ID when `reserve_vlan` is true.

func (DatacenterVirtualNetwork) VersionConstraints added in v0.50.1

func (o DatacenterVirtualNetwork) VersionConstraints() apiversions.Constraints

type Deploy

type Deploy struct {
	BlueprintId           types.String `tfsdk:"blueprint_id"`
	Comment               types.String `tfsdk:"comment"`
	HasUncommittedChanges types.Bool   `tfsdk:"has_uncommitted_changes"`
	ActiveRevision        types.Int64  `tfsdk:"revision_active"`
	StagedRevision        types.Int64  `tfsdk:"revision_staged"`
}

func (Deploy) DataSourceAttributes

func (o Deploy) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (*Deploy) Deploy

func (o *Deploy) Deploy(ctx context.Context, commentTemplate *CommentTemplate, client *apstra.Client, diags *diag.Diagnostics)

func (*Deploy) Read

func (o *Deploy) Read(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (Deploy) ResourceAttributes

func (o Deploy) ResourceAttributes() map[string]resourceSchema.Attribute

type DeviceAllocation

type DeviceAllocation struct {
	BlueprintId           types.String `tfsdk:"blueprint_id"`             // required
	NodeName              types.String `tfsdk:"node_name"`                // required
	DeviceKey             types.String `tfsdk:"device_key"`               // optional
	InitialInterfaceMapId types.String `tfsdk:"initial_interface_map_id"` // computed + optional
	InterfaceMapName      types.String `tfsdk:"interface_map_name"`       // computed
	NodeId                types.String `tfsdk:"node_id"`                  // computed
	DeviceProfileNodeId   types.String `tfsdk:"device_profile_node_id"`   // computed
	DeployMode            types.String `tfsdk:"deploy_mode"`              // optional
	SystemAttributes      types.Object `tfsdk:"system_attributes"`        // optional
}

func (DeviceAllocation) EnsureSystemIsSwitch added in v0.52.6

func (o DeviceAllocation) EnsureSystemIsSwitch(ctx context.Context, bp *apstra.TwoStageL3ClosClient, experimental bool, diags *diag.Diagnostics)

EnsureSystemIsSwitch is a validation function, but it must not be run as a part of the resource ValidateConfig. This is because ValidateConfig has access only to the configuration, but not the state. This function runs in Create() and Update().

func (*DeviceAllocation) GetCurrentDeviceProfileId

func (o *DeviceAllocation) GetCurrentDeviceProfileId(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (*DeviceAllocation) GetCurrentInterfaceMapId

func (o *DeviceAllocation) GetCurrentInterfaceMapId(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (*DeviceAllocation) GetDeviceKey

func (o *DeviceAllocation) GetDeviceKey(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

GetDeviceKey uses the BlueprintId and NodeId to determine the current DeviceKey value in the blueprint.

func (*DeviceAllocation) GetInterfaceMapName

func (o *DeviceAllocation) GetInterfaceMapName(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (*DeviceAllocation) GetSystemAttributes added in v0.51.0

func (o *DeviceAllocation) GetSystemAttributes(ctx context.Context, bp *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

func (*DeviceAllocation) PopulateDataFromGraphDb

func (o *DeviceAllocation) PopulateDataFromGraphDb(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

PopulateDataFromGraphDb attempts to set

  • NodeId (from node_name)
  • InitialInterfaceMapId (when not set)
  • DeviceProfileNodeId
  • from DeviceKey when set
  • from InitialInterfaceMapId when DeviceKey not set

func (DeviceAllocation) ResourceAttributes

func (o DeviceAllocation) ResourceAttributes() map[string]resourceSchema.Attribute

func (*DeviceAllocation) SetInterfaceMap

func (o *DeviceAllocation) SetInterfaceMap(ctx context.Context, bp *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

SetInterfaceMap creates or deletes the graph db relationship between a switch 'system' node and its interface map.

func (*DeviceAllocation) SetNodeSystemId

func (o *DeviceAllocation) SetNodeSystemId(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

SetNodeSystemId assigns a managed device 'device_key' (serial number) to the `system_id` field of a switch 'system' node in the blueprint graph based on the value of o.DeviceKey. When Sets o.DeviceKey is <null>, as would be the case when it's not provided in the Terraform config, SetNodeSystemId clears the graph node's `system_id` field.

If Apstra returns 404 to any blueprint operation, indicating the blueprint doesn't exist, SetNodeSystemId sets o.BlueprintId to <null> to indicate that resources which depend on the blueprint's existence should be removed.

func (*DeviceAllocation) SetSystemAttributes added in v0.51.0

func (o *DeviceAllocation) SetSystemAttributes(ctx context.Context, state *DeviceAllocation, bp *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

func (DeviceAllocation) ValidateConfig added in v0.51.0

func (o DeviceAllocation) ValidateConfig(ctx context.Context, experimental types.Bool, diags *diag.Diagnostics)

type DeviceAllocationSystemAttributes added in v0.51.0

type DeviceAllocationSystemAttributes struct {
	Asn          types.Int64          `tfsdk:"asn"`
	Name         types.String         `tfsdk:"name"`
	Hostname     types.String         `tfsdk:"hostname"`
	LoopbackIpv4 cidrtypes.IPv4Prefix `tfsdk:"loopback_ipv4"`
	LoopbackIpv6 cidrtypes.IPv6Prefix `tfsdk:"loopback_ipv6"`
	Tags         types.Set            `tfsdk:"tags"`
	DeployMode   types.String         `tfsdk:"deploy_mode"`
}

func (DeviceAllocationSystemAttributes) AttrTypes added in v0.52.6

func (*DeviceAllocationSystemAttributes) Get added in v0.51.0

func (*DeviceAllocationSystemAttributes) IsEmpty added in v0.51.0

func (DeviceAllocationSystemAttributes) ResourceAttributes added in v0.51.0

func (*DeviceAllocationSystemAttributes) Set added in v0.51.0

func (*DeviceAllocationSystemAttributes) ValidateConfig added in v0.51.0

func (o *DeviceAllocationSystemAttributes) ValidateConfig(_ context.Context, experimental types.Bool, diags *diag.Diagnostics)

type InterfacesByLinkTag

type InterfacesByLinkTag struct {
	BlueprintId types.String `tfsdk:"blueprint_id"`
	Tags        types.Set    `tfsdk:"tags"`
	SystemType  types.String `tfsdk:"system_type"`
	SystemRole  types.String `tfsdk:"system_role"`
	Ids         types.Set    `tfsdk:"ids"`
	GraphQuery  types.String `tfsdk:"graph_query"`
}

func (InterfacesByLinkTag) DataSourceAttributes

func (o InterfacesByLinkTag) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (InterfacesByLinkTag) RunQuery

type InterfacesBySystem

type InterfacesBySystem struct {
	BlueprintId types.String `tfsdk:"blueprint_id"`
	SystemId    types.String `tfsdk:"system_id"`
	IfMap       types.Map    `tfsdk:"if_map"`
	GraphQuery  types.String `tfsdk:"graph_query"`
}

func (InterfacesBySystem) DataSourceAttributes

func (o InterfacesBySystem) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (InterfacesBySystem) RunQuery

type NodeTypeSystem

type NodeTypeSystem struct {
	BlueprintId      types.String `tfsdk:"blueprint_id"`
	Id               types.String `tfsdk:"id"`
	Name             types.String `tfsdk:"name"`
	NullWhenNotFound types.Bool   `tfsdk:"null_when_not_found"`
	Attributes       types.Object `tfsdk:"attributes"`
}

func (*NodeTypeSystem) AttributesFromApi added in v0.36.0

func (o *NodeTypeSystem) AttributesFromApi(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

func (NodeTypeSystem) DataSourceAttributes

func (o NodeTypeSystem) DataSourceAttributes() map[string]dataSourceSchema.Attribute

type NodeTypeSystemAttributes

type NodeTypeSystemAttributes struct {
	Id         types.String `tfsdk:"id"`
	Hostname   types.String `tfsdk:"hostname"`
	Label      types.String `tfsdk:"label"`
	Role       types.String `tfsdk:"role"`
	SystemId   types.String `tfsdk:"system_id"`
	SystemType types.String `tfsdk:"system_type"`
	TagIds     types.Set    `tfsdk:"tag_ids"`
}

func (NodeTypeSystemAttributes) AttrTypes

func (o NodeTypeSystemAttributes) AttrTypes() map[string]attr.Type

func (NodeTypeSystemAttributes) DataSourceAttributes

func (o NodeTypeSystemAttributes) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (NodeTypeSystemAttributes) DataSourceAttributesAsFilter

func (o NodeTypeSystemAttributes) DataSourceAttributesAsFilter() map[string]dataSourceSchema.Attribute

func (NodeTypeSystemAttributes) QEEAttributes

func (o NodeTypeSystemAttributes) QEEAttributes() []apstra.QEEAttribute

type NodesTypeSystem

type NodesTypeSystem struct {
	BlueprintId  types.String `tfsdk:"blueprint_id"`
	Filter       types.Object `tfsdk:"filter"`
	Filters      types.List   `tfsdk:"filters"`
	Ids          types.Set    `tfsdk:"ids"`
	QueryStrings types.List   `tfsdk:"query_strings"`
}

func (NodesTypeSystem) DataSourceAttributes

func (o NodesTypeSystem) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (*NodesTypeSystem) ReadFromApi

func (o *NodesTypeSystem) ReadFromApi(ctx context.Context, client *apstra.Client, diags *diag.Diagnostics)

type PoolAllocation

type PoolAllocation struct {
	BlueprintId   types.String `tfsdk:"blueprint_id"`
	Role          types.String `tfsdk:"role"`
	PoolIds       types.Set    `tfsdk:"pool_ids"`
	RoutingZoneId types.String `tfsdk:"routing_zone_id"`
}

func (*PoolAllocation) LoadApiData

func (o *PoolAllocation) LoadApiData(ctx context.Context, in *apstra.ResourceGroupAllocation, diags *diag.Diagnostics)

func (*PoolAllocation) Request

func (PoolAllocation) ResourceAttributes

func (o PoolAllocation) ResourceAttributes() map[string]resourceSchema.Attribute

type PrefixFilterValidator

type PrefixFilterValidator struct {
	PathExpressions path.Expressions
}

PrefixFilterValidator is the underlying struct implementing DifferentFrom.

func (PrefixFilterValidator) Description

func (o PrefixFilterValidator) Description(ctx context.Context) string

func (PrefixFilterValidator) MarkdownDescription

func (o PrefixFilterValidator) MarkdownDescription(_ context.Context) string

func (PrefixFilterValidator) ValidateObject

type Rack added in v0.44.0

type Rack struct {
	Id                      types.String `tfsdk:"id"`
	BlueprintId             types.String `tfsdk:"blueprint_id"`
	Name                    types.String `tfsdk:"name"`
	PodId                   types.String `tfsdk:"pod_id"`
	RackTypeId              types.String `tfsdk:"rack_type_id"`
	SystemNameOneShot       types.Bool   `tfsdk:"system_name_one_shot"`
	RackElementsNameOneShot types.Bool   `tfsdk:"rack_elements_name_one_shot"`
}

func (*Rack) GetName added in v0.44.0

func (o *Rack) GetName(ctx context.Context, client *apstra.Client) (string, error)

GetName fetches the rack node's label field

func (*Rack) Request added in v0.44.0

func (o *Rack) Request() *apstra.TwoStageL3ClosRackRequest

func (Rack) ResourceAttributes added in v0.44.0

func (o Rack) ResourceAttributes() map[string]resourceSchema.Attribute

func (*Rack) SetName added in v0.44.0

func (o *Rack) SetName(ctx context.Context, oldName string, client *apstra.Client, diags *diag.Diagnostics)

SetName sets the name of the rack and (optionally) elements within the rack. If oldName is empty, only the rack will be renamed.

type RackElement added in v0.46.0

type RackElement struct {
	Id       apstra.ObjectId `json:"id"`
	Type     string          `json:"type,omitempty"`
	Label    string          `json:"label"`
	Hostname *string         `json:"hostname,omitempty"`
}

type SviMapEntry added in v0.35.0

type SviMapEntry struct {
	SystemId  types.String `tfsdk:"system_id"`
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Ipv4Addr  types.String `tfsdk:"ipv4_addr"`
	Ipv6Addr  types.String `tfsdk:"ipv6_addr"`
	Ipv4Mode  types.String `tfsdk:"ipv4_mode"`
	Ipv6Mode  types.String `tfsdk:"ipv6_mode"`
	NetworkId types.String `tfsdk:"virtual_network_id"`
}

func (SviMapEntry) AttrTypes added in v0.35.0

func (o SviMapEntry) AttrTypes() map[string]attr.Type

type VnBinding

type VnBinding struct {
	VlanId    types.Int64 `tfsdk:"vlan_id"`
	AccessIds types.Set   `tfsdk:"access_ids"`
}

func (VnBinding) DataSourceAttributes added in v0.43.0

func (o VnBinding) DataSourceAttributes() map[string]dataSourceSchema.Attribute

func (VnBinding) DataSourceAttributesConstructorOutput

func (o VnBinding) DataSourceAttributesConstructorOutput() map[string]dataSourceSchema.Attribute

func (*VnBinding) LoadApiData

func (o *VnBinding) LoadApiData(ctx context.Context, in apstra.VnBinding, diags *diag.Diagnostics)

func (VnBinding) Request

func (o VnBinding) Request(ctx context.Context, leafId string, diags *diag.Diagnostics) *apstra.VnBinding

func (VnBinding) ResourceAttributes

func (o VnBinding) ResourceAttributes() map[string]resourceSchema.Attribute

type VnBindingConstructor

type VnBindingConstructor struct {
	BlueprintId types.String `tfsdk:"blueprint_id"`
	VlanId      types.Int64  `tfsdk:"vlan_id"`
	SwitchIds   types.Set    `tfsdk:"switch_ids"`
	Bindings    types.Map    `tfsdk:"bindings"`
}

func (*VnBindingConstructor) Compute

func (o *VnBindingConstructor) Compute(ctx context.Context, bpClient *apstra.TwoStageL3ClosClient, diags *diag.Diagnostics)

func (VnBindingConstructor) DataSourceAttributes

func (o VnBindingConstructor) DataSourceAttributes() map[string]dataSourceSchema.Attribute

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL