types

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MPL-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INGRESS = "ingress"
	EGRESS  = "egress"
	BOTH    = "both"
	ALLOW   = "allow"
	DENY    = "deny"
)
View Source
const (
	INTERNET       = "Internet"
	VIRTUALNETWORK = "VirtualNetwork"
)
View Source
const SasExpirationDuration = time.Hour * 24 * 365

Variables

View Source
var SUPPORTED_CONTENT_TYPES = []string{"text/html", "application/zip"}

Functions

This section is empty.

Types

type AclRules

type AclRules struct{}

type AwsCallerIdentityData

type AwsCallerIdentityData struct {
	*output.TerraformDataSource `hcl:",squash" default:"name=aws_caller_identity"`
}

type AwsRegionData

type AwsRegionData struct {
	*output.TerraformDataSource `hcl:",squash" default:"name=aws_region"`
}

type AzureClientConfig

type AzureClientConfig struct {
	*output.TerraformDataSource `hcl:",squash" default:"name=azurerm_client_config"`
}

type Database

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

	Subnets []*Subnet
}

func NewDatabase added in v0.1.15

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

func (*Database) GetMainResourceName

func (r *Database) GetMainResourceName() (string, error)

func (*Database) Translate

func (r *Database) Translate(resources.MultyContext) ([]output.TfBlock, 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]

	Subnets []*Subnet
}

func NewKubernetesCluster added in v0.1.15

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

func (*KubernetesCluster) GetMainResourceName added in v0.1.15

func (r *KubernetesCluster) GetMainResourceName() (string, error)

func (*KubernetesCluster) GetOutputValues added in v0.1.15

func (r *KubernetesCluster) GetOutputValues(cloud commonpb.CloudProvider) map[string]cty.Value

func (*KubernetesCluster) Translate added in v0.1.15

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
	Subnets           []*Subnet // azure??
}

func NewKubernetesNodePool added in v0.1.15

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

func (*KubernetesNodePool) GetCloudSpecificLocation added in v0.1.15

func (r *KubernetesNodePool) GetCloudSpecificLocation() string

func (*KubernetesNodePool) GetMainResourceName added in v0.1.15

func (r *KubernetesNodePool) GetMainResourceName() (string, error)

func (*KubernetesNodePool) Translate added in v0.1.15

func (*KubernetesNodePool) Validate added in v0.1.15

type Lambda

type Lambda struct {
	resources.ResourceWithId[*resourcespb.LambdaArgs]

	SourceCodeObject *ObjectStorageObject `mhcl:"ref=source_code_object,optional"`
}

func NewLambda added in v0.1.15

func NewLambda(resourceId string, args *resourcespb.LambdaArgs, others resources.Resources) (*Lambda, error)

func (*Lambda) GetMainResourceName

func (r *Lambda) GetMainResourceName() (string, error)

func (*Lambda) GetOutputValues

func (r *Lambda) GetOutputValues(cloud commonpb.CloudProvider) map[string]cty.Value

func (*Lambda) Translate

func (r *Lambda) Translate(resources.MultyContext) ([]output.TfBlock, error)

func (*Lambda) Validate

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

type NetworkInterface

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

	Subnet *Subnet
}

func NewNetworkInterface added in v0.1.15

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

func (*NetworkInterface) GetId

func (*NetworkInterface) GetMainResourceName

func (r *NetworkInterface) GetMainResourceName() (string, error)

func (*NetworkInterface) Translate

func (r *NetworkInterface) Translate(ctx resources.MultyContext) ([]output.TfBlock, error)

func (*NetworkInterface) Validate

type NetworkSecurityGroup

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

	VirtualNetwork *VirtualNetwork
}

func NewNetworkSecurityGroup added in v0.1.15

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

func (*NetworkSecurityGroup) GetMainResourceName

func (r *NetworkSecurityGroup) GetMainResourceName() (string, error)

func (*NetworkSecurityGroup) Translate

func (*NetworkSecurityGroup) Validate

type ObjectStorage

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

func NewObjectStorage added in v0.1.15

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

func (*ObjectStorage) GetAssociatedPrivateContainerResourceName

func (r *ObjectStorage) GetAssociatedPrivateContainerResourceName() string

func (*ObjectStorage) GetAssociatedPublicContainerResourceName

func (r *ObjectStorage) GetAssociatedPublicContainerResourceName() string

func (*ObjectStorage) GetMainResourceName

func (r *ObjectStorage) GetMainResourceName() (string, error)

func (*ObjectStorage) GetResourceName

func (r *ObjectStorage) GetResourceName() string

func (*ObjectStorage) Translate

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 NewObjectStorageObject added in v0.1.15

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

func (*ObjectStorageObject) FromState added in v0.1.22

func (*ObjectStorageObject) GetAzureBlobName

func (r *ObjectStorageObject) GetAzureBlobName() string

func (*ObjectStorageObject) GetAzureBlobUrl

func (r *ObjectStorageObject) GetAzureBlobUrl() string

func (*ObjectStorageObject) GetCloudSpecificLocation added in v0.1.15

func (r *ObjectStorageObject) GetCloudSpecificLocation() string

func (*ObjectStorageObject) GetMainResourceName

func (r *ObjectStorageObject) GetMainResourceName() (string, error)

func (*ObjectStorageObject) GetS3Key

func (r *ObjectStorageObject) GetS3Key() string

func (*ObjectStorageObject) IsPrivate

func (r *ObjectStorageObject) IsPrivate() bool

func (*ObjectStorageObject) Translate

func (*ObjectStorageObject) Validate

type Provider

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

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]
	NetworkInterface *NetworkInterface
}

func NewPublicIp added in v0.1.15

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

func (*PublicIp) GetId

func (r *PublicIp) GetId(cloud commonpb.CloudProvider) string

func (*PublicIp) GetMainResourceName

func (r *PublicIp) GetMainResourceName() (string, error)

func (*PublicIp) Translate

func (r *PublicIp) Translate(resources.MultyContext) ([]output.TfBlock, error)

func (*PublicIp) Validate

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

type RouteTable

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

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

func NewRouteTable added in v0.1.15

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

func (*RouteTable) GetId

func (r *RouteTable) GetId(cloud commonpb.CloudProvider) string

func (*RouteTable) GetMainResourceName

func (r *RouteTable) GetMainResourceName() (string, error)

func (*RouteTable) Translate

func (r *RouteTable) Translate(resources.MultyContext) ([]output.TfBlock, 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
}

route_table_association

func NewRouteTableAssociation added in v0.1.15

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

func (*RouteTableAssociation) GetMainResourceName

func (r *RouteTableAssociation) GetMainResourceName() (string, error)

func (*RouteTableAssociation) Translate

func (*RouteTableAssociation) Validate

type RouteTableRoute

type RouteTableRoute struct {
	CidrBlock   string `cty:"cidr_block"`
	Destination string `cty:"destination"` // allowed: Internet
}

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 NewSubnet added in v0.1.15

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

func (*Subnet) GetCloudSpecificLocation added in v0.1.15

func (r *Subnet) GetCloudSpecificLocation() string

func (*Subnet) GetId

func (r *Subnet) GetId() string

func (*Subnet) GetMainResourceName

func (r *Subnet) GetMainResourceName() (string, error)

func (*Subnet) Translate

func (r *Subnet) Translate(ctx resources.MultyContext) ([]output.TfBlock, error)

func (*Subnet) Validate

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

type Vault

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

func NewVault added in v0.1.15

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

func (*Vault) GetMainResourceName

func (r *Vault) GetMainResourceName() (string, error)

func (*Vault) GetVaultId

func (r *Vault) GetVaultId() (string, error)

func (*Vault) Translate

func (r *Vault) Translate(resources.MultyContext) ([]output.TfBlock, 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 NewVaultAccessPolicy added in v0.1.15

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

func (*VaultAccessPolicy) GetAccessPolicyRules

func (r *VaultAccessPolicy) GetAccessPolicyRules() *vault.AzureKeyVaultPermissions

fix return

func (*VaultAccessPolicy) GetCloudSpecificLocation added in v0.1.15

func (r *VaultAccessPolicy) GetCloudSpecificLocation() string

func (*VaultAccessPolicy) GetMainResourceName

func (r *VaultAccessPolicy) GetMainResourceName() (string, error)

func (*VaultAccessPolicy) Translate

func (*VaultAccessPolicy) Validate

type VaultSecret

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

	Vault *Vault
}

func NewVaultSecret added in v0.1.15

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

func (*VaultSecret) GetCloudSpecificLocation added in v0.1.15

func (r *VaultSecret) GetCloudSpecificLocation() string

func (*VaultSecret) GetMainResourceName

func (r *VaultSecret) GetMainResourceName() (string, error)

func (*VaultSecret) Translate

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 NewVirtualMachine added in v0.1.15

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

func (*VirtualMachine) GetAssociatedKeyPairName

func (r *VirtualMachine) GetAssociatedKeyPairName() (string, error)

func (*VirtualMachine) GetAwsIdentity added in v0.1.18

func (r *VirtualMachine) GetAwsIdentity() string

func (*VirtualMachine) GetMainResourceName

func (r *VirtualMachine) GetMainResourceName() (string, error)

func (*VirtualMachine) Translate

func (r *VirtualMachine) Translate(ctx resources.MultyContext) ([]output.TfBlock, error)

func (*VirtualMachine) Validate

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

type VirtualNetwork

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

func NewVirtualNetwork added in v0.1.15

func NewVirtualNetwork(resourceId string, vn *resourcespb.VirtualNetworkArgs, _ resources.Resources) (*VirtualNetwork, error)

func (*VirtualNetwork) FromState added in v0.1.16

func (*VirtualNetwork) GetAssociatedInternetGateway

func (r *VirtualNetwork) GetAssociatedInternetGateway() (string, error)

func (*VirtualNetwork) GetAssociatedRouteTableId

func (r *VirtualNetwork) GetAssociatedRouteTableId() (string, error)

func (*VirtualNetwork) GetMainResourceName

func (r *VirtualNetwork) GetMainResourceName() (string, error)

func (*VirtualNetwork) GetVirtualNetworkId

func (r *VirtualNetwork) GetVirtualNetworkId() string

func (*VirtualNetwork) GetVirtualNetworkName

func (r *VirtualNetwork) GetVirtualNetworkName() string

func (*VirtualNetwork) Translate

func (*VirtualNetwork) Validate

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

TODO validate commonparams

Jump to

Keyboard shortcuts

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