azuretasks

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	Name      *string
	Lifecycle *fi.Lifecycle

	ResourceGroup *ResourceGroup
	SizeGB        *int32
	Tags          map[string]*string
}

Disk is an Azure Managed Disk.

func (*Disk) CheckChanges

func (*Disk) CheckChanges(a, e, changes *Disk) error

CheckChanges returns an error if a change is not allowed.

func (*Disk) CompareWithID

func (d *Disk) CompareWithID() *string

CompareWithID returns the Name of the Disk.

func (*Disk) Find

func (d *Disk) Find(c *fi.Context) (*Disk, error)

Find discovers the Disk in the cloud provider.

func (*Disk) GetLifecycle

func (o *Disk) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*Disk) GetName

func (o *Disk) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*Disk) RenderAzure

func (*Disk) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Disk) error

RenderAzure creates or updates a Disk.

func (*Disk) Run

func (d *Disk) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*Disk) SetLifecycle

func (o *Disk) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*Disk) SetName

func (o *Disk) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*Disk) String

func (o *Disk) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*Disk) UnmarshalJSON

func (o *Disk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type LoadBalancer

type LoadBalancer struct {
	Name          *string
	Lifecycle     *fi.Lifecycle
	ResourceGroup *ResourceGroup
	Subnet        *Subnet

	// External is set to true when the loadbalancer is used for external traffic
	External *bool

	Tags         map[string]*string
	ForAPIServer bool
}

LoadBalancer is an Azure Cloud LoadBalancer

func (*LoadBalancer) CheckChanges

func (*LoadBalancer) CheckChanges(a, e, changes *LoadBalancer) error

CheckChanges returns an error if a change is not allowed.

func (*LoadBalancer) CompareWithID

func (lb *LoadBalancer) CompareWithID() *string

CompareWithID returns the Name of the LoadBalancer

func (*LoadBalancer) Find

func (lb *LoadBalancer) Find(c *fi.Context) (*LoadBalancer, error)

Find discovers the LoadBalancer in the cloud provider

func (*LoadBalancer) GetLifecycle

func (o *LoadBalancer) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*LoadBalancer) GetName

func (o *LoadBalancer) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*LoadBalancer) IsForAPIServer

func (lb *LoadBalancer) IsForAPIServer() bool

IsForAPIServer for api server.

func (*LoadBalancer) RenderAzure

func (*LoadBalancer) RenderAzure(t *azure.AzureAPITarget, a, e, changes *LoadBalancer) error

RenderAzure creates or updates a Loadbalancer.

func (*LoadBalancer) Run

func (lb *LoadBalancer) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*LoadBalancer) SetLifecycle

func (o *LoadBalancer) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*LoadBalancer) SetName

func (o *LoadBalancer) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*LoadBalancer) String

func (o *LoadBalancer) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*LoadBalancer) UnmarshalJSON

func (o *LoadBalancer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type MockAzureCloud

type MockAzureCloud struct {
	Location                string
	ResourceGroupsClient    *MockResourceGroupsClient
	VirtualNetworksClient   *MockVirtualNetworksClient
	SubnetsClient           *MockSubnetsClient
	RouteTablesClient       *MockRouteTablesClient
	VMScaleSetsClient       *MockVMScaleSetsClient
	VMScaleSetVMsClient     *MockVMScaleSetVMsClient
	DisksClient             *MockDisksClient
	RoleAssignmentsClient   *MockRoleAssignmentsClient
	NetworkInterfacesClient *MockNetworkInterfacesClient
	LoadBalancersClient     *MockLoadBalancersClient
	PublicIPAddressesClient *MockPublicIPAddressesClient
}

MockAzureCloud is a mock implementation of AzureCloud.

func NewMockAzureCloud

func NewMockAzureCloud(location string) *MockAzureCloud

NewMockAzureCloud returns a new MockAzureCloud.

func (*MockAzureCloud) AddClusterTags

func (c *MockAzureCloud) AddClusterTags(tags map[string]*string)

AddClusterTags add the cluster tag to the given tag map.

func (*MockAzureCloud) DNS

DNS returns the DNS provider.

func (*MockAzureCloud) DeleteGroup

DeleteGroup deletes the group.

func (*MockAzureCloud) DeleteInstance

func (c *MockAzureCloud) DeleteInstance(i *cloudinstances.CloudInstance) error

DeleteInstance deletes the instance.

func (*MockAzureCloud) DetachInstance

func (c *MockAzureCloud) DetachInstance(i *cloudinstances.CloudInstance) error

DetachInstance detaches the instance.

func (*MockAzureCloud) Disk

func (c *MockAzureCloud) Disk() azure.DisksClient

Disk returns the disk client.

func (*MockAzureCloud) FindClusterStatus

func (c *MockAzureCloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)

FindClusterStatus discovers the status of the cluster, by looking for the tagged etcd volumes

func (*MockAzureCloud) FindVPCInfo

func (c *MockAzureCloud) FindVPCInfo(id string) (*fi.VPCInfo, error)

FindVPCInfo returns the VPCInfo.

func (*MockAzureCloud) GetApiIngressStatus

func (c *MockAzureCloud) GetApiIngressStatus(cluster *kops.Cluster) ([]kops.ApiIngressStatus, error)

GetApiIngressStatus returns the status of API ingress.

func (*MockAzureCloud) GetCloudGroups

func (c *MockAzureCloud) GetCloudGroups(
	cluster *kops.Cluster,
	instancegroups []*kops.InstanceGroup,
	warnUnmatched bool,
	nodes []v1.Node,
) (map[string]*cloudinstances.CloudInstanceGroup, error)

GetCloudGroups returns cloud instance groups.

func (*MockAzureCloud) LoadBalancer

func (c *MockAzureCloud) LoadBalancer() azure.LoadBalancersClient

LoadBalancer returns the loadbalancer client.

func (*MockAzureCloud) NetworkInterface

func (c *MockAzureCloud) NetworkInterface() azure.NetworkInterfacesClient

NetworkInterface returns the network interface client.

func (*MockAzureCloud) ProviderID

func (c *MockAzureCloud) ProviderID() kops.CloudProviderID

ProviderID returns the provider ID.

func (*MockAzureCloud) PublicIPAddress

func (c *MockAzureCloud) PublicIPAddress() azure.PublicIPAddressesClient

PublicIPAddress returns the public ip address client.

func (*MockAzureCloud) Region

func (c *MockAzureCloud) Region() string

Region returns the region.

func (*MockAzureCloud) ResourceGroup

func (c *MockAzureCloud) ResourceGroup() azure.ResourceGroupsClient

ResourceGroup returns the resource group client.

func (*MockAzureCloud) RoleAssignment

func (c *MockAzureCloud) RoleAssignment() azure.RoleAssignmentsClient

RoleAssignment returns the role assignment client.

func (*MockAzureCloud) RouteTable

func (c *MockAzureCloud) RouteTable() azure.RouteTablesClient

RouteTable returns the route table client.

func (*MockAzureCloud) Subnet

func (c *MockAzureCloud) Subnet() azure.SubnetsClient

Subnet returns the subnet client.

func (*MockAzureCloud) SubscriptionID

func (c *MockAzureCloud) SubscriptionID() string

SubscriptionID returns the subscription ID.

func (*MockAzureCloud) VMScaleSet

func (c *MockAzureCloud) VMScaleSet() azure.VMScaleSetsClient

VMScaleSet returns the VM Scale Set client.

func (*MockAzureCloud) VMScaleSetVM

func (c *MockAzureCloud) VMScaleSetVM() azure.VMScaleSetVMsClient

VMScaleSetVM returns the VM Scale Set VM client.

func (*MockAzureCloud) VirtualNetwork

func (c *MockAzureCloud) VirtualNetwork() azure.VirtualNetworksClient

VirtualNetwork returns the virtual network client.

type MockDisksClient

type MockDisksClient struct {
	Disks map[string]compute.Disk
}

MockDisksClient is a mock implementation of disk client.

func (*MockDisksClient) CreateOrUpdate

func (c *MockDisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, parameters compute.Disk) error

CreateOrUpdate creates or updates a disk.

func (*MockDisksClient) Delete

func (c *MockDisksClient) Delete(ctx context.Context, resourceGroupName, diskName string) error

Delete deletes a specified disk.

func (*MockDisksClient) List

func (c *MockDisksClient) List(ctx context.Context, resourceGroupName string) ([]compute.Disk, error)

List returns a slice of disks.

type MockLoadBalancersClient

type MockLoadBalancersClient struct {
	LBs map[string]network.LoadBalancer
}

MockLoadBalancersClient is a mock implementation of role assignment client.

func (*MockLoadBalancersClient) CreateOrUpdate

func (c *MockLoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer) error

CreateOrUpdate creates a new loadbalancer.

func (*MockLoadBalancersClient) Delete

func (c *MockLoadBalancersClient) Delete(ctx context.Context, scope, lbName string) error

Delete deletes a specified loadbalancer.

func (*MockLoadBalancersClient) List

func (c *MockLoadBalancersClient) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, error)

List returns a slice of loadbalancer.

type MockNetworkInterfacesClient

type MockNetworkInterfacesClient struct {
	NIs map[string]network.Interface
}

MockNetworkInterfacesClient is a mock implementation of network interfaces client.

func (*MockNetworkInterfacesClient) ListScaleSetsNetworkInterfaces

func (c *MockNetworkInterfacesClient) ListScaleSetsNetworkInterfaces(ctx context.Context, resourceGroupName, vmssName string) ([]network.Interface, error)

List returns a slice of VM Scale Set Network Interfaces.

type MockPublicIPAddressesClient

type MockPublicIPAddressesClient struct {
	PubIPs map[string]network.PublicIPAddress
}

MockPublicIPAddressesClient is a mock implementation of role assignment client.

func (*MockPublicIPAddressesClient) CreateOrUpdate

func (c *MockPublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) error

CreateOrUpdate creates a new public ip address.

func (*MockPublicIPAddressesClient) Delete

func (c *MockPublicIPAddressesClient) Delete(ctx context.Context, scope, publicIPAddressName string) error

Delete deletes a specified public ip address.

func (*MockPublicIPAddressesClient) List

func (c *MockPublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) ([]network.PublicIPAddress, error)

List returns a slice of public ip address.

type MockResourceGroupsClient

type MockResourceGroupsClient struct {
	RGs map[string]resources.Group
}

MockResourceGroupsClient is a mock implementation of resource group client.

func (*MockResourceGroupsClient) CreateOrUpdate

func (c *MockResourceGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters resources.Group) error

CreateOrUpdate creates or updates a resource group.

func (*MockResourceGroupsClient) Delete

func (c *MockResourceGroupsClient) Delete(ctx context.Context, name string) error

Delete deletes a specified resource group.

func (*MockResourceGroupsClient) List

List returns a slice of resource groups.

type MockRoleAssignmentsClient

type MockRoleAssignmentsClient struct {
	RAs map[string]authz.RoleAssignment
}

MockRoleAssignmentsClient is a mock implementation of role assignment client.

func (*MockRoleAssignmentsClient) Create

func (c *MockRoleAssignmentsClient) Create(
	ctx context.Context,
	scope string,
	roleAssignmentName string,
	parameters authz.RoleAssignmentCreateParameters,
) (*authz.RoleAssignment, error)

Create creates a new role assignment.

func (*MockRoleAssignmentsClient) Delete

func (c *MockRoleAssignmentsClient) Delete(ctx context.Context, scope, raName string) error

Delete deletes a specified role assignment.

func (*MockRoleAssignmentsClient) List

func (c *MockRoleAssignmentsClient) List(ctx context.Context, resourceGroupName string) ([]authz.RoleAssignment, error)

List returns a slice of role assignments.

type MockRouteTablesClient

type MockRouteTablesClient struct {
	RTs map[string]network.RouteTable
}

MockRouteTablesClient is a mock implementation of a route table client.

func (*MockRouteTablesClient) CreateOrUpdate

func (c *MockRouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable) error

CreateOrUpdate creates or updates a route table.

func (*MockRouteTablesClient) Delete

func (c *MockRouteTablesClient) Delete(ctx context.Context, resourceGroupName, routeTableName string) error

Delete deletes a specified routeTable.

func (*MockRouteTablesClient) List

func (c *MockRouteTablesClient) List(ctx context.Context, resourceGroupName string) ([]network.RouteTable, error)

List returns a slice of route tables.

type MockSubnetsClient

type MockSubnetsClient struct {
	Subnets map[string]network.Subnet
}

MockSubnetsClient is a mock implementation of a subnet client.

func (*MockSubnetsClient) CreateOrUpdate

func (c *MockSubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, parameters network.Subnet) error

CreateOrUpdate creates or updates a subnet.

func (*MockSubnetsClient) Delete

func (c *MockSubnetsClient) Delete(ctx context.Context, resourceGroupName, vnetName, subnetName string) error

Delete deletes a specified subnet.

func (*MockSubnetsClient) List

func (c *MockSubnetsClient) List(ctx context.Context, resourceGroupName, virtualNetworkName string) ([]network.Subnet, error)

List returns a slice of subnets.

type MockVMScaleSetVMsClient

type MockVMScaleSetVMsClient struct {
	VMs map[string]compute.VirtualMachineScaleSetVM
}

MockVMScaleSetVMsClient is a mock implementation of VM Scale Set VM client.

func (*MockVMScaleSetVMsClient) List

func (c *MockVMScaleSetVMsClient) List(ctx context.Context, resourceGroupName, vmssName string) ([]compute.VirtualMachineScaleSetVM, error)

List returns a slice of VM Scale Set VMs.

type MockVMScaleSetsClient

type MockVMScaleSetsClient struct {
	VMSSes map[string]compute.VirtualMachineScaleSet
}

MockVMScaleSetsClient is a mock implementation of VM Scale Set client.

func (*MockVMScaleSetsClient) CreateOrUpdate

func (c *MockVMScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName, vmScaleSetName string, parameters compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error)

CreateOrUpdate creates or updates a VM Scale Set.

func (*MockVMScaleSetsClient) Delete

func (c *MockVMScaleSetsClient) Delete(ctx context.Context, resourceGroupName, vmssName string) error

Delete deletes a specified VM Scale Set.

func (*MockVMScaleSetsClient) List

func (c *MockVMScaleSetsClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)

List returns a slice of VM Scale Sets.

type MockVirtualNetworksClient

type MockVirtualNetworksClient struct {
	VNets map[string]network.VirtualNetwork
}

MockVirtualNetworksClient is a mock implementation of virtual network client.

func (*MockVirtualNetworksClient) CreateOrUpdate

func (c *MockVirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters network.VirtualNetwork) error

CreateOrUpdate creates or updates a virtual network.

func (*MockVirtualNetworksClient) Delete

func (c *MockVirtualNetworksClient) Delete(ctx context.Context, resourceGroupName, vnetName string) error

Delete deletes a specified virtual network.

func (*MockVirtualNetworksClient) List

func (c *MockVirtualNetworksClient) List(ctx context.Context, resourceGroupName string) ([]network.VirtualNetwork, error)

List returns a slice of virtual networks.

type PublicIPAddress

type PublicIPAddress struct {
	Name          *string
	Lifecycle     *fi.Lifecycle
	ResourceGroup *ResourceGroup

	Tags map[string]*string
}

PublicIPAddress is an Azure Cloud Public IP Address

func (*PublicIPAddress) CheckChanges

func (*PublicIPAddress) CheckChanges(a, e, changes *PublicIPAddress) error

CheckChanges returns an error if a change is not allowed.

func (*PublicIPAddress) CompareWithID

func (p *PublicIPAddress) CompareWithID() *string

CompareWithID returns the Name of the Public IP Address

func (*PublicIPAddress) Find

Find discovers the Public IP Address in the cloud provider

func (*PublicIPAddress) GetLifecycle

func (o *PublicIPAddress) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*PublicIPAddress) GetName

func (o *PublicIPAddress) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*PublicIPAddress) RenderAzure

func (*PublicIPAddress) RenderAzure(t *azure.AzureAPITarget, a, e, changes *PublicIPAddress) error

RenderAzure creates or updates a Public IP Address.

func (*PublicIPAddress) Run

func (p *PublicIPAddress) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*PublicIPAddress) SetLifecycle

func (o *PublicIPAddress) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*PublicIPAddress) SetName

func (o *PublicIPAddress) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*PublicIPAddress) String

func (o *PublicIPAddress) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*PublicIPAddress) UnmarshalJSON

func (o *PublicIPAddress) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type ResourceGroup

type ResourceGroup struct {
	Name      *string
	Lifecycle *fi.Lifecycle
	Tags      map[string]*string
	// Shared is set to true if the resource group is not solely
	// owned by kops. The resource group will not be deleted when
	// a cluster is destroyed.
	Shared *bool
}

ResourceGroup is an Azure resource group.

func (*ResourceGroup) CheckChanges

func (*ResourceGroup) CheckChanges(a, e, changes *ResourceGroup) error

CheckChanges returns an error if a change is not allowed.

func (*ResourceGroup) CompareWithID

func (r *ResourceGroup) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*ResourceGroup) Find

func (r *ResourceGroup) Find(c *fi.Context) (*ResourceGroup, error)

Find discovers the ResourceGroup in the cloud provider.

func (*ResourceGroup) GetLifecycle

func (o *ResourceGroup) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*ResourceGroup) GetName

func (o *ResourceGroup) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*ResourceGroup) RenderAzure

func (*ResourceGroup) RenderAzure(t *azure.AzureAPITarget, a, e, changes *ResourceGroup) error

RenderAzure creates or updates a resource group.

func (*ResourceGroup) Run

func (r *ResourceGroup) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*ResourceGroup) SetLifecycle

func (o *ResourceGroup) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*ResourceGroup) SetName

func (o *ResourceGroup) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*ResourceGroup) String

func (o *ResourceGroup) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*ResourceGroup) UnmarshalJSON

func (o *ResourceGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type RoleAssignment

type RoleAssignment struct {
	// Name is the name of the RoleAssignment task. This is
	// different from a name of Role Assignment, which is GUID.
	// As kops cannot give a fixed name to the Role Assignment
	// name generated from kops cluster config, we keep a task
	// name and a Role Assignment name separate.
	Name      *string
	Lifecycle *fi.Lifecycle

	ResourceGroup *ResourceGroup
	VMScaleSet    *VMScaleSet
	ID            *string
	RoleDefID     *string
}

RoleAssignment is an Azure Role Assignment.

func (*RoleAssignment) CheckChanges

func (r *RoleAssignment) CheckChanges(a, e, changes *RoleAssignment) error

CheckChanges returns an error if a change is not allowed.

func (*RoleAssignment) CompareWithID

func (r *RoleAssignment) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*RoleAssignment) Find

func (r *RoleAssignment) Find(c *fi.Context) (*RoleAssignment, error)

Find discovers the RoleAssignment in the cloud provider.

func (*RoleAssignment) GetLifecycle

func (o *RoleAssignment) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*RoleAssignment) GetName

func (o *RoleAssignment) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*RoleAssignment) RenderAzure

func (*RoleAssignment) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RoleAssignment) error

RenderAzure creates or updates a Role Assignment.

func (*RoleAssignment) Run

func (r *RoleAssignment) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*RoleAssignment) SetLifecycle

func (o *RoleAssignment) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*RoleAssignment) SetName

func (o *RoleAssignment) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*RoleAssignment) String

func (o *RoleAssignment) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*RoleAssignment) UnmarshalJSON

func (o *RoleAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type RouteTable

type RouteTable struct {
	Name          *string
	Lifecycle     *fi.Lifecycle
	ResourceGroup *ResourceGroup
	Tags          map[string]*string
	Shared        *bool
}

RouteTable is an Azure Route Table.

func (*RouteTable) CheckChanges

func (*RouteTable) CheckChanges(a, e, changes *RouteTable) error

CheckChanges returns an error if a change is not allowed.

func (*RouteTable) CompareWithID

func (r *RouteTable) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*RouteTable) Find

func (r *RouteTable) Find(c *fi.Context) (*RouteTable, error)

Find discovers the RouteTable in the cloud provider.

func (*RouteTable) GetLifecycle

func (o *RouteTable) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*RouteTable) GetName

func (o *RouteTable) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*RouteTable) RenderAzure

func (*RouteTable) RenderAzure(t *azure.AzureAPITarget, a, e, changes *RouteTable) error

RenderAzure creates or updates a Route Table.

func (*RouteTable) Run

func (r *RouteTable) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*RouteTable) SetLifecycle

func (o *RouteTable) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*RouteTable) SetName

func (o *RouteTable) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*RouteTable) String

func (o *RouteTable) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*RouteTable) UnmarshalJSON

func (o *RouteTable) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type Subnet

type Subnet struct {
	Name      *string
	Lifecycle *fi.Lifecycle

	ResourceGroup  *ResourceGroup
	VirtualNetwork *VirtualNetwork
	CIDR           *string
	Shared         *bool
}

Subnet is an Azure subnet.

func (*Subnet) CheckChanges

func (*Subnet) CheckChanges(a, e, changes *Subnet) error

CheckChanges returns an error if a change is not allowed.

func (*Subnet) CompareWithID

func (s *Subnet) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*Subnet) Find

func (s *Subnet) Find(c *fi.Context) (*Subnet, error)

Find discovers the Subnet in the cloud provider.

func (*Subnet) GetLifecycle

func (o *Subnet) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*Subnet) GetName

func (o *Subnet) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*Subnet) RenderAzure

func (*Subnet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Subnet) error

RenderAzure creates or updates a subnet.

func (*Subnet) Run

func (s *Subnet) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*Subnet) SetLifecycle

func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*Subnet) SetName

func (o *Subnet) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*Subnet) String

func (o *Subnet) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*Subnet) UnmarshalJSON

func (o *Subnet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type SubnetID

type SubnetID struct {
	SubscriptionID     string
	ResourceGroupName  string
	VirtualNetworkName string
	SubnetName         string
}

SubnetID contains the resource ID/names required to construct a subnet ID.

func ParseSubnetID

func ParseSubnetID(s string) (*SubnetID, error)

ParseSubnetID parses a given subnet ID string and returns a SubnetID.

func (*SubnetID) String

func (s *SubnetID) String() string

String returns the subnet ID in the path format.

type VMScaleSet

type VMScaleSet struct {
	Name      *string
	Lifecycle *fi.Lifecycle

	ResourceGroup  *ResourceGroup
	VirtualNetwork *VirtualNetwork
	Subnet         *Subnet
	StorageProfile *VMScaleSetStorageProfile
	// RequirePublicIP is set to true when VMs require public IPs.
	RequirePublicIP *bool
	// LoadBalancer is the Load Balancer object the VMs will use.
	LoadBalancer *LoadBalancer
	// SKUName specifies the SKU of of the VM Scale Set
	SKUName *string
	// Capacity specifies the number of virtual machines the VM Scale Set.
	Capacity *int64
	// ComputerNamePrefix is the prefix of each VM name of the form <prefix><base-36-instance-id>.
	// See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-instance-ids.
	ComputerNamePrefix *string
	// AdmnUser specifies the name of the administrative account.
	AdminUser    *string
	SSHPublicKey *string
	// CustomData is the user data configuration
	CustomData  fi.Resource
	Tags        map[string]*string
	PrincipalID *string
}

VMScaleSet is an Azure VM Scale Set.

func (*VMScaleSet) CheckChanges

func (s *VMScaleSet) CheckChanges(a, e, changes *VMScaleSet) error

CheckChanges returns an error if a change is not allowed.

func (*VMScaleSet) CompareWithID

func (s *VMScaleSet) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*VMScaleSet) Find

func (s *VMScaleSet) Find(c *fi.Context) (*VMScaleSet, error)

Find discovers the VMScaleSet in the cloud provider.

func (*VMScaleSet) GetLifecycle

func (o *VMScaleSet) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*VMScaleSet) GetName

func (o *VMScaleSet) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*VMScaleSet) RenderAzure

func (s *VMScaleSet) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VMScaleSet) error

RenderAzure creates or updates a VM Scale Set.

func (*VMScaleSet) Run

func (s *VMScaleSet) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*VMScaleSet) SetLifecycle

func (o *VMScaleSet) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*VMScaleSet) SetName

func (o *VMScaleSet) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*VMScaleSet) String

func (o *VMScaleSet) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*VMScaleSet) UnmarshalJSON

func (o *VMScaleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

type VMScaleSetStorageProfile

type VMScaleSetStorageProfile struct {
	*compute.VirtualMachineScaleSetStorageProfile
}

VMScaleSetStorageProfile wraps *compute.VirtualMachineScaleSetStorageProfile and implements fi.HasDependencies.

If we don't implement the interface and directly use compute.VirtualMachineScaleSetStorageProfile in VMScaleSet, the topological sort on VMScaleSet will fail as StorageProfile doesn't implement a proper interface.

func (*VMScaleSetStorageProfile) GetDependencies

func (p *VMScaleSetStorageProfile) GetDependencies(tasks map[string]fi.Task) []fi.Task

GetDependencies returns a slice of tasks on which the tasks depends on.

type VirtualNetwork

type VirtualNetwork struct {
	Name      *string
	Lifecycle *fi.Lifecycle

	ResourceGroup *ResourceGroup
	CIDR          *string
	Tags          map[string]*string
	Subnets       *[]network.Subnet
	Shared        *bool
}

VirtualNetwork is an Azure Virtual Network.

func (*VirtualNetwork) CheckChanges

func (*VirtualNetwork) CheckChanges(a, e, changes *VirtualNetwork) error

CheckChanges returns an error if a change is not allowed.

func (*VirtualNetwork) CompareWithID

func (n *VirtualNetwork) CompareWithID() *string

CompareWithID returns the Name of the VM Scale Set.

func (*VirtualNetwork) Find

func (n *VirtualNetwork) Find(c *fi.Context) (*VirtualNetwork, error)

Find discovers the VirtualNetwork in the cloud provider.

func (*VirtualNetwork) GetLifecycle

func (o *VirtualNetwork) GetLifecycle() *fi.Lifecycle

GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle

func (*VirtualNetwork) GetName

func (o *VirtualNetwork) GetName() *string

GetName returns the Name of the object, implementing fi.HasName

func (*VirtualNetwork) RenderAzure

func (*VirtualNetwork) RenderAzure(t *azure.AzureAPITarget, a, e, changes *VirtualNetwork) error

RenderAzure creates or updates a Virtual Network.

func (*VirtualNetwork) Run

func (n *VirtualNetwork) Run(c *fi.Context) error

Run implements fi.Task.Run.

func (*VirtualNetwork) SetLifecycle

func (o *VirtualNetwork) SetLifecycle(lifecycle fi.Lifecycle)

SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle

func (*VirtualNetwork) SetName

func (o *VirtualNetwork) SetName(name string)

SetName sets the Name of the object, implementing fi.SetName

func (*VirtualNetwork) String

func (o *VirtualNetwork) String() string

String is the stringer function for the task, producing readable output using fi.TaskAsString

func (*VirtualNetwork) UnmarshalJSON

func (o *VirtualNetwork) UnmarshalJSON(data []byte) error

UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string

Jump to

Keyboard shortcuts

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