network_security_group

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const AwsDefaultSecurityGroupResourceName = "aws_default_security_group"
View Source
const AwsSecurityGroupResourceName = "aws_security_group"
View Source
const AzureNetworkSecurityGroupResourceName = "azurerm_network_security_group"
View Source
const AzureNicNsgAssociation = "azurerm_network_interface_security_group_association"

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsAcl

type AwsAcl struct {
	*common.AwsResource `hcl:",squash"`
	VpcId               string       `hcl:"vpc_id,expr"`
	SubnetIds           []string     `hcl:"subnet_ids"`
	Ingress             []AwsAclRule `hcl:"ingress"`
	Egress              []AwsAclRule `hcl:"egress"`
}

type AwsAclRule

type AwsAclRule struct {
	Protocol   string   `hcl:"protocol"` // ALL: Aws = -1 (FromPort & ToPort must be 0) / SubnetAz = "*"
	RuleNumber int      `hcl:"rule_no"`
	Action     string   `hcl:"action"`
	FromPort   int      `hcl:"from_port"`
	ToPort     int      `hcl:"to_port"`
	CidrBlock  []string `hcl:"cidr_block"`
}

type AwsDefaultAcl

type AwsDefaultAcl struct {
	*common.AwsResource `hcl:",squash"`
	DefaultNetworkAclId string       `hcl:"default_network_acl_id,expr"`
	Ingress             []AwsAclRule `hcl:"ingress"`
	Egress              []AwsAclRule `hcl:"egress"`
}

type AwsDefaultSecurityGroup

type AwsDefaultSecurityGroup struct {
	*common.AwsResource `hcl:",squash" default:"name=aws_default_security_group"`
	VpcId               string                 `hcl:"vpc_id,expr"`
	Ingress             []AwsSecurityGroupRule `hcl:"ingress,blocks"`
	Egress              []AwsSecurityGroupRule `hcl:"egress,blocks"`
}

type AwsSecurityGroup

type AwsSecurityGroup struct {
	*common.AwsResource `hcl:",squash"  default:"name=aws_security_group"`
	VpcId               string                 `hcl:"vpc_id"`
	Name                string                 `hcl:"name"`
	Description         string                 `hcl:"description"`
	Ingress             []AwsSecurityGroupRule `hcl:"ingress,blocks"`
	Egress              []AwsSecurityGroupRule `hcl:"egress,blocks"`
}

type AwsSecurityGroupRule

type AwsSecurityGroupRule struct {
	Protocol   string   `hcl:"protocol"`
	FromPort   int      `hcl:"from_port"`
	ToPort     int      `hcl:"to_port"`
	CidrBlocks []string `hcl:"cidr_blocks"`
	Self       bool     `hcl:"self" hcle:"omitempty"`
}

type AzureNetworkInterfaceSecurityGroupAssociation

type AzureNetworkInterfaceSecurityGroupAssociation struct {
	*common.AzResource     `hcl:",squash" default:"name=azurerm_network_interface_security_group_association"`
	NetworkInterfaceId     string `hcl:"network_interface_id"`
	NetworkSecurityGroupId string `hcl:"network_security_group_id"`
}

type AzureNetworkSecurityGroup

type AzureNetworkSecurityGroup struct {
	Nsg                  AzureNsg                  `hcl:"resource"`
	SubnetNsgAssociation AzureSubnetNsgAssociation `hcl:"resource"`
}

type AzureNsg

type AzureNsg struct {
	*common.AzResource `hcl:",squash" default:"name=azurerm_network_security_group"`
	Rules              []AzureRule `hcl:"security_rule,blocks"`
}

type AzureRule

type AzureRule struct {
	Name                     string `hcl:"name"`
	Protocol                 string `hcl:"protocol"`
	Priority                 int    `hcl:"priority"`
	Access                   string `hcl:"access"`
	SourcePortRange          string `hcl:"source_port_range"`
	SourceAddressPrefix      string `hcl:"source_address_prefix"`
	DestinationPortRange     string `hcl:"destination_port_range"`
	DestinationAddressPrefix string `hcl:"destination_address_prefix"`
	Direction                string `hcl:"direction"`
}

type AzureSubnetNsgAssociation

type AzureSubnetNsgAssociation struct {
	ResourceName string `hcl:",key"`
	ResourceId   string `hcl:",key"`
	SubnetId     string `hcl:"subnet_id"`
	NsgId        string `hcl:"network_security_group_id,expr"`
}

Jump to

Keyboard shortcuts

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