schema

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccName                  string = "name"
	AccOrganizationalUnit    string = "organizational_unit"
	AccCostCenter            string = "cost_center"
	AccKomuebProductTicket   string = "komueb_product_ticket"
	AccOwnerEmail            string = "owner_email"
	AccOwnerJiraUsername     string = "owner_jira_username"
	AccPersonalDataProcessed string = "personal_data_processed"
	AccPersonalDataStored    string = "personal_data_stored"
	AccGroupPermissions      string = "group_permissions"
	AccUserPermissions       string = "user_permissions"
	AccRootEmail             string = "root_email"
	AccAccountBudget         string = "account_budget"
	AccAccountBudgetEmail    string = "account_budget_email"
)
View Source
const (
	IngressTcp = "ingress_tcp"
	IngressUdp = "ingress_udp"
)
View Source
const (
	PsName                 string = "name"
	PsSsoAdminInstanceArn  string = "ssoadmin_instance_arn"
	PsManagedPolicyArns    string = "managed_policy_arns"
	PsInlinePolicyDocument string = "inline_policy_document"
	PsTags                 string = "tags"
)
View Source
const (
	EffectAllow string = "Allow"
	EffectDeny  string = "Deny"
)
View Source
const (
	AccountModuleType       string = "aws-account"
	PermissionSetModuleType string = "aws-ssoadmin-permission-set"
	IamPolicyDocumentType   string = "aws_iam_policy_document"
)
View Source
const (
	ModuleBlock string = "module"
	DataBlock   string = "data"
)
View Source
const NewModuleDefaultName = "peering_connections"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountModule

type AccountModule struct {
	ModuleName            string
	ProductTicket         string
	AccountName           string
	OrganizationalUnit    string
	CostCenter            int
	OwnerEmail            string
	OwnerJiraUsername     string
	GroupPermissions      map[string][]*PermissionSet
	UserPermissions       map[string][]*PermissionSet
	PersonalDataProcessed bool
	PersonalDataStored    bool
	RootEmail             string
	AccountBudget         int
	AccountBudgetEmail    string
}

func (*AccountModule) CheckAllAttributes

func (module *AccountModule) CheckAllAttributes(attrs *map[string]*hclwrite.Attribute) error

type AccountModules

type AccountModules []*AccountModule

type AivenConsumerModule

type AivenConsumerModule struct {
	Name               string
	AwsRoutResources   map[string]AwsRouteResource
	AwsNetworkAclRules map[string]AwsNetworkAclRule
	ConnectionAccepter AwsVpcPeeringConnectionAccepter
}

type AivenProducerModule

type AivenProducerModule struct {
	Name              string
	PeeringConnection AivenVpcPeeringConnection
	Consumer          *AivenConsumerModule
}

type AivenVpcPeeringConnection

type AivenVpcPeeringConnection struct {
	Key
	AivenProjectVpcId string
	VpcId             string
	AccountId         string
}

type Attributes

type Attributes struct {
	Id     string   `hcl:"id,attr"`
	Bucket string   `hcl:"bucket,optional"`
	Rest   hcl.Body `hcl:"rest,remain"`
}

type AwsNetworkAclRule

type AwsNetworkAclRule struct {
	Key
	IngressProtocol     string
	IngressNetworkAclId string
	IngressRuleNumber   int64
	IngressDenyToPort   int64
	IngressEgress       bool
}

type AwsRouteResource

type AwsRouteResource struct {
	Key
	RouteTableId              string
	RouteDestinationCidrBlock string
}

type AwsVpcPeeringConnectionAccepter

type AwsVpcPeeringConnectionAccepter struct {
	Key
	VpcId               string
	PeeringConnectionId string
}

type BlockMetaData

type BlockMetaData struct {
	BlockType string
	BlockName string
}

type CallerIdentity

type CallerIdentity struct {
	UserId  string `hcl:"UserId,attr"`
	Account string `hcl:"Account,attr"`
	Arn     string `hcl:"Arn,attr"`
}

type ConflictingConsumer

type ConflictingConsumer struct {
	Module              string
	Address             string
	VpcId               string
	PeeringConnectionId string
}

type Done

type Done struct {
	Status         Status
	Dir            string
	FailedResource *ImportResource
	ResourceCount  int
	Message        string
	CleanErrors    string
}

func (*Done) GetResourceCount

func (done *Done) GetResourceCount() int

func (*Done) GetStatus

func (done *Done) GetStatus() Status

type ErrResult

type ErrResult struct {
	Status        Status
	Dir           string
	ResourceCount int
	Message       string
}

func (*ErrResult) GetResourceCount

func (e *ErrResult) GetResourceCount() int

func (*ErrResult) GetStatus

func (e *ErrResult) GetStatus() Status

type Import

type Import struct {
	Module  string
	Address string
	Id      string
}

type ImportResource

type ImportResource struct {
	Address string
	Id      string
}

type IndexedInstance added in v0.0.2

type IndexedInstance struct {
	IndexKey string   `hcl:"index_key,optional"`
	Rest     hcl.Body `hcl:"rest,remain"`
}

type IngressAttributes

type IngressAttributes struct {
	IngressProtocol     string   `hcl:"protocol,optional"`
	IngressNetworkAclId string   `hcl:"network_acl_id,optional"`
	IngressRuleNumber   int64    `hcl:"rule_number,optional"`
	IngressToPort       int64    `hcl:"to_port,optional"`
	IngressEgress       bool     `hcl:"egress,optional"`
	Rest                hcl.Body `hcl:"rest,remain"`
}

type Instance

type Instance struct {
	Attrs Attributes `hcl:"attributes,block"`
	Rest  hcl.Body   `hcl:"rest,remain"`
}

type Key

type Key struct {
	Address string
	Id      string
}

type OkResult

type OkResult struct {
	Status        Status
	Dir           string
	ResourceCount int
	Message       string
}

func (*OkResult) GetResourceCount

func (ok *OkResult) GetResourceCount() int

func (*OkResult) GetStatus

func (ok *OkResult) GetStatus() Status

type Org

type Org int
const (
	TestOrg Org = 0
	ProdOrg Org = 1
)

type PeeringAccepterAttributes

type PeeringAccepterAttributes struct {
	VpcId               string   `hcl:"vpc_id,optional"`
	PeeringConnectionId string   `hcl:"vpc_peering_connection_id,optional"`
	Rest                hcl.Body `hcl:"rest,remain"`
}

type PeeringConnectionAttributes

type PeeringConnectionAttributes struct {
	VpcId            string   `hcl:"vpc_id,optional"`
	PeerVpcId        string   `hcl:"peer_vpc,optional"`
	PeerCloudAccount string   `hcl:"peer_cloud_account,optional"`
	Rest             hcl.Body `hcl:"rest,remain"`
}

type PermissionSet

type PermissionSet struct {
	Policy PolicyType
	Val    string
}

type PermissionSetModule

type PermissionSetModule struct {
	ModuleName            string
	PermissionSetName     string
	NameAttr              *hclwrite.Attribute
	PolicyDocumentName    string
	PolicyDocument        *PolicyDocument
	ManagedPolicyArnsAttr *hclwrite.Attribute
	TagsAttr              *hclwrite.Attribute
	ProductTicket         string
}

func (*PermissionSetModule) CheckAllAttributes

func (module *PermissionSetModule) CheckAllAttributes(attrs *map[string]*hclwrite.Attribute) error

type PermissionSetModules

type PermissionSetModules []*PermissionSetModule

type PolicyDocument

type PolicyDocument struct {
	Statements []Statement `hcl:"statement,block"`
}

type PolicyType

type PolicyType int
const (
	ManagedPolicy PolicyType = 0
	InlinePolicy  PolicyType = 1
)

type Resource

type Resource struct {
	Module    string     `hcl:"module,optional"`
	Mode      string     `hcl:"mode,attr"`
	Type      string     `hcl:"type,attr"`
	Name      string     `hcl:"name,attr"`
	Provider  string     `hcl:"provider,attr"`
	Instances []Instance `hcl:"instances,block"`
}

type ResourceCount

type ResourceCount struct {
	Dir     string
	Total   int
	Message string
}

type Result

type Result interface {
	GetStatus() Status
	GetResourceCount() int
}

type RouteAttributes

type RouteAttributes struct {
	RouteDestinationCidrBlock string   `hcl:"destination_cidr_block,optional"`
	RouteTableId              string   `hcl:"route_table_id,optional"`
	Rest                      hcl.Body `hcl:"rest,remain"`
}

type Statement

type Statement struct {
	Sid       string   `hcl:"sid,optional"`
	Effect    string   `hcl:"effect,optional"`
	Actions   []string `hcl:"actions"`
	Resources []string `hcl:"resources"`
}

type Status

type Status int
const (
	Ok  Status = 0
	Err Status = 1
)

type TerraformState

type TerraformState struct {
	Version          string     `hcl:"version,attr"`
	TerraformVersion string     `hcl:"terraform_version,attr"`
	Serial           int        `hcl:"serial,attr"`
	Lineage          string     `hcl:"lineage,attr"`
	Outputs          hcl.Body   `hcl:"lineage,body"`
	Resources        []Resource `hcl:"resources,block"`
	Rest             hcl.Body   `hcl:"rest,remain"`
}

type TfImport

type TfImport struct {
	Address string
	Id      string
}

Jump to

Keyboard shortcuts

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