Documentation ¶
Index ¶
- Constants
- Variables
- func BootInstanceAfterVPCInterfaceUpdate(ctx context.Context, meta *helper.ProviderMeta, ...) diag.Diagnostics
- func BootInstanceSync(ctx context.Context, client *linodego.Client, ...) error
- func DataSource() *schema.Resource
- func Resource() *schema.Resource
- func SafeShutdownInstance(ctx context.Context, client *linodego.Client, instanceID, deadlineSeconds int) error
- func ShutdownInstanceForVPCInterfaceUpdate(ctx context.Context, client *linodego.Client, skipImplicitReboots bool, ...) error
- func VPCInterfaceIncluded(interfaces1 []linodego.InstanceConfigInterface, ...) bool
Constants ¶
Variables ¶
View Source
var InterfaceSchema = &schema.Resource{ Schema: map[string]*schema.Schema{ "purpose": { Type: schema.TypeString, Description: "The type of interface.", Required: true, ValidateDiagFunc: validation.ToDiagFunc( validation.StringInSlice([]string{"public", "vlan", "vpc"}, true), ), }, "ipam_address": { Type: schema.TypeString, Description: "This Network Interface's private IP address in " + "Classless Inter-Domain Routing (CIDR) notation." + onlyAllowedForVLANMsg, Optional: true, }, "label": { Type: schema.TypeString, Description: "The name of the VALN. " + requiredForVLANMsg + " " + onlyAllowedForVLANMsg, Optional: true, }, "id": { Type: schema.TypeInt, Description: "The ID of the interface.", Computed: true, }, "subnet_id": { Type: schema.TypeInt, Description: "The ID of the subnet which the VPC interface is connected to." + requiredForVPCMsg + onlyAllowedForVPCMsg, Optional: true, }, "vpc_id": { Type: schema.TypeInt, Description: "The ID of VPC of the subnet which the VPC " + "interface is connected to.", Computed: true, }, "primary": { Type: schema.TypeBool, Description: "Whether the interface is the primary interface that should " + "have the default route for this Linode.", Optional: true, Default: false, }, "active": { Type: schema.TypeBool, Description: "Whether this interface is currently booted and active.", Computed: true, }, "ip_ranges": { Type: schema.TypeList, Description: "List of VPC IPs or IP ranges inside the VPC subnet.", Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, ValidateDiagFunc: validation.AnyDiag( helper.SDKv2ValidateIPv4Range, helper.SDKv2ValidateIPv6Range, ), }, }, "ipv4": { Type: schema.TypeList, Description: "The IPv4 configuration of the VPC interface." + onlyAllowedForVPCMsg, Computed: true, Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "vpc": { Type: schema.TypeString, Description: "The IP from the VPC subnet to use for this interface.", Computed: true, Optional: true, }, "nat_1_1": { Type: schema.TypeString, Description: "The public IP that will be used for the " + "one-to-one NAT purpose.", Computed: true, Optional: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { if new == "any" && old != "" { return true } return old == new }, }, }, }, }, }, }
Functions ¶
func BootInstanceAfterVPCInterfaceUpdate ¶ added in v2.14.0
func BootInstanceAfterVPCInterfaceUpdate(ctx context.Context, meta *helper.ProviderMeta, instanceID, targetConfigID, deadlineSeconds int) diag.Diagnostics
func BootInstanceSync ¶ added in v2.17.0
func DataSource ¶
func SafeShutdownInstance ¶ added in v2.17.0
func ShutdownInstanceForVPCInterfaceUpdate ¶ added in v2.14.0
func VPCInterfaceIncluded ¶ added in v2.14.0
func VPCInterfaceIncluded( interfaces1 []linodego.InstanceConfigInterface, interfaces2 []linodego.InstanceConfigInterfaceCreateOptions, ) bool
VPCInterfaceIncluded returns whether a VPC interface is included in either slice
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.