types

package
v0.1.57 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AzureResourceName = "azurerm_resource_group"

Variables

View Source
var MysqlVersions = []string{"5.6", "5.7", "8.0"}
View Source
var PostgresVersions = []string{"10", "11", "12", "13", "14"}

Functions

func CreateKubernetesCluster added in v0.1.36

func CreateKubernetesCluster(cluster *KubernetesCluster, resourceId string, args *resourcespb.KubernetesClusterArgs, others *resources.Resources) error

func CreateObjectStorage added in v0.1.36

func CreateObjectStorage(r *ObjectStorage, resourceId string, args *resourcespb.ObjectStorageArgs, others *resources.Resources) error

func CreateVault added in v0.1.36

func CreateVault(r *Vault, resourceId string, args *resourcespb.VaultArgs, others *resources.Resources) error

func GetResourceGroupName added in v0.1.36

func GetResourceGroupName(name string) string

func ImportResourceGroup added in v0.1.36

func ImportResourceGroup(rg *ResourceGroup, args *resourcespb.ResourceGroupArgs) error

func NewDatabase added in v0.1.15

func NewDatabase(r *Database, resourceId string, db *resourcespb.DatabaseArgs, others *resources.Resources) error

func NewKubernetesCluster added in v0.1.15

func NewKubernetesCluster(cluster *KubernetesCluster, resourceId string, args *resourcespb.KubernetesClusterArgs, others *resources.Resources) error

func NewKubernetesNodePool added in v0.1.15

func NewKubernetesNodePool(r *KubernetesNodePool, resourceId string, args *resourcespb.KubernetesNodePoolArgs, others *resources.Resources) error

func NewNetworkInterface added in v0.1.15

func NewNetworkInterface(r *NetworkInterface, resourceId string, args *resourcespb.NetworkInterfaceArgs, others *resources.Resources) error

func NewNetworkInterfaceSecurityGroupAssociation added in v0.1.44

func NewNetworkInterfaceSecurityGroupAssociation(r *NetworkInterfaceSecurityGroupAssociation, resourceId string, args *resourcespb.NetworkInterfaceSecurityGroupAssociationArgs, others *resources.Resources) error

func NewNetworkSecurityGroup added in v0.1.15

func NewNetworkSecurityGroup(nsg *NetworkSecurityGroup, resourceId string, args *resourcespb.NetworkSecurityGroupArgs, others *resources.Resources) error

func NewObjectStorage added in v0.1.15

func NewObjectStorage(r *ObjectStorage, resourceId string, db *resourcespb.ObjectStorageArgs, _ *resources.Resources) error

func NewObjectStorageObject added in v0.1.15

func NewObjectStorageObject(r *ObjectStorageObject, resourceId string, args *resourcespb.ObjectStorageObjectArgs, others *resources.Resources) error

func NewPublicIp added in v0.1.15

func NewPublicIp(r *PublicIp, resourceId string, args *resourcespb.PublicIpArgs) error

func NewRg added in v0.1.36

func NewRg(resourceType string, r *resources.Resources, location commonpb.Location, cloud commonpb.CloudProvider) (string, error)

func NewRgFromParent added in v0.1.36

func NewRgFromParent(resourceType string, parentResourceGroupId string, r *resources.Resources, location commonpb.Location, cloud commonpb.CloudProvider) (string, error)

func NewRouteTable added in v0.1.15

func NewRouteTable(rt *RouteTable, resourceId string, args *resourcespb.RouteTableArgs, others *resources.Resources) error

func NewRouteTableAssociation added in v0.1.15

func NewRouteTableAssociation(rta *RouteTableAssociation, resourceId string, args *resourcespb.RouteTableAssociationArgs, others *resources.Resources) error

func NewSubnet added in v0.1.15

func NewSubnet(s *Subnet, resourceId string, subnet *resourcespb.SubnetArgs, others *resources.Resources) error

func NewVault added in v0.1.15

func NewVault(r *Vault, resourceId string, args *resourcespb.VaultArgs, _ *resources.Resources) error

func NewVaultAccessPolicy added in v0.1.15

func NewVaultAccessPolicy(vap *VaultAccessPolicy, resourceId string, args *resourcespb.VaultAccessPolicyArgs, others *resources.Resources) error

func NewVaultSecret added in v0.1.15

func NewVaultSecret(vs *VaultSecret, resourceId string, args *resourcespb.VaultSecretArgs, others *resources.Resources) error

func NewVirtualMachine added in v0.1.15

func NewVirtualMachine(vm *VirtualMachine, resourceId string, args *resourcespb.VirtualMachineArgs, others *resources.Resources) error

func NewVirtualNetwork added in v0.1.15

func NewVirtualNetwork(r *VirtualNetwork, resourceId string, vn *resourcespb.VirtualNetworkArgs) error

Types

type AzureResourceGroup added in v0.1.36

type AzureResourceGroup struct {
	*common.AzResource `hcl:",squash" default:"name=azurerm_resource_group"`
	Location           string `hcl:"location"`
}

type Database

type Database struct {
	resources.ResourceWithId[*resourcespb.DatabaseArgs]

	Subnet *Subnet
}

func (*Database) Create added in v0.1.44

func (r *Database) Create(resourceId string, args *resourcespb.DatabaseArgs, others *resources.Resources) error

func (*Database) Export added in v0.1.44

func (*Database) Import added in v0.1.44

func (r *Database) Import(resourceId string, args *resourcespb.DatabaseArgs, others *resources.Resources) error

func (*Database) Update added in v0.1.44

func (r *Database) Update(args *resourcespb.DatabaseArgs, others *resources.Resources) error

func (*Database) Validate

func (r *Database) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type KubernetesCluster added in v0.1.15

type KubernetesCluster struct {
	resources.ResourceWithId[*resourcespb.KubernetesClusterArgs]

	VirtualNetwork  *VirtualNetwork
	DefaultNodePool *KubernetesNodePool
}

func (*KubernetesCluster) Create added in v0.1.44

func (r *KubernetesCluster) Create(resourceId string, args *resourcespb.KubernetesClusterArgs, others *resources.Resources) error

func (*KubernetesCluster) Export added in v0.1.44

func (*KubernetesCluster) Import added in v0.1.44

func (r *KubernetesCluster) Import(resourceId string, args *resourcespb.KubernetesClusterArgs, others *resources.Resources) error

func (*KubernetesCluster) Update added in v0.1.44

func (*KubernetesCluster) Validate added in v0.1.15

type KubernetesNodePool added in v0.1.15

type KubernetesNodePool struct {
	resources.ChildResourceWithId[*KubernetesCluster, *resourcespb.KubernetesNodePoolArgs]

	KubernetesCluster *KubernetesCluster
	Subnet            *Subnet
}

func (*KubernetesNodePool) Create added in v0.1.44

func (*KubernetesNodePool) Export added in v0.1.44

func (*KubernetesNodePool) Import added in v0.1.44

func (*KubernetesNodePool) ParseCloud added in v0.1.56

func (*KubernetesNodePool) Update added in v0.1.44

func (*KubernetesNodePool) Validate added in v0.1.15

type NetworkInterface

type NetworkInterface struct {
	resources.ResourceWithId[*resourcespb.NetworkInterfaceArgs]

	Subnet   *Subnet
	PublicIp *PublicIp
}

func (*NetworkInterface) Create added in v0.1.44

func (r *NetworkInterface) Create(resourceId string, args *resourcespb.NetworkInterfaceArgs, others *resources.Resources) error

func (*NetworkInterface) Export added in v0.1.44

func (*NetworkInterface) Import added in v0.1.44

func (r *NetworkInterface) Import(resourceId string, args *resourcespb.NetworkInterfaceArgs, others *resources.Resources) error

func (*NetworkInterface) Update added in v0.1.44

func (*NetworkInterface) Validate

type NetworkInterfaceSecurityGroupAssociation added in v0.1.44

type NetworkInterfaceSecurityGroupAssociation struct {
	resources.ChildResourceWithId[*NetworkInterface, *resourcespb.NetworkInterfaceSecurityGroupAssociationArgs]

	NetworkInterface     *NetworkInterface
	NetworkSecurityGroup *NetworkSecurityGroup
}

func (*NetworkInterfaceSecurityGroupAssociation) Create added in v0.1.44

func (*NetworkInterfaceSecurityGroupAssociation) Export added in v0.1.44

func (*NetworkInterfaceSecurityGroupAssociation) Import added in v0.1.44

func (*NetworkInterfaceSecurityGroupAssociation) ParseCloud added in v0.1.56

func (*NetworkInterfaceSecurityGroupAssociation) Update added in v0.1.44

func (*NetworkInterfaceSecurityGroupAssociation) Validate added in v0.1.44

type NetworkSecurityGroup

type NetworkSecurityGroup struct {
	resources.ResourceWithId[*resourcespb.NetworkSecurityGroupArgs]

	VirtualNetwork *VirtualNetwork
}

func (*NetworkSecurityGroup) Create added in v0.1.44

func (*NetworkSecurityGroup) Export added in v0.1.44

func (*NetworkSecurityGroup) Import added in v0.1.44

func (*NetworkSecurityGroup) Update added in v0.1.44

func (*NetworkSecurityGroup) Validate

type ObjectStorage

type ObjectStorage struct {
	resources.ResourceWithId[*resourcespb.ObjectStorageArgs]
}

func (*ObjectStorage) Create added in v0.1.44

func (r *ObjectStorage) Create(resourceId string, args *resourcespb.ObjectStorageArgs, others *resources.Resources) error

func (*ObjectStorage) Export added in v0.1.44

func (*ObjectStorage) Import added in v0.1.44

func (r *ObjectStorage) Import(resourceId string, args *resourcespb.ObjectStorageArgs, others *resources.Resources) error

func (*ObjectStorage) Update added in v0.1.44

func (*ObjectStorage) Validate

func (r *ObjectStorage) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type ObjectStorageObject

type ObjectStorageObject struct {
	resources.ChildResourceWithId[*ObjectStorage, *resourcespb.ObjectStorageObjectArgs]

	ObjectStorage *ObjectStorage `mhcl:"ref=object_storage"`
}

func (*ObjectStorageObject) Create added in v0.1.44

func (*ObjectStorageObject) Export added in v0.1.44

func (*ObjectStorageObject) Import added in v0.1.44

func (*ObjectStorageObject) ParseCloud added in v0.1.56

func (*ObjectStorageObject) Update added in v0.1.44

func (*ObjectStorageObject) Validate

type Provider

type Provider struct {
	Cloud             commonpb.CloudProvider
	Location          string
	IsDefaultProvider bool
	NumResources      int
	Credentials       *credspb.CloudCredentials
	GcpProject        string
}

func (*Provider) GetId

func (p *Provider) GetId() string

func (*Provider) GetResourceId

func (p *Provider) GetResourceId() string

func (*Provider) Translate

func (p *Provider) Translate() []any

type PublicIp

type PublicIp struct {
	resources.ResourceWithId[*resourcespb.PublicIpArgs]
}

func (*PublicIp) Create added in v0.1.44

func (r *PublicIp) Create(resourceId string, args *resourcespb.PublicIpArgs, others *resources.Resources) error

func (*PublicIp) Export added in v0.1.44

func (*PublicIp) Import added in v0.1.44

func (r *PublicIp) Import(resourceId string, args *resourcespb.PublicIpArgs, _ *resources.Resources) error

func (*PublicIp) Update added in v0.1.44

func (*PublicIp) Validate

func (r *PublicIp) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type ResourceGroup added in v0.1.36

type ResourceGroup struct {
	resources.ResourceWithId[*resourcespb.ResourceGroupArgs]

	ImplictlyCreated bool
}

https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations

func NewResourceGroup added in v0.1.36

func NewResourceGroup(name string, location commonpb.Location, cloud commonpb.CloudProvider) *ResourceGroup

func (*ResourceGroup) Create added in v0.1.44

func (*ResourceGroup) Export added in v0.1.44

func (*ResourceGroup) GetAllDependentResources added in v0.1.44

func (r *ResourceGroup) GetAllDependentResources(others *resources.Resources) (res []string)

func (*ResourceGroup) Import added in v0.1.44

func (*ResourceGroup) Update added in v0.1.44

func (*ResourceGroup) Validate added in v0.1.36

type RouteTable

type RouteTable struct {
	resources.ChildResourceWithId[*VirtualNetwork, *resourcespb.RouteTableArgs]

	VirtualNetwork *VirtualNetwork `mhcl:"ref=virtual_network"`
}

func (*RouteTable) Create added in v0.1.44

func (r *RouteTable) Create(resourceId string, args *resourcespb.RouteTableArgs, others *resources.Resources) error

func (*RouteTable) Export added in v0.1.44

func (*RouteTable) Import added in v0.1.44

func (r *RouteTable) Import(resourceId string, args *resourcespb.RouteTableArgs, others *resources.Resources) error

func (*RouteTable) ParseCloud added in v0.1.56

func (*RouteTable) Update added in v0.1.44

func (r *RouteTable) Update(args *resourcespb.RouteTableArgs, others *resources.Resources) error

func (*RouteTable) Validate

func (r *RouteTable) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type RouteTableAssociation

type RouteTableAssociation struct {
	resources.ChildResourceWithId[*RouteTable, *resourcespb.RouteTableAssociationArgs]

	RouteTable *RouteTable
	Subnet     *Subnet
}

func (*RouteTableAssociation) Create added in v0.1.44

func (*RouteTableAssociation) Export added in v0.1.44

func (*RouteTableAssociation) Import added in v0.1.44

func (*RouteTableAssociation) ParseCloud added in v0.1.56

func (*RouteTableAssociation) Update added in v0.1.44

func (*RouteTableAssociation) Validate

type RuleType

type RuleType struct {
	Protocol  string `cty:"protocol"`
	Priority  int    `cty:"priority"`
	FromPort  string `cty:"from_port"`
	ToPort    string `cty:"to_port"`
	CidrBlock string `cty:"cidr_block"`
	Direction string `cty:"direction"`
}

type Subnet

func (*Subnet) Create added in v0.1.44

func (r *Subnet) Create(resourceId string, args *resourcespb.SubnetArgs, others *resources.Resources) error

func (*Subnet) Export added in v0.1.44

func (*Subnet) Import added in v0.1.44

func (r *Subnet) Import(resourceId string, args *resourcespb.SubnetArgs, others *resources.Resources) error

func (*Subnet) ParseCloud added in v0.1.56

func (r *Subnet) ParseCloud(args *resourcespb.SubnetArgs) commonpb.CloudProvider

func (*Subnet) Update added in v0.1.44

func (r *Subnet) Update(args *resourcespb.SubnetArgs, others *resources.Resources) error

func (*Subnet) Validate

func (r *Subnet) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type Vault

type Vault struct {
	resources.ResourceWithId[*resourcespb.VaultArgs]
}

func (*Vault) Create added in v0.1.44

func (r *Vault) Create(resourceId string, args *resourcespb.VaultArgs, others *resources.Resources) error

func (*Vault) Export added in v0.1.44

func (*Vault) Import added in v0.1.44

func (r *Vault) Import(resourceId string, args *resourcespb.VaultArgs, others *resources.Resources) error

func (*Vault) Update added in v0.1.44

func (r *Vault) Update(args *resourcespb.VaultArgs, others *resources.Resources) error

func (*Vault) Validate

func (r *Vault) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type VaultAccessPolicy

type VaultAccessPolicy struct {
	resources.ChildResourceWithId[*Vault, *resourcespb.VaultAccessPolicyArgs]
	Vault *Vault
}

func (*VaultAccessPolicy) Create added in v0.1.44

func (r *VaultAccessPolicy) Create(resourceId string, args *resourcespb.VaultAccessPolicyArgs, others *resources.Resources) error

func (*VaultAccessPolicy) Export added in v0.1.44

func (*VaultAccessPolicy) Import added in v0.1.44

func (r *VaultAccessPolicy) Import(resourceId string, args *resourcespb.VaultAccessPolicyArgs, others *resources.Resources) error

func (*VaultAccessPolicy) ParseCloud added in v0.1.56

func (*VaultAccessPolicy) Update added in v0.1.44

func (*VaultAccessPolicy) Validate

type VaultSecret

type VaultSecret struct {
	resources.ChildResourceWithId[*Vault, *resourcespb.VaultSecretArgs]

	Vault *Vault
}

func (*VaultSecret) Create added in v0.1.44

func (r *VaultSecret) Create(resourceId string, args *resourcespb.VaultSecretArgs, others *resources.Resources) error

func (*VaultSecret) Export added in v0.1.44

func (*VaultSecret) Import added in v0.1.44

func (r *VaultSecret) Import(resourceId string, args *resourcespb.VaultSecretArgs, others *resources.Resources) error

func (*VaultSecret) ParseCloud added in v0.1.56

func (*VaultSecret) Update added in v0.1.44

func (r *VaultSecret) Update(args *resourcespb.VaultSecretArgs, others *resources.Resources) error

func (*VaultSecret) Validate

func (r *VaultSecret) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type VirtualMachine

type VirtualMachine struct {
	resources.ResourceWithId[*resourcespb.VirtualMachineArgs]

	NetworkInterface      []*NetworkInterface
	NetworkSecurityGroups []*NetworkSecurityGroup
	Subnet                *Subnet
	PublicIp              *PublicIp
}

func (*VirtualMachine) Create added in v0.1.44

func (r *VirtualMachine) Create(resourceId string, args *resourcespb.VirtualMachineArgs, others *resources.Resources) error

func (*VirtualMachine) Export added in v0.1.44

func (*VirtualMachine) GetAwsIdentity added in v0.1.18

func (r *VirtualMachine) GetAwsIdentity() string

func (*VirtualMachine) Import added in v0.1.44

func (r *VirtualMachine) Import(resourceId string, args *resourcespb.VirtualMachineArgs, others *resources.Resources) error

func (*VirtualMachine) Update added in v0.1.44

func (*VirtualMachine) Validate

func (r *VirtualMachine) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

type VirtualNetwork

type VirtualNetwork struct {
	resources.ResourceWithId[*resourcespb.VirtualNetworkArgs]
}

func (*VirtualNetwork) Create added in v0.1.44

func (r *VirtualNetwork) Create(resourceId string, args *resourcespb.VirtualNetworkArgs, others *resources.Resources) error

func (*VirtualNetwork) Export added in v0.1.44

func (*VirtualNetwork) Import added in v0.1.44

func (r *VirtualNetwork) Import(resourceId string, args *resourcespb.VirtualNetworkArgs, _ *resources.Resources) error

func (*VirtualNetwork) Update added in v0.1.44

func (*VirtualNetwork) Validate

func (r *VirtualNetwork) Validate(ctx resources.MultyContext) (errs []validate.ValidationError)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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