securitygrouprule

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSecurityGroupRuleDataSource

func NewSecurityGroupRuleDataSource() datasource.DataSource

NewSecurityGroupRuleDataSource is a helper function to simplify the provider implementation.

func NewSecurityGroupRuleResource

func NewSecurityGroupRuleResource() resource.Resource

NewSecurityGroupRuleResource is a helper function to simplify the provider implementation.

func UseNullForUnknownBasedOnProtocolModifier

func UseNullForUnknownBasedOnProtocolModifier() planmodifier.Object

UseNullForUnknownBasedOnProtocolModifier returns a plan modifier that sets a null value into the planned value, based on the value of the protocol.name attribute.

To prevent Terraform errors, the framework automatically sets unconfigured and Computed attributes to an unknown value "(known after apply)" on update. To prevent always showing "(known after apply)" on update for an attribute, e.g. port_range, which never changes in case the protocol is a specific one, we set the value to null. Examples: port_range is only computed if protocol is not icmp and icmp_parameters is only computed if protocol is icmp

Types

type Model

type Model struct {
	Id                    types.String `tfsdk:"id"` // needed by TF
	ProjectId             types.String `tfsdk:"project_id"`
	SecurityGroupId       types.String `tfsdk:"security_group_id"`
	SecurityGroupRuleId   types.String `tfsdk:"security_group_rule_id"`
	Direction             types.String `tfsdk:"direction"`
	Description           types.String `tfsdk:"description"`
	EtherType             types.String `tfsdk:"ether_type"`
	IcmpParameters        types.Object `tfsdk:"icmp_parameters"`
	IpRange               types.String `tfsdk:"ip_range"`
	PortRange             types.Object `tfsdk:"port_range"`
	Protocol              types.Object `tfsdk:"protocol"`
	RemoteSecurityGroupId types.String `tfsdk:"remote_security_group_id"`
}

Jump to

Keyboard shortcuts

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