Documentation ¶
Index ¶
- type Firewall
- type FirewallArgs
- type FirewallArray
- type FirewallArrayInput
- type FirewallArrayOutput
- type FirewallInput
- type FirewallMap
- type FirewallMapInput
- type FirewallMapOutput
- type FirewallOutput
- func (o FirewallOutput) AdminStateUp() pulumi.BoolPtrOutput
- func (o FirewallOutput) AssociatedRouters() pulumi.StringArrayOutput
- func (o FirewallOutput) Description() pulumi.StringPtrOutput
- func (FirewallOutput) ElementType() reflect.Type
- func (o FirewallOutput) Name() pulumi.StringOutput
- func (o FirewallOutput) NoRouters() pulumi.BoolPtrOutput
- func (o FirewallOutput) PolicyId() pulumi.StringOutput
- func (o FirewallOutput) Region() pulumi.StringOutput
- func (o FirewallOutput) TenantId() pulumi.StringOutput
- func (o FirewallOutput) ToFirewallOutput() FirewallOutput
- func (o FirewallOutput) ToFirewallOutputWithContext(ctx context.Context) FirewallOutput
- func (o FirewallOutput) ValueSpecs() pulumi.MapOutput
- type FirewallState
- type GroupV2
- type GroupV2Args
- type GroupV2Array
- type GroupV2ArrayInput
- type GroupV2ArrayOutput
- type GroupV2Input
- type GroupV2Map
- type GroupV2MapInput
- type GroupV2MapOutput
- type GroupV2Output
- func (o GroupV2Output) AdminStateUp() pulumi.BoolPtrOutput
- func (o GroupV2Output) Description() pulumi.StringPtrOutput
- func (o GroupV2Output) EgressFirewallPolicyId() pulumi.StringPtrOutput
- func (GroupV2Output) ElementType() reflect.Type
- func (o GroupV2Output) IngressFirewallPolicyId() pulumi.StringPtrOutput
- func (o GroupV2Output) Name() pulumi.StringOutput
- func (o GroupV2Output) Ports() pulumi.StringArrayOutput
- func (o GroupV2Output) ProjectId() pulumi.StringOutput
- func (o GroupV2Output) Region() pulumi.StringOutput
- func (o GroupV2Output) Shared() pulumi.BoolPtrOutput
- func (o GroupV2Output) Status() pulumi.StringOutput
- func (o GroupV2Output) TenantId() pulumi.StringOutput
- func (o GroupV2Output) ToGroupV2Output() GroupV2Output
- func (o GroupV2Output) ToGroupV2OutputWithContext(ctx context.Context) GroupV2Output
- type GroupV2State
- type LookupPolicyArgs
- type LookupPolicyOutputArgs
- type LookupPolicyResult
- type LookupPolicyResultOutput
- func (o LookupPolicyResultOutput) Audited() pulumi.BoolOutput
- func (o LookupPolicyResultOutput) Description() pulumi.StringOutput
- func (LookupPolicyResultOutput) ElementType() reflect.Type
- func (o LookupPolicyResultOutput) Id() pulumi.StringOutput
- func (o LookupPolicyResultOutput) Name() pulumi.StringPtrOutput
- func (o LookupPolicyResultOutput) PolicyId() pulumi.StringPtrOutput
- func (o LookupPolicyResultOutput) Region() pulumi.StringOutput
- func (o LookupPolicyResultOutput) Rules() pulumi.StringArrayOutput
- func (o LookupPolicyResultOutput) Shared() pulumi.BoolOutput
- func (o LookupPolicyResultOutput) TenantId() pulumi.StringOutput
- func (o LookupPolicyResultOutput) ToLookupPolicyResultOutput() LookupPolicyResultOutput
- func (o LookupPolicyResultOutput) ToLookupPolicyResultOutputWithContext(ctx context.Context) LookupPolicyResultOutput
- type Policy
- type PolicyArgs
- type PolicyArray
- type PolicyArrayInput
- type PolicyArrayOutput
- type PolicyInput
- type PolicyMap
- type PolicyMapInput
- type PolicyMapOutput
- type PolicyOutput
- func (o PolicyOutput) Audited() pulumi.BoolPtrOutput
- func (o PolicyOutput) Description() pulumi.StringPtrOutput
- func (PolicyOutput) ElementType() reflect.Type
- func (o PolicyOutput) Name() pulumi.StringOutput
- func (o PolicyOutput) Region() pulumi.StringOutput
- func (o PolicyOutput) Rules() pulumi.StringArrayOutput
- func (o PolicyOutput) Shared() pulumi.BoolPtrOutput
- func (o PolicyOutput) TenantId() pulumi.StringOutput
- func (o PolicyOutput) ToPolicyOutput() PolicyOutput
- func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
- func (o PolicyOutput) ValueSpecs() pulumi.MapOutput
- type PolicyState
- type PolicyV2
- type PolicyV2Args
- type PolicyV2Array
- type PolicyV2ArrayInput
- type PolicyV2ArrayOutput
- type PolicyV2Input
- type PolicyV2Map
- type PolicyV2MapInput
- type PolicyV2MapOutput
- type PolicyV2Output
- func (o PolicyV2Output) Audited() pulumi.BoolPtrOutput
- func (o PolicyV2Output) Description() pulumi.StringPtrOutput
- func (PolicyV2Output) ElementType() reflect.Type
- func (o PolicyV2Output) Name() pulumi.StringOutput
- func (o PolicyV2Output) ProjectId() pulumi.StringOutput
- func (o PolicyV2Output) Region() pulumi.StringOutput
- func (o PolicyV2Output) Rules() pulumi.StringArrayOutput
- func (o PolicyV2Output) Shared() pulumi.BoolPtrOutput
- func (o PolicyV2Output) TenantId() pulumi.StringOutput
- func (o PolicyV2Output) ToPolicyV2Output() PolicyV2Output
- func (o PolicyV2Output) ToPolicyV2OutputWithContext(ctx context.Context) PolicyV2Output
- type PolicyV2State
- type Rule
- type RuleArgs
- type RuleArray
- type RuleArrayInput
- type RuleArrayOutput
- type RuleInput
- type RuleMap
- type RuleMapInput
- type RuleMapOutput
- type RuleOutput
- func (o RuleOutput) Action() pulumi.StringOutput
- func (o RuleOutput) Description() pulumi.StringPtrOutput
- func (o RuleOutput) DestinationIpAddress() pulumi.StringPtrOutput
- func (o RuleOutput) DestinationPort() pulumi.StringPtrOutput
- func (RuleOutput) ElementType() reflect.Type
- func (o RuleOutput) Enabled() pulumi.BoolPtrOutput
- func (o RuleOutput) IpVersion() pulumi.IntPtrOutput
- func (o RuleOutput) Name() pulumi.StringOutput
- func (o RuleOutput) Protocol() pulumi.StringOutput
- func (o RuleOutput) Region() pulumi.StringOutput
- func (o RuleOutput) SourceIpAddress() pulumi.StringPtrOutput
- func (o RuleOutput) SourcePort() pulumi.StringPtrOutput
- func (o RuleOutput) TenantId() pulumi.StringPtrOutput
- func (o RuleOutput) ToRuleOutput() RuleOutput
- func (o RuleOutput) ToRuleOutputWithContext(ctx context.Context) RuleOutput
- func (o RuleOutput) ValueSpecs() pulumi.MapOutput
- type RuleState
- type RuleV2
- type RuleV2Args
- type RuleV2Array
- type RuleV2ArrayInput
- type RuleV2ArrayOutput
- type RuleV2Input
- type RuleV2Map
- type RuleV2MapInput
- type RuleV2MapOutput
- type RuleV2Output
- func (o RuleV2Output) Action() pulumi.StringPtrOutput
- func (o RuleV2Output) Description() pulumi.StringPtrOutput
- func (o RuleV2Output) DestinationIpAddress() pulumi.StringPtrOutput
- func (o RuleV2Output) DestinationPort() pulumi.StringPtrOutput
- func (RuleV2Output) ElementType() reflect.Type
- func (o RuleV2Output) Enabled() pulumi.BoolPtrOutput
- func (o RuleV2Output) IpVersion() pulumi.IntPtrOutput
- func (o RuleV2Output) Name() pulumi.StringOutput
- func (o RuleV2Output) ProjectId() pulumi.StringOutput
- func (o RuleV2Output) Protocol() pulumi.StringPtrOutput
- func (o RuleV2Output) Region() pulumi.StringOutput
- func (o RuleV2Output) Shared() pulumi.BoolPtrOutput
- func (o RuleV2Output) SourceIpAddress() pulumi.StringPtrOutput
- func (o RuleV2Output) SourcePort() pulumi.StringPtrOutput
- func (o RuleV2Output) TenantId() pulumi.StringOutput
- func (o RuleV2Output) ToRuleV2Output() RuleV2Output
- func (o RuleV2Output) ToRuleV2OutputWithContext(ctx context.Context) RuleV2Output
- type RuleV2State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Firewall ¶
type Firewall struct { pulumi.CustomResourceState // Administrative up/down status for the firewall // (must be "true" or "false" if provided - defaults to "true"). // Changing this updates the `adminStateUp` of an existing firewall. AdminStateUp pulumi.BoolPtrOutput `pulumi:"adminStateUp"` // Router(s) to associate this firewall instance // with. Must be a list of strings. Changing this updates the associated routers // of an existing firewall. Conflicts with `noRouters`. AssociatedRouters pulumi.StringArrayOutput `pulumi:"associatedRouters"` // A description for the firewall. Changing this // updates the `description` of an existing firewall. Description pulumi.StringPtrOutput `pulumi:"description"` // A name for the firewall. Changing this // updates the `name` of an existing firewall. Name pulumi.StringOutput `pulumi:"name"` // Should this firewall not be associated with any routers // (must be "true" or "false" if provide - defaults to "false"). // Conflicts with `associatedRouters`. NoRouters pulumi.BoolPtrOutput `pulumi:"noRouters"` // The policy resource id for the firewall. Changing // this updates the `policyId` of an existing firewall. PolicyId pulumi.StringOutput `pulumi:"policyId"` // The region in which to obtain the v1 networking client. // A networking client is needed to create a firewall. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall. Region pulumi.StringOutput `pulumi:"region"` // The owner of the floating IP. Required if admin wants // to create a firewall for another tenant. Changing this creates a new // firewall. TenantId pulumi.StringOutput `pulumi:"tenantId"` // Map of additional options. ValueSpecs pulumi.MapOutput `pulumi:"valueSpecs"` }
Manages a v1 firewall resource within OpenStack.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { rule1, err := firewall.NewRule(ctx, "rule1", &firewall.RuleArgs{ Description: pulumi.String("drop TELNET traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("tcp"), DestinationPort: pulumi.String("23"), Enabled: pulumi.Bool(true), }) if err != nil { return err } rule2, err := firewall.NewRule(ctx, "rule2", &firewall.RuleArgs{ Description: pulumi.String("drop NTP traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("udp"), DestinationPort: pulumi.String("123"), Enabled: pulumi.Bool(false), }) if err != nil { return err } policy1, err := firewall.NewPolicy(ctx, "policy1", &firewall.PolicyArgs{ Rules: pulumi.StringArray{ rule1.ID(), rule2.ID(), }, }) if err != nil { return err } _, err = firewall.NewFirewall(ctx, "firewall1", &firewall.FirewallArgs{ PolicyId: policy1.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Firewalls can be imported using the `id`, e.g.
```sh $ pulumi import openstack:firewall/firewall:Firewall firewall_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97 ```
func GetFirewall ¶
func GetFirewall(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallState, opts ...pulumi.ResourceOption) (*Firewall, error)
GetFirewall gets an existing Firewall resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewFirewall ¶
func NewFirewall(ctx *pulumi.Context, name string, args *FirewallArgs, opts ...pulumi.ResourceOption) (*Firewall, error)
NewFirewall registers a new resource with the given unique name, arguments, and options.
func (*Firewall) ElementType ¶
func (*Firewall) ToFirewallOutput ¶
func (i *Firewall) ToFirewallOutput() FirewallOutput
func (*Firewall) ToFirewallOutputWithContext ¶
func (i *Firewall) ToFirewallOutputWithContext(ctx context.Context) FirewallOutput
type FirewallArgs ¶
type FirewallArgs struct { // Administrative up/down status for the firewall // (must be "true" or "false" if provided - defaults to "true"). // Changing this updates the `adminStateUp` of an existing firewall. AdminStateUp pulumi.BoolPtrInput // Router(s) to associate this firewall instance // with. Must be a list of strings. Changing this updates the associated routers // of an existing firewall. Conflicts with `noRouters`. AssociatedRouters pulumi.StringArrayInput // A description for the firewall. Changing this // updates the `description` of an existing firewall. Description pulumi.StringPtrInput // A name for the firewall. Changing this // updates the `name` of an existing firewall. Name pulumi.StringPtrInput // Should this firewall not be associated with any routers // (must be "true" or "false" if provide - defaults to "false"). // Conflicts with `associatedRouters`. NoRouters pulumi.BoolPtrInput // The policy resource id for the firewall. Changing // this updates the `policyId` of an existing firewall. PolicyId pulumi.StringInput // The region in which to obtain the v1 networking client. // A networking client is needed to create a firewall. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall. Region pulumi.StringPtrInput // The owner of the floating IP. Required if admin wants // to create a firewall for another tenant. Changing this creates a new // firewall. TenantId pulumi.StringPtrInput // Map of additional options. ValueSpecs pulumi.MapInput }
The set of arguments for constructing a Firewall resource.
func (FirewallArgs) ElementType ¶
func (FirewallArgs) ElementType() reflect.Type
type FirewallArray ¶
type FirewallArray []FirewallInput
func (FirewallArray) ElementType ¶
func (FirewallArray) ElementType() reflect.Type
func (FirewallArray) ToFirewallArrayOutput ¶
func (i FirewallArray) ToFirewallArrayOutput() FirewallArrayOutput
func (FirewallArray) ToFirewallArrayOutputWithContext ¶
func (i FirewallArray) ToFirewallArrayOutputWithContext(ctx context.Context) FirewallArrayOutput
type FirewallArrayInput ¶
type FirewallArrayInput interface { pulumi.Input ToFirewallArrayOutput() FirewallArrayOutput ToFirewallArrayOutputWithContext(context.Context) FirewallArrayOutput }
FirewallArrayInput is an input type that accepts FirewallArray and FirewallArrayOutput values. You can construct a concrete instance of `FirewallArrayInput` via:
FirewallArray{ FirewallArgs{...} }
type FirewallArrayOutput ¶
type FirewallArrayOutput struct{ *pulumi.OutputState }
func (FirewallArrayOutput) ElementType ¶
func (FirewallArrayOutput) ElementType() reflect.Type
func (FirewallArrayOutput) Index ¶
func (o FirewallArrayOutput) Index(i pulumi.IntInput) FirewallOutput
func (FirewallArrayOutput) ToFirewallArrayOutput ¶
func (o FirewallArrayOutput) ToFirewallArrayOutput() FirewallArrayOutput
func (FirewallArrayOutput) ToFirewallArrayOutputWithContext ¶
func (o FirewallArrayOutput) ToFirewallArrayOutputWithContext(ctx context.Context) FirewallArrayOutput
type FirewallInput ¶
type FirewallInput interface { pulumi.Input ToFirewallOutput() FirewallOutput ToFirewallOutputWithContext(ctx context.Context) FirewallOutput }
type FirewallMap ¶
type FirewallMap map[string]FirewallInput
func (FirewallMap) ElementType ¶
func (FirewallMap) ElementType() reflect.Type
func (FirewallMap) ToFirewallMapOutput ¶
func (i FirewallMap) ToFirewallMapOutput() FirewallMapOutput
func (FirewallMap) ToFirewallMapOutputWithContext ¶
func (i FirewallMap) ToFirewallMapOutputWithContext(ctx context.Context) FirewallMapOutput
type FirewallMapInput ¶
type FirewallMapInput interface { pulumi.Input ToFirewallMapOutput() FirewallMapOutput ToFirewallMapOutputWithContext(context.Context) FirewallMapOutput }
FirewallMapInput is an input type that accepts FirewallMap and FirewallMapOutput values. You can construct a concrete instance of `FirewallMapInput` via:
FirewallMap{ "key": FirewallArgs{...} }
type FirewallMapOutput ¶
type FirewallMapOutput struct{ *pulumi.OutputState }
func (FirewallMapOutput) ElementType ¶
func (FirewallMapOutput) ElementType() reflect.Type
func (FirewallMapOutput) MapIndex ¶
func (o FirewallMapOutput) MapIndex(k pulumi.StringInput) FirewallOutput
func (FirewallMapOutput) ToFirewallMapOutput ¶
func (o FirewallMapOutput) ToFirewallMapOutput() FirewallMapOutput
func (FirewallMapOutput) ToFirewallMapOutputWithContext ¶
func (o FirewallMapOutput) ToFirewallMapOutputWithContext(ctx context.Context) FirewallMapOutput
type FirewallOutput ¶
type FirewallOutput struct{ *pulumi.OutputState }
func (FirewallOutput) AdminStateUp ¶ added in v3.9.0
func (o FirewallOutput) AdminStateUp() pulumi.BoolPtrOutput
Administrative up/down status for the firewall (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `adminStateUp` of an existing firewall.
func (FirewallOutput) AssociatedRouters ¶ added in v3.9.0
func (o FirewallOutput) AssociatedRouters() pulumi.StringArrayOutput
Router(s) to associate this firewall instance with. Must be a list of strings. Changing this updates the associated routers of an existing firewall. Conflicts with `noRouters`.
func (FirewallOutput) Description ¶ added in v3.9.0
func (o FirewallOutput) Description() pulumi.StringPtrOutput
A description for the firewall. Changing this updates the `description` of an existing firewall.
func (FirewallOutput) ElementType ¶
func (FirewallOutput) ElementType() reflect.Type
func (FirewallOutput) Name ¶ added in v3.9.0
func (o FirewallOutput) Name() pulumi.StringOutput
A name for the firewall. Changing this updates the `name` of an existing firewall.
func (FirewallOutput) NoRouters ¶ added in v3.9.0
func (o FirewallOutput) NoRouters() pulumi.BoolPtrOutput
Should this firewall not be associated with any routers (must be "true" or "false" if provide - defaults to "false"). Conflicts with `associatedRouters`.
func (FirewallOutput) PolicyId ¶ added in v3.9.0
func (o FirewallOutput) PolicyId() pulumi.StringOutput
The policy resource id for the firewall. Changing this updates the `policyId` of an existing firewall.
func (FirewallOutput) Region ¶ added in v3.9.0
func (o FirewallOutput) Region() pulumi.StringOutput
The region in which to obtain the v1 networking client. A networking client is needed to create a firewall. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall.
func (FirewallOutput) TenantId ¶ added in v3.9.0
func (o FirewallOutput) TenantId() pulumi.StringOutput
The owner of the floating IP. Required if admin wants to create a firewall for another tenant. Changing this creates a new firewall.
func (FirewallOutput) ToFirewallOutput ¶
func (o FirewallOutput) ToFirewallOutput() FirewallOutput
func (FirewallOutput) ToFirewallOutputWithContext ¶
func (o FirewallOutput) ToFirewallOutputWithContext(ctx context.Context) FirewallOutput
func (FirewallOutput) ValueSpecs ¶ added in v3.9.0
func (o FirewallOutput) ValueSpecs() pulumi.MapOutput
Map of additional options.
type FirewallState ¶
type FirewallState struct { // Administrative up/down status for the firewall // (must be "true" or "false" if provided - defaults to "true"). // Changing this updates the `adminStateUp` of an existing firewall. AdminStateUp pulumi.BoolPtrInput // Router(s) to associate this firewall instance // with. Must be a list of strings. Changing this updates the associated routers // of an existing firewall. Conflicts with `noRouters`. AssociatedRouters pulumi.StringArrayInput // A description for the firewall. Changing this // updates the `description` of an existing firewall. Description pulumi.StringPtrInput // A name for the firewall. Changing this // updates the `name` of an existing firewall. Name pulumi.StringPtrInput // Should this firewall not be associated with any routers // (must be "true" or "false" if provide - defaults to "false"). // Conflicts with `associatedRouters`. NoRouters pulumi.BoolPtrInput // The policy resource id for the firewall. Changing // this updates the `policyId` of an existing firewall. PolicyId pulumi.StringPtrInput // The region in which to obtain the v1 networking client. // A networking client is needed to create a firewall. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall. Region pulumi.StringPtrInput // The owner of the floating IP. Required if admin wants // to create a firewall for another tenant. Changing this creates a new // firewall. TenantId pulumi.StringPtrInput // Map of additional options. ValueSpecs pulumi.MapInput }
func (FirewallState) ElementType ¶
func (FirewallState) ElementType() reflect.Type
type GroupV2 ¶ added in v3.13.0
type GroupV2 struct { pulumi.CustomResourceState // Administrative up/down status for the firewall // group (must be "true" or "false" if provided - defaults to "true"). // Changing this updates the `adminStateUp` of an existing firewall group. AdminStateUp pulumi.BoolPtrOutput `pulumi:"adminStateUp"` // A description for the firewall group. Changing this // updates the `description` of an existing firewall group. Description pulumi.StringPtrOutput `pulumi:"description"` // The egress firewall policy resource // id for the firewall group. Changing this updates the // `egressFirewallPolicyId` of an existing firewall group. EgressFirewallPolicyId pulumi.StringPtrOutput `pulumi:"egressFirewallPolicyId"` // The ingress firewall policy resource // id for the firewall group. Changing this updates the // `ingressFirewallPolicyId` of an existing firewall group. IngressFirewallPolicyId pulumi.StringPtrOutput `pulumi:"ingressFirewallPolicyId"` // A name for the firewall group. Changing this // updates the `name` of an existing firewall. Name pulumi.StringOutput `pulumi:"name"` // Port(s) to associate this firewall group // with. Must be a list of strings. Changing this updates the associated ports // of an existing firewall group. Ports pulumi.StringArrayOutput `pulumi:"ports"` // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall group. Required if admin wants // to create a firewall group for another project. Changing this creates a new // firewall group. ProjectId pulumi.StringOutput `pulumi:"projectId"` // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall group. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall group. Region pulumi.StringOutput `pulumi:"region"` // or "false" if provided). If this is "true" the firewall group is visible to, // and can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall group. Only administrative users // can specify if the firewall group should be shared. Shared pulumi.BoolPtrOutput `pulumi:"shared"` // The status of the firewall group. Status pulumi.StringOutput `pulumi:"status"` // This argument conflicts and is interchangeable with // `projectId`. The owner of the firewall group. Required if admin wants to // create a firewall group for another tenant. Changing this creates a new // firewall group. TenantId pulumi.StringOutput `pulumi:"tenantId"` }
Manages a v2 firewall group resource within OpenStack.
> **Note:** Firewall v2 has no support for OVN currently.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { rule1, err := firewall.NewRuleV2(ctx, "rule1", &firewall.RuleV2Args{ Description: pulumi.String("drop TELNET traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("tcp"), DestinationPort: pulumi.String("23"), Enabled: pulumi.Bool(true), }) if err != nil { return err } rule2, err := firewall.NewRuleV2(ctx, "rule2", &firewall.RuleV2Args{ Description: pulumi.String("drop NTP traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("udp"), DestinationPort: pulumi.String("123"), Enabled: pulumi.Bool(false), }) if err != nil { return err } policy1, err := firewall.NewPolicyV2(ctx, "policy1", &firewall.PolicyV2Args{ Rules: pulumi.StringArray{ rule1.ID(), }, }) if err != nil { return err } policy2, err := firewall.NewPolicyV2(ctx, "policy2", &firewall.PolicyV2Args{ Rules: pulumi.StringArray{ rule2.ID(), }, }) if err != nil { return err } _, err = firewall.NewGroupV2(ctx, "group1", &firewall.GroupV2Args{ IngressFirewallPolicyId: policy1.ID(), EgressFirewallPolicyId: policy2.ID(), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Firewall groups can be imported using the `id`, e.g.
```sh $ pulumi import openstack:firewall/groupV2:GroupV2 group_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97 ```
func GetGroupV2 ¶ added in v3.13.0
func GetGroupV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GroupV2State, opts ...pulumi.ResourceOption) (*GroupV2, error)
GetGroupV2 gets an existing GroupV2 resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewGroupV2 ¶ added in v3.13.0
func NewGroupV2(ctx *pulumi.Context, name string, args *GroupV2Args, opts ...pulumi.ResourceOption) (*GroupV2, error)
NewGroupV2 registers a new resource with the given unique name, arguments, and options.
func (*GroupV2) ElementType ¶ added in v3.13.0
func (*GroupV2) ToGroupV2Output ¶ added in v3.13.0
func (i *GroupV2) ToGroupV2Output() GroupV2Output
func (*GroupV2) ToGroupV2OutputWithContext ¶ added in v3.13.0
func (i *GroupV2) ToGroupV2OutputWithContext(ctx context.Context) GroupV2Output
type GroupV2Args ¶ added in v3.13.0
type GroupV2Args struct { // Administrative up/down status for the firewall // group (must be "true" or "false" if provided - defaults to "true"). // Changing this updates the `adminStateUp` of an existing firewall group. AdminStateUp pulumi.BoolPtrInput // A description for the firewall group. Changing this // updates the `description` of an existing firewall group. Description pulumi.StringPtrInput // The egress firewall policy resource // id for the firewall group. Changing this updates the // `egressFirewallPolicyId` of an existing firewall group. EgressFirewallPolicyId pulumi.StringPtrInput // The ingress firewall policy resource // id for the firewall group. Changing this updates the // `ingressFirewallPolicyId` of an existing firewall group. IngressFirewallPolicyId pulumi.StringPtrInput // A name for the firewall group. Changing this // updates the `name` of an existing firewall. Name pulumi.StringPtrInput // Port(s) to associate this firewall group // with. Must be a list of strings. Changing this updates the associated ports // of an existing firewall group. Ports pulumi.StringArrayInput // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall group. Required if admin wants // to create a firewall group for another project. Changing this creates a new // firewall group. ProjectId pulumi.StringPtrInput // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall group. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall group. Region pulumi.StringPtrInput // or "false" if provided). If this is "true" the firewall group is visible to, // and can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall group. Only administrative users // can specify if the firewall group should be shared. Shared pulumi.BoolPtrInput // This argument conflicts and is interchangeable with // `projectId`. The owner of the firewall group. Required if admin wants to // create a firewall group for another tenant. Changing this creates a new // firewall group. TenantId pulumi.StringPtrInput }
The set of arguments for constructing a GroupV2 resource.
func (GroupV2Args) ElementType ¶ added in v3.13.0
func (GroupV2Args) ElementType() reflect.Type
type GroupV2Array ¶ added in v3.13.0
type GroupV2Array []GroupV2Input
func (GroupV2Array) ElementType ¶ added in v3.13.0
func (GroupV2Array) ElementType() reflect.Type
func (GroupV2Array) ToGroupV2ArrayOutput ¶ added in v3.13.0
func (i GroupV2Array) ToGroupV2ArrayOutput() GroupV2ArrayOutput
func (GroupV2Array) ToGroupV2ArrayOutputWithContext ¶ added in v3.13.0
func (i GroupV2Array) ToGroupV2ArrayOutputWithContext(ctx context.Context) GroupV2ArrayOutput
type GroupV2ArrayInput ¶ added in v3.13.0
type GroupV2ArrayInput interface { pulumi.Input ToGroupV2ArrayOutput() GroupV2ArrayOutput ToGroupV2ArrayOutputWithContext(context.Context) GroupV2ArrayOutput }
GroupV2ArrayInput is an input type that accepts GroupV2Array and GroupV2ArrayOutput values. You can construct a concrete instance of `GroupV2ArrayInput` via:
GroupV2Array{ GroupV2Args{...} }
type GroupV2ArrayOutput ¶ added in v3.13.0
type GroupV2ArrayOutput struct{ *pulumi.OutputState }
func (GroupV2ArrayOutput) ElementType ¶ added in v3.13.0
func (GroupV2ArrayOutput) ElementType() reflect.Type
func (GroupV2ArrayOutput) Index ¶ added in v3.13.0
func (o GroupV2ArrayOutput) Index(i pulumi.IntInput) GroupV2Output
func (GroupV2ArrayOutput) ToGroupV2ArrayOutput ¶ added in v3.13.0
func (o GroupV2ArrayOutput) ToGroupV2ArrayOutput() GroupV2ArrayOutput
func (GroupV2ArrayOutput) ToGroupV2ArrayOutputWithContext ¶ added in v3.13.0
func (o GroupV2ArrayOutput) ToGroupV2ArrayOutputWithContext(ctx context.Context) GroupV2ArrayOutput
type GroupV2Input ¶ added in v3.13.0
type GroupV2Input interface { pulumi.Input ToGroupV2Output() GroupV2Output ToGroupV2OutputWithContext(ctx context.Context) GroupV2Output }
type GroupV2Map ¶ added in v3.13.0
type GroupV2Map map[string]GroupV2Input
func (GroupV2Map) ElementType ¶ added in v3.13.0
func (GroupV2Map) ElementType() reflect.Type
func (GroupV2Map) ToGroupV2MapOutput ¶ added in v3.13.0
func (i GroupV2Map) ToGroupV2MapOutput() GroupV2MapOutput
func (GroupV2Map) ToGroupV2MapOutputWithContext ¶ added in v3.13.0
func (i GroupV2Map) ToGroupV2MapOutputWithContext(ctx context.Context) GroupV2MapOutput
type GroupV2MapInput ¶ added in v3.13.0
type GroupV2MapInput interface { pulumi.Input ToGroupV2MapOutput() GroupV2MapOutput ToGroupV2MapOutputWithContext(context.Context) GroupV2MapOutput }
GroupV2MapInput is an input type that accepts GroupV2Map and GroupV2MapOutput values. You can construct a concrete instance of `GroupV2MapInput` via:
GroupV2Map{ "key": GroupV2Args{...} }
type GroupV2MapOutput ¶ added in v3.13.0
type GroupV2MapOutput struct{ *pulumi.OutputState }
func (GroupV2MapOutput) ElementType ¶ added in v3.13.0
func (GroupV2MapOutput) ElementType() reflect.Type
func (GroupV2MapOutput) MapIndex ¶ added in v3.13.0
func (o GroupV2MapOutput) MapIndex(k pulumi.StringInput) GroupV2Output
func (GroupV2MapOutput) ToGroupV2MapOutput ¶ added in v3.13.0
func (o GroupV2MapOutput) ToGroupV2MapOutput() GroupV2MapOutput
func (GroupV2MapOutput) ToGroupV2MapOutputWithContext ¶ added in v3.13.0
func (o GroupV2MapOutput) ToGroupV2MapOutputWithContext(ctx context.Context) GroupV2MapOutput
type GroupV2Output ¶ added in v3.13.0
type GroupV2Output struct{ *pulumi.OutputState }
func (GroupV2Output) AdminStateUp ¶ added in v3.13.0
func (o GroupV2Output) AdminStateUp() pulumi.BoolPtrOutput
Administrative up/down status for the firewall group (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `adminStateUp` of an existing firewall group.
func (GroupV2Output) Description ¶ added in v3.13.0
func (o GroupV2Output) Description() pulumi.StringPtrOutput
A description for the firewall group. Changing this updates the `description` of an existing firewall group.
func (GroupV2Output) EgressFirewallPolicyId ¶ added in v3.13.0
func (o GroupV2Output) EgressFirewallPolicyId() pulumi.StringPtrOutput
The egress firewall policy resource id for the firewall group. Changing this updates the `egressFirewallPolicyId` of an existing firewall group.
func (GroupV2Output) ElementType ¶ added in v3.13.0
func (GroupV2Output) ElementType() reflect.Type
func (GroupV2Output) IngressFirewallPolicyId ¶ added in v3.13.0
func (o GroupV2Output) IngressFirewallPolicyId() pulumi.StringPtrOutput
The ingress firewall policy resource id for the firewall group. Changing this updates the `ingressFirewallPolicyId` of an existing firewall group.
func (GroupV2Output) Name ¶ added in v3.13.0
func (o GroupV2Output) Name() pulumi.StringOutput
A name for the firewall group. Changing this updates the `name` of an existing firewall.
func (GroupV2Output) Ports ¶ added in v3.13.0
func (o GroupV2Output) Ports() pulumi.StringArrayOutput
Port(s) to associate this firewall group with. Must be a list of strings. Changing this updates the associated ports of an existing firewall group.
func (GroupV2Output) ProjectId ¶ added in v3.13.0
func (o GroupV2Output) ProjectId() pulumi.StringOutput
This argument conflicts and is interchangeable with `tenantId`. The owner of the firewall group. Required if admin wants to create a firewall group for another project. Changing this creates a new firewall group.
func (GroupV2Output) Region ¶ added in v3.13.0
func (o GroupV2Output) Region() pulumi.StringOutput
The region in which to obtain the v2 networking client. A networking client is needed to create a firewall group. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall group.
func (GroupV2Output) Shared ¶ added in v3.13.0
func (o GroupV2Output) Shared() pulumi.BoolPtrOutput
Sharing status of the firewall group (must be "true" or "false" if provided). If this is "true" the firewall group is visible to, and can be used in, firewalls in other tenants. Changing this updates the `shared` status of an existing firewall group. Only administrative users can specify if the firewall group should be shared.
func (GroupV2Output) Status ¶ added in v3.13.0
func (o GroupV2Output) Status() pulumi.StringOutput
The status of the firewall group.
func (GroupV2Output) TenantId ¶ added in v3.13.0
func (o GroupV2Output) TenantId() pulumi.StringOutput
This argument conflicts and is interchangeable with `projectId`. The owner of the firewall group. Required if admin wants to create a firewall group for another tenant. Changing this creates a new firewall group.
func (GroupV2Output) ToGroupV2Output ¶ added in v3.13.0
func (o GroupV2Output) ToGroupV2Output() GroupV2Output
func (GroupV2Output) ToGroupV2OutputWithContext ¶ added in v3.13.0
func (o GroupV2Output) ToGroupV2OutputWithContext(ctx context.Context) GroupV2Output
type GroupV2State ¶ added in v3.13.0
type GroupV2State struct { // Administrative up/down status for the firewall // group (must be "true" or "false" if provided - defaults to "true"). // Changing this updates the `adminStateUp` of an existing firewall group. AdminStateUp pulumi.BoolPtrInput // A description for the firewall group. Changing this // updates the `description` of an existing firewall group. Description pulumi.StringPtrInput // The egress firewall policy resource // id for the firewall group. Changing this updates the // `egressFirewallPolicyId` of an existing firewall group. EgressFirewallPolicyId pulumi.StringPtrInput // The ingress firewall policy resource // id for the firewall group. Changing this updates the // `ingressFirewallPolicyId` of an existing firewall group. IngressFirewallPolicyId pulumi.StringPtrInput // A name for the firewall group. Changing this // updates the `name` of an existing firewall. Name pulumi.StringPtrInput // Port(s) to associate this firewall group // with. Must be a list of strings. Changing this updates the associated ports // of an existing firewall group. Ports pulumi.StringArrayInput // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall group. Required if admin wants // to create a firewall group for another project. Changing this creates a new // firewall group. ProjectId pulumi.StringPtrInput // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall group. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall group. Region pulumi.StringPtrInput // or "false" if provided). If this is "true" the firewall group is visible to, // and can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall group. Only administrative users // can specify if the firewall group should be shared. Shared pulumi.BoolPtrInput // The status of the firewall group. Status pulumi.StringPtrInput // This argument conflicts and is interchangeable with // `projectId`. The owner of the firewall group. Required if admin wants to // create a firewall group for another tenant. Changing this creates a new // firewall group. TenantId pulumi.StringPtrInput }
func (GroupV2State) ElementType ¶ added in v3.13.0
func (GroupV2State) ElementType() reflect.Type
type LookupPolicyArgs ¶
type LookupPolicyArgs struct { // The name of the firewall policy. Name *string `pulumi:"name"` // The ID of the firewall policy. PolicyId *string `pulumi:"policyId"` // The region in which to obtain the V2 Neutron client. // A Neutron client is needed to retrieve firewall policy ids. If omitted, the // `region` argument of the provider is used. Region *string `pulumi:"region"` // The owner of the firewall policy. TenantId *string `pulumi:"tenantId"` }
A collection of arguments for invoking getPolicy.
type LookupPolicyOutputArgs ¶ added in v3.5.0
type LookupPolicyOutputArgs struct { // The name of the firewall policy. Name pulumi.StringPtrInput `pulumi:"name"` // The ID of the firewall policy. PolicyId pulumi.StringPtrInput `pulumi:"policyId"` // The region in which to obtain the V2 Neutron client. // A Neutron client is needed to retrieve firewall policy ids. If omitted, the // `region` argument of the provider is used. Region pulumi.StringPtrInput `pulumi:"region"` // The owner of the firewall policy. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` }
A collection of arguments for invoking getPolicy.
func (LookupPolicyOutputArgs) ElementType ¶ added in v3.5.0
func (LookupPolicyOutputArgs) ElementType() reflect.Type
type LookupPolicyResult ¶
type LookupPolicyResult struct { // The audit status of the firewall policy. Audited bool `pulumi:"audited"` // The description of the firewall policy. Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // See Argument Reference above. Name *string `pulumi:"name"` // See Argument Reference above. PolicyId *string `pulumi:"policyId"` // See Argument Reference above. Region string `pulumi:"region"` // The array of one or more firewall rules that comprise the policy. Rules []string `pulumi:"rules"` Shared bool `pulumi:"shared"` // See Argument Reference above. TenantId string `pulumi:"tenantId"` }
A collection of values returned by getPolicy.
func LookupPolicy ¶
func LookupPolicy(ctx *pulumi.Context, args *LookupPolicyArgs, opts ...pulumi.InvokeOption) (*LookupPolicyResult, error)
Use this data source to get firewall policy information of an available OpenStack firewall policy.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := firewall.LookupPolicy(ctx, &firewall.LookupPolicyArgs{ Name: pulumi.StringRef("tf_test_policy"), }, nil) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
type LookupPolicyResultOutput ¶ added in v3.5.0
type LookupPolicyResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getPolicy.
func LookupPolicyOutput ¶ added in v3.5.0
func LookupPolicyOutput(ctx *pulumi.Context, args LookupPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupPolicyResultOutput
func (LookupPolicyResultOutput) Audited ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Audited() pulumi.BoolOutput
The audit status of the firewall policy.
func (LookupPolicyResultOutput) Description ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Description() pulumi.StringOutput
The description of the firewall policy.
func (LookupPolicyResultOutput) ElementType ¶ added in v3.5.0
func (LookupPolicyResultOutput) ElementType() reflect.Type
func (LookupPolicyResultOutput) Id ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (LookupPolicyResultOutput) Name ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Name() pulumi.StringPtrOutput
See Argument Reference above.
func (LookupPolicyResultOutput) PolicyId ¶ added in v3.5.0
func (o LookupPolicyResultOutput) PolicyId() pulumi.StringPtrOutput
See Argument Reference above.
func (LookupPolicyResultOutput) Region ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Region() pulumi.StringOutput
See Argument Reference above.
func (LookupPolicyResultOutput) Rules ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Rules() pulumi.StringArrayOutput
The array of one or more firewall rules that comprise the policy.
func (LookupPolicyResultOutput) Shared ¶ added in v3.5.0
func (o LookupPolicyResultOutput) Shared() pulumi.BoolOutput
The sharing status of the firewall policy.
func (LookupPolicyResultOutput) TenantId ¶ added in v3.5.0
func (o LookupPolicyResultOutput) TenantId() pulumi.StringOutput
See Argument Reference above.
func (LookupPolicyResultOutput) ToLookupPolicyResultOutput ¶ added in v3.5.0
func (o LookupPolicyResultOutput) ToLookupPolicyResultOutput() LookupPolicyResultOutput
func (LookupPolicyResultOutput) ToLookupPolicyResultOutputWithContext ¶ added in v3.5.0
func (o LookupPolicyResultOutput) ToLookupPolicyResultOutputWithContext(ctx context.Context) LookupPolicyResultOutput
type Policy ¶
type Policy struct { pulumi.CustomResourceState // Audit status of the firewall policy // (must be "true" or "false" if provided - defaults to "false"). // This status is set to "false" whenever the firewall policy or any of its // rules are changed. Changing this updates the `audited` status of an existing // firewall policy. Audited pulumi.BoolPtrOutput `pulumi:"audited"` // A description for the firewall policy. Changing // this updates the `description` of an existing firewall policy. Description pulumi.StringPtrOutput `pulumi:"description"` // A name for the firewall policy. Changing this // updates the `name` of an existing firewall policy. Name pulumi.StringOutput `pulumi:"name"` // The region in which to obtain the v1 networking client. // A networking client is needed to create a firewall policy. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall policy. Region pulumi.StringOutput `pulumi:"region"` // An array of one or more firewall rules that comprise // the policy. Changing this results in adding/removing rules from the // existing firewall policy. Rules pulumi.StringArrayOutput `pulumi:"rules"` // Sharing status of the firewall policy (must be "true" // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. Only administrative users // can specify if the policy should be shared. TenantId pulumi.StringOutput `pulumi:"tenantId"` // Map of additional options. ValueSpecs pulumi.MapOutput `pulumi:"valueSpecs"` }
Manages a v1 firewall policy resource within OpenStack.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { rule1, err := firewall.NewRule(ctx, "rule1", &firewall.RuleArgs{ Description: pulumi.String("drop TELNET traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("tcp"), DestinationPort: pulumi.String("23"), Enabled: pulumi.Bool(true), }) if err != nil { return err } rule2, err := firewall.NewRule(ctx, "rule2", &firewall.RuleArgs{ Description: pulumi.String("drop NTP traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("udp"), DestinationPort: pulumi.String("123"), Enabled: pulumi.Bool(false), }) if err != nil { return err } _, err = firewall.NewPolicy(ctx, "policy1", &firewall.PolicyArgs{ Rules: pulumi.StringArray{ rule1.ID(), rule2.ID(), }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Firewall Policies can be imported using the `id`, e.g.
```sh $ pulumi import openstack:firewall/policy:Policy policy_1 07f422e6-c596-474b-8b94-fe2c12506ce0 ```
func GetPolicy ¶
func GetPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PolicyState, opts ...pulumi.ResourceOption) (*Policy, error)
GetPolicy gets an existing Policy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewPolicy ¶
func NewPolicy(ctx *pulumi.Context, name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error)
NewPolicy registers a new resource with the given unique name, arguments, and options.
func (*Policy) ElementType ¶
func (*Policy) ToPolicyOutput ¶
func (i *Policy) ToPolicyOutput() PolicyOutput
func (*Policy) ToPolicyOutputWithContext ¶
func (i *Policy) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
type PolicyArgs ¶
type PolicyArgs struct { // Audit status of the firewall policy // (must be "true" or "false" if provided - defaults to "false"). // This status is set to "false" whenever the firewall policy or any of its // rules are changed. Changing this updates the `audited` status of an existing // firewall policy. Audited pulumi.BoolPtrInput // A description for the firewall policy. Changing // this updates the `description` of an existing firewall policy. Description pulumi.StringPtrInput // A name for the firewall policy. Changing this // updates the `name` of an existing firewall policy. Name pulumi.StringPtrInput // The region in which to obtain the v1 networking client. // A networking client is needed to create a firewall policy. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall policy. Region pulumi.StringPtrInput // An array of one or more firewall rules that comprise // the policy. Changing this results in adding/removing rules from the // existing firewall policy. Rules pulumi.StringArrayInput // Sharing status of the firewall policy (must be "true" // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. Only administrative users // can specify if the policy should be shared. TenantId pulumi.StringPtrInput // Map of additional options. ValueSpecs pulumi.MapInput }
The set of arguments for constructing a Policy resource.
func (PolicyArgs) ElementType ¶
func (PolicyArgs) ElementType() reflect.Type
type PolicyArray ¶
type PolicyArray []PolicyInput
func (PolicyArray) ElementType ¶
func (PolicyArray) ElementType() reflect.Type
func (PolicyArray) ToPolicyArrayOutput ¶
func (i PolicyArray) ToPolicyArrayOutput() PolicyArrayOutput
func (PolicyArray) ToPolicyArrayOutputWithContext ¶
func (i PolicyArray) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput
type PolicyArrayInput ¶
type PolicyArrayInput interface { pulumi.Input ToPolicyArrayOutput() PolicyArrayOutput ToPolicyArrayOutputWithContext(context.Context) PolicyArrayOutput }
PolicyArrayInput is an input type that accepts PolicyArray and PolicyArrayOutput values. You can construct a concrete instance of `PolicyArrayInput` via:
PolicyArray{ PolicyArgs{...} }
type PolicyArrayOutput ¶
type PolicyArrayOutput struct{ *pulumi.OutputState }
func (PolicyArrayOutput) ElementType ¶
func (PolicyArrayOutput) ElementType() reflect.Type
func (PolicyArrayOutput) Index ¶
func (o PolicyArrayOutput) Index(i pulumi.IntInput) PolicyOutput
func (PolicyArrayOutput) ToPolicyArrayOutput ¶
func (o PolicyArrayOutput) ToPolicyArrayOutput() PolicyArrayOutput
func (PolicyArrayOutput) ToPolicyArrayOutputWithContext ¶
func (o PolicyArrayOutput) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput
type PolicyInput ¶
type PolicyInput interface { pulumi.Input ToPolicyOutput() PolicyOutput ToPolicyOutputWithContext(ctx context.Context) PolicyOutput }
type PolicyMap ¶
type PolicyMap map[string]PolicyInput
func (PolicyMap) ElementType ¶
func (PolicyMap) ToPolicyMapOutput ¶
func (i PolicyMap) ToPolicyMapOutput() PolicyMapOutput
func (PolicyMap) ToPolicyMapOutputWithContext ¶
func (i PolicyMap) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput
type PolicyMapInput ¶
type PolicyMapInput interface { pulumi.Input ToPolicyMapOutput() PolicyMapOutput ToPolicyMapOutputWithContext(context.Context) PolicyMapOutput }
PolicyMapInput is an input type that accepts PolicyMap and PolicyMapOutput values. You can construct a concrete instance of `PolicyMapInput` via:
PolicyMap{ "key": PolicyArgs{...} }
type PolicyMapOutput ¶
type PolicyMapOutput struct{ *pulumi.OutputState }
func (PolicyMapOutput) ElementType ¶
func (PolicyMapOutput) ElementType() reflect.Type
func (PolicyMapOutput) MapIndex ¶
func (o PolicyMapOutput) MapIndex(k pulumi.StringInput) PolicyOutput
func (PolicyMapOutput) ToPolicyMapOutput ¶
func (o PolicyMapOutput) ToPolicyMapOutput() PolicyMapOutput
func (PolicyMapOutput) ToPolicyMapOutputWithContext ¶
func (o PolicyMapOutput) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput
type PolicyOutput ¶
type PolicyOutput struct{ *pulumi.OutputState }
func (PolicyOutput) Audited ¶ added in v3.9.0
func (o PolicyOutput) Audited() pulumi.BoolPtrOutput
Audit status of the firewall policy (must be "true" or "false" if provided - defaults to "false"). This status is set to "false" whenever the firewall policy or any of its rules are changed. Changing this updates the `audited` status of an existing firewall policy.
func (PolicyOutput) Description ¶ added in v3.9.0
func (o PolicyOutput) Description() pulumi.StringPtrOutput
A description for the firewall policy. Changing this updates the `description` of an existing firewall policy.
func (PolicyOutput) ElementType ¶
func (PolicyOutput) ElementType() reflect.Type
func (PolicyOutput) Name ¶ added in v3.9.0
func (o PolicyOutput) Name() pulumi.StringOutput
A name for the firewall policy. Changing this updates the `name` of an existing firewall policy.
func (PolicyOutput) Region ¶ added in v3.9.0
func (o PolicyOutput) Region() pulumi.StringOutput
The region in which to obtain the v1 networking client. A networking client is needed to create a firewall policy. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall policy.
func (PolicyOutput) Rules ¶ added in v3.9.0
func (o PolicyOutput) Rules() pulumi.StringArrayOutput
An array of one or more firewall rules that comprise the policy. Changing this results in adding/removing rules from the existing firewall policy.
func (PolicyOutput) Shared ¶ added in v3.9.0
func (o PolicyOutput) Shared() pulumi.BoolPtrOutput
Sharing status of the firewall policy (must be "true" or "false" if provided). If this is "true" the policy is visible to, and can be used in, firewalls in other tenants. Changing this updates the `shared` status of an existing firewall policy. Only administrative users can specify if the policy should be shared.
func (PolicyOutput) TenantId ¶ added in v3.9.0
func (o PolicyOutput) TenantId() pulumi.StringOutput
func (PolicyOutput) ToPolicyOutput ¶
func (o PolicyOutput) ToPolicyOutput() PolicyOutput
func (PolicyOutput) ToPolicyOutputWithContext ¶
func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
func (PolicyOutput) ValueSpecs ¶ added in v3.9.0
func (o PolicyOutput) ValueSpecs() pulumi.MapOutput
Map of additional options.
type PolicyState ¶
type PolicyState struct { // Audit status of the firewall policy // (must be "true" or "false" if provided - defaults to "false"). // This status is set to "false" whenever the firewall policy or any of its // rules are changed. Changing this updates the `audited` status of an existing // firewall policy. Audited pulumi.BoolPtrInput // A description for the firewall policy. Changing // this updates the `description` of an existing firewall policy. Description pulumi.StringPtrInput // A name for the firewall policy. Changing this // updates the `name` of an existing firewall policy. Name pulumi.StringPtrInput // The region in which to obtain the v1 networking client. // A networking client is needed to create a firewall policy. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall policy. Region pulumi.StringPtrInput // An array of one or more firewall rules that comprise // the policy. Changing this results in adding/removing rules from the // existing firewall policy. Rules pulumi.StringArrayInput // Sharing status of the firewall policy (must be "true" // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. Only administrative users // can specify if the policy should be shared. TenantId pulumi.StringPtrInput // Map of additional options. ValueSpecs pulumi.MapInput }
func (PolicyState) ElementType ¶
func (PolicyState) ElementType() reflect.Type
type PolicyV2 ¶ added in v3.13.0
type PolicyV2 struct { pulumi.CustomResourceState // Audit status of the firewall policy // (must be "true" or "false" if provided - defaults to "false"). // This status is set to "false" whenever the firewall policy or any of its // rules are changed. Changing this updates the `audited` status of an existing // firewall policy. Audited pulumi.BoolPtrOutput `pulumi:"audited"` // A description for the firewall policy. Changing // this updates the `description` of an existing firewall policy. Description pulumi.StringPtrOutput `pulumi:"description"` // A name for the firewall policy. Changing this // updates the `name` of an existing firewall policy. Name pulumi.StringOutput `pulumi:"name"` // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall policy. Required if admin wants // to create a firewall policy for another project. Changing this creates a new // firewall policy. ProjectId pulumi.StringOutput `pulumi:"projectId"` // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall policy. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall policy. Region pulumi.StringOutput `pulumi:"region"` // An array of one or more firewall rules that comprise // the policy. Changing this results in adding/removing rules from the // existing firewall policy. Rules pulumi.StringArrayOutput `pulumi:"rules"` // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. Only administrative users // can specify if the policy should be shared. Shared pulumi.BoolPtrOutput `pulumi:"shared"` // This argument conflicts and is interchangeable // with `projectId`. The owner of the firewall policy. Required if admin wants // to create a firewall policy for another tenant. Changing this creates a new // firewall policy. TenantId pulumi.StringOutput `pulumi:"tenantId"` }
Manages a v2 firewall policy resource within OpenStack.
> **Note:** Firewall v2 has no support for OVN currently.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { rule1, err := firewall.NewRuleV2(ctx, "rule1", &firewall.RuleV2Args{ Description: pulumi.String("drop TELNET traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("tcp"), DestinationPort: pulumi.String("23"), Enabled: pulumi.Bool(true), }) if err != nil { return err } rule2, err := firewall.NewRuleV2(ctx, "rule2", &firewall.RuleV2Args{ Description: pulumi.String("drop NTP traffic"), Action: pulumi.String("deny"), Protocol: pulumi.String("udp"), DestinationPort: pulumi.String("123"), Enabled: pulumi.Bool(false), }) if err != nil { return err } _, err = firewall.NewPolicyV2(ctx, "policy1", &firewall.PolicyV2Args{ Rules: pulumi.StringArray{ rule1.ID(), rule2.ID(), }, }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Firewall Policies can be imported using the `id`, e.g.
```sh $ pulumi import openstack:firewall/policyV2:PolicyV2 policy_1 07f422e6-c596-474b-8b94-fe2c12506ce0 ```
func GetPolicyV2 ¶ added in v3.13.0
func GetPolicyV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PolicyV2State, opts ...pulumi.ResourceOption) (*PolicyV2, error)
GetPolicyV2 gets an existing PolicyV2 resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewPolicyV2 ¶ added in v3.13.0
func NewPolicyV2(ctx *pulumi.Context, name string, args *PolicyV2Args, opts ...pulumi.ResourceOption) (*PolicyV2, error)
NewPolicyV2 registers a new resource with the given unique name, arguments, and options.
func (*PolicyV2) ElementType ¶ added in v3.13.0
func (*PolicyV2) ToPolicyV2Output ¶ added in v3.13.0
func (i *PolicyV2) ToPolicyV2Output() PolicyV2Output
func (*PolicyV2) ToPolicyV2OutputWithContext ¶ added in v3.13.0
func (i *PolicyV2) ToPolicyV2OutputWithContext(ctx context.Context) PolicyV2Output
type PolicyV2Args ¶ added in v3.13.0
type PolicyV2Args struct { // Audit status of the firewall policy // (must be "true" or "false" if provided - defaults to "false"). // This status is set to "false" whenever the firewall policy or any of its // rules are changed. Changing this updates the `audited` status of an existing // firewall policy. Audited pulumi.BoolPtrInput // A description for the firewall policy. Changing // this updates the `description` of an existing firewall policy. Description pulumi.StringPtrInput // A name for the firewall policy. Changing this // updates the `name` of an existing firewall policy. Name pulumi.StringPtrInput // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall policy. Required if admin wants // to create a firewall policy for another project. Changing this creates a new // firewall policy. ProjectId pulumi.StringPtrInput // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall policy. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall policy. Region pulumi.StringPtrInput // An array of one or more firewall rules that comprise // the policy. Changing this results in adding/removing rules from the // existing firewall policy. Rules pulumi.StringArrayInput // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. Only administrative users // can specify if the policy should be shared. Shared pulumi.BoolPtrInput // This argument conflicts and is interchangeable // with `projectId`. The owner of the firewall policy. Required if admin wants // to create a firewall policy for another tenant. Changing this creates a new // firewall policy. TenantId pulumi.StringPtrInput }
The set of arguments for constructing a PolicyV2 resource.
func (PolicyV2Args) ElementType ¶ added in v3.13.0
func (PolicyV2Args) ElementType() reflect.Type
type PolicyV2Array ¶ added in v3.13.0
type PolicyV2Array []PolicyV2Input
func (PolicyV2Array) ElementType ¶ added in v3.13.0
func (PolicyV2Array) ElementType() reflect.Type
func (PolicyV2Array) ToPolicyV2ArrayOutput ¶ added in v3.13.0
func (i PolicyV2Array) ToPolicyV2ArrayOutput() PolicyV2ArrayOutput
func (PolicyV2Array) ToPolicyV2ArrayOutputWithContext ¶ added in v3.13.0
func (i PolicyV2Array) ToPolicyV2ArrayOutputWithContext(ctx context.Context) PolicyV2ArrayOutput
type PolicyV2ArrayInput ¶ added in v3.13.0
type PolicyV2ArrayInput interface { pulumi.Input ToPolicyV2ArrayOutput() PolicyV2ArrayOutput ToPolicyV2ArrayOutputWithContext(context.Context) PolicyV2ArrayOutput }
PolicyV2ArrayInput is an input type that accepts PolicyV2Array and PolicyV2ArrayOutput values. You can construct a concrete instance of `PolicyV2ArrayInput` via:
PolicyV2Array{ PolicyV2Args{...} }
type PolicyV2ArrayOutput ¶ added in v3.13.0
type PolicyV2ArrayOutput struct{ *pulumi.OutputState }
func (PolicyV2ArrayOutput) ElementType ¶ added in v3.13.0
func (PolicyV2ArrayOutput) ElementType() reflect.Type
func (PolicyV2ArrayOutput) Index ¶ added in v3.13.0
func (o PolicyV2ArrayOutput) Index(i pulumi.IntInput) PolicyV2Output
func (PolicyV2ArrayOutput) ToPolicyV2ArrayOutput ¶ added in v3.13.0
func (o PolicyV2ArrayOutput) ToPolicyV2ArrayOutput() PolicyV2ArrayOutput
func (PolicyV2ArrayOutput) ToPolicyV2ArrayOutputWithContext ¶ added in v3.13.0
func (o PolicyV2ArrayOutput) ToPolicyV2ArrayOutputWithContext(ctx context.Context) PolicyV2ArrayOutput
type PolicyV2Input ¶ added in v3.13.0
type PolicyV2Input interface { pulumi.Input ToPolicyV2Output() PolicyV2Output ToPolicyV2OutputWithContext(ctx context.Context) PolicyV2Output }
type PolicyV2Map ¶ added in v3.13.0
type PolicyV2Map map[string]PolicyV2Input
func (PolicyV2Map) ElementType ¶ added in v3.13.0
func (PolicyV2Map) ElementType() reflect.Type
func (PolicyV2Map) ToPolicyV2MapOutput ¶ added in v3.13.0
func (i PolicyV2Map) ToPolicyV2MapOutput() PolicyV2MapOutput
func (PolicyV2Map) ToPolicyV2MapOutputWithContext ¶ added in v3.13.0
func (i PolicyV2Map) ToPolicyV2MapOutputWithContext(ctx context.Context) PolicyV2MapOutput
type PolicyV2MapInput ¶ added in v3.13.0
type PolicyV2MapInput interface { pulumi.Input ToPolicyV2MapOutput() PolicyV2MapOutput ToPolicyV2MapOutputWithContext(context.Context) PolicyV2MapOutput }
PolicyV2MapInput is an input type that accepts PolicyV2Map and PolicyV2MapOutput values. You can construct a concrete instance of `PolicyV2MapInput` via:
PolicyV2Map{ "key": PolicyV2Args{...} }
type PolicyV2MapOutput ¶ added in v3.13.0
type PolicyV2MapOutput struct{ *pulumi.OutputState }
func (PolicyV2MapOutput) ElementType ¶ added in v3.13.0
func (PolicyV2MapOutput) ElementType() reflect.Type
func (PolicyV2MapOutput) MapIndex ¶ added in v3.13.0
func (o PolicyV2MapOutput) MapIndex(k pulumi.StringInput) PolicyV2Output
func (PolicyV2MapOutput) ToPolicyV2MapOutput ¶ added in v3.13.0
func (o PolicyV2MapOutput) ToPolicyV2MapOutput() PolicyV2MapOutput
func (PolicyV2MapOutput) ToPolicyV2MapOutputWithContext ¶ added in v3.13.0
func (o PolicyV2MapOutput) ToPolicyV2MapOutputWithContext(ctx context.Context) PolicyV2MapOutput
type PolicyV2Output ¶ added in v3.13.0
type PolicyV2Output struct{ *pulumi.OutputState }
func (PolicyV2Output) Audited ¶ added in v3.13.0
func (o PolicyV2Output) Audited() pulumi.BoolPtrOutput
Audit status of the firewall policy (must be "true" or "false" if provided - defaults to "false"). This status is set to "false" whenever the firewall policy or any of its rules are changed. Changing this updates the `audited` status of an existing firewall policy.
func (PolicyV2Output) Description ¶ added in v3.13.0
func (o PolicyV2Output) Description() pulumi.StringPtrOutput
A description for the firewall policy. Changing this updates the `description` of an existing firewall policy.
func (PolicyV2Output) ElementType ¶ added in v3.13.0
func (PolicyV2Output) ElementType() reflect.Type
func (PolicyV2Output) Name ¶ added in v3.13.0
func (o PolicyV2Output) Name() pulumi.StringOutput
A name for the firewall policy. Changing this updates the `name` of an existing firewall policy.
func (PolicyV2Output) ProjectId ¶ added in v3.14.0
func (o PolicyV2Output) ProjectId() pulumi.StringOutput
This argument conflicts and is interchangeable with `tenantId`. The owner of the firewall policy. Required if admin wants to create a firewall policy for another project. Changing this creates a new firewall policy.
func (PolicyV2Output) Region ¶ added in v3.13.0
func (o PolicyV2Output) Region() pulumi.StringOutput
The region in which to obtain the v2 networking client. A networking client is needed to create a firewall policy. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall policy.
func (PolicyV2Output) Rules ¶ added in v3.13.0
func (o PolicyV2Output) Rules() pulumi.StringArrayOutput
An array of one or more firewall rules that comprise the policy. Changing this results in adding/removing rules from the existing firewall policy.
func (PolicyV2Output) Shared ¶ added in v3.13.0
func (o PolicyV2Output) Shared() pulumi.BoolPtrOutput
Sharing status of the firewall policy (must be "true" or "false" if provided). If this is "true" the policy is visible to, and can be used in, firewalls in other tenants. Changing this updates the `shared` status of an existing firewall policy. Only administrative users can specify if the policy should be shared.
func (PolicyV2Output) TenantId ¶ added in v3.13.0
func (o PolicyV2Output) TenantId() pulumi.StringOutput
This argument conflicts and is interchangeable with `projectId`. The owner of the firewall policy. Required if admin wants to create a firewall policy for another tenant. Changing this creates a new firewall policy.
func (PolicyV2Output) ToPolicyV2Output ¶ added in v3.13.0
func (o PolicyV2Output) ToPolicyV2Output() PolicyV2Output
func (PolicyV2Output) ToPolicyV2OutputWithContext ¶ added in v3.13.0
func (o PolicyV2Output) ToPolicyV2OutputWithContext(ctx context.Context) PolicyV2Output
type PolicyV2State ¶ added in v3.13.0
type PolicyV2State struct { // Audit status of the firewall policy // (must be "true" or "false" if provided - defaults to "false"). // This status is set to "false" whenever the firewall policy or any of its // rules are changed. Changing this updates the `audited` status of an existing // firewall policy. Audited pulumi.BoolPtrInput // A description for the firewall policy. Changing // this updates the `description` of an existing firewall policy. Description pulumi.StringPtrInput // A name for the firewall policy. Changing this // updates the `name` of an existing firewall policy. Name pulumi.StringPtrInput // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall policy. Required if admin wants // to create a firewall policy for another project. Changing this creates a new // firewall policy. ProjectId pulumi.StringPtrInput // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall policy. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall policy. Region pulumi.StringPtrInput // An array of one or more firewall rules that comprise // the policy. Changing this results in adding/removing rules from the // existing firewall policy. Rules pulumi.StringArrayInput // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. Only administrative users // can specify if the policy should be shared. Shared pulumi.BoolPtrInput // This argument conflicts and is interchangeable // with `projectId`. The owner of the firewall policy. Required if admin wants // to create a firewall policy for another tenant. Changing this creates a new // firewall policy. TenantId pulumi.StringPtrInput }
func (PolicyV2State) ElementType ¶ added in v3.13.0
func (PolicyV2State) ElementType() reflect.Type
type Rule ¶
type Rule struct { pulumi.CustomResourceState // Action to be taken ( must be "allow" or "deny") when the // firewall rule matches. Changing this updates the `action` of an existing // firewall rule. Action pulumi.StringOutput `pulumi:"action"` // A description for the firewall rule. Changing this // updates the `description` of an existing firewall rule. Description pulumi.StringPtrOutput `pulumi:"description"` // The destination IP address on which the // firewall rule operates. Changing this updates the `destinationIpAddress` // of an existing firewall rule. DestinationIpAddress pulumi.StringPtrOutput `pulumi:"destinationIpAddress"` // The destination port on which the firewall // rule operates. Changing this updates the `destinationPort` of an existing // firewall rule. DestinationPort pulumi.StringPtrOutput `pulumi:"destinationPort"` // Enabled status for the firewall rule (must be "true" // or "false" if provided - defaults to "true"). Changing this updates the // `enabled` status of an existing firewall rule. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // IP version, either 4 (default) or 6. Changing this // updates the `ipVersion` of an existing firewall rule. IpVersion pulumi.IntPtrOutput `pulumi:"ipVersion"` // A unique name for the firewall rule. Changing this // updates the `name` of an existing firewall rule. Name pulumi.StringOutput `pulumi:"name"` // The protocol type on which the firewall rule operates. // Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the // `protocol` of an existing firewall rule. Protocol pulumi.StringOutput `pulumi:"protocol"` // The region in which to obtain the v1 Compute client. // A Compute client is needed to create a firewall rule. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall rule. Region pulumi.StringOutput `pulumi:"region"` // The source IP address on which the firewall // rule operates. Changing this updates the `sourceIpAddress` of an existing // firewall rule. SourceIpAddress pulumi.StringPtrOutput `pulumi:"sourceIpAddress"` // The source port on which the firewall // rule operates. Changing this updates the `sourcePort` of an existing // firewall rule. SourcePort pulumi.StringPtrOutput `pulumi:"sourcePort"` // The owner of the firewall rule. Required if admin // wants to create a firewall rule for another tenant. Changing this creates a // new firewall rule. TenantId pulumi.StringPtrOutput `pulumi:"tenantId"` // Map of additional options. ValueSpecs pulumi.MapOutput `pulumi:"valueSpecs"` }
Manages a v1 firewall rule resource within OpenStack.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := firewall.NewRule(ctx, "rule1", &firewall.RuleArgs{ Action: pulumi.String("deny"), Description: pulumi.String("drop TELNET traffic"), DestinationPort: pulumi.String("23"), Enabled: pulumi.Bool(true), Protocol: pulumi.String("tcp"), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Firewall Rules can be imported using the `id`, e.g.
```sh $ pulumi import openstack:firewall/rule:Rule rule_1 8dbc0c28-e49c-463f-b712-5c5d1bbac327 ```
func GetRule ¶
func GetRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RuleState, opts ...pulumi.ResourceOption) (*Rule, error)
GetRule gets an existing Rule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRule ¶
func NewRule(ctx *pulumi.Context, name string, args *RuleArgs, opts ...pulumi.ResourceOption) (*Rule, error)
NewRule registers a new resource with the given unique name, arguments, and options.
func (*Rule) ElementType ¶
func (*Rule) ToRuleOutput ¶
func (i *Rule) ToRuleOutput() RuleOutput
func (*Rule) ToRuleOutputWithContext ¶
func (i *Rule) ToRuleOutputWithContext(ctx context.Context) RuleOutput
type RuleArgs ¶
type RuleArgs struct { // Action to be taken ( must be "allow" or "deny") when the // firewall rule matches. Changing this updates the `action` of an existing // firewall rule. Action pulumi.StringInput // A description for the firewall rule. Changing this // updates the `description` of an existing firewall rule. Description pulumi.StringPtrInput // The destination IP address on which the // firewall rule operates. Changing this updates the `destinationIpAddress` // of an existing firewall rule. DestinationIpAddress pulumi.StringPtrInput // The destination port on which the firewall // rule operates. Changing this updates the `destinationPort` of an existing // firewall rule. DestinationPort pulumi.StringPtrInput // Enabled status for the firewall rule (must be "true" // or "false" if provided - defaults to "true"). Changing this updates the // `enabled` status of an existing firewall rule. Enabled pulumi.BoolPtrInput // IP version, either 4 (default) or 6. Changing this // updates the `ipVersion` of an existing firewall rule. IpVersion pulumi.IntPtrInput // A unique name for the firewall rule. Changing this // updates the `name` of an existing firewall rule. Name pulumi.StringPtrInput // The protocol type on which the firewall rule operates. // Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the // `protocol` of an existing firewall rule. Protocol pulumi.StringInput // The region in which to obtain the v1 Compute client. // A Compute client is needed to create a firewall rule. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall rule. Region pulumi.StringPtrInput // The source IP address on which the firewall // rule operates. Changing this updates the `sourceIpAddress` of an existing // firewall rule. SourceIpAddress pulumi.StringPtrInput // The source port on which the firewall // rule operates. Changing this updates the `sourcePort` of an existing // firewall rule. SourcePort pulumi.StringPtrInput // The owner of the firewall rule. Required if admin // wants to create a firewall rule for another tenant. Changing this creates a // new firewall rule. TenantId pulumi.StringPtrInput // Map of additional options. ValueSpecs pulumi.MapInput }
The set of arguments for constructing a Rule resource.
func (RuleArgs) ElementType ¶
type RuleArray ¶
type RuleArray []RuleInput
func (RuleArray) ElementType ¶
func (RuleArray) ToRuleArrayOutput ¶
func (i RuleArray) ToRuleArrayOutput() RuleArrayOutput
func (RuleArray) ToRuleArrayOutputWithContext ¶
func (i RuleArray) ToRuleArrayOutputWithContext(ctx context.Context) RuleArrayOutput
type RuleArrayInput ¶
type RuleArrayInput interface { pulumi.Input ToRuleArrayOutput() RuleArrayOutput ToRuleArrayOutputWithContext(context.Context) RuleArrayOutput }
RuleArrayInput is an input type that accepts RuleArray and RuleArrayOutput values. You can construct a concrete instance of `RuleArrayInput` via:
RuleArray{ RuleArgs{...} }
type RuleArrayOutput ¶
type RuleArrayOutput struct{ *pulumi.OutputState }
func (RuleArrayOutput) ElementType ¶
func (RuleArrayOutput) ElementType() reflect.Type
func (RuleArrayOutput) Index ¶
func (o RuleArrayOutput) Index(i pulumi.IntInput) RuleOutput
func (RuleArrayOutput) ToRuleArrayOutput ¶
func (o RuleArrayOutput) ToRuleArrayOutput() RuleArrayOutput
func (RuleArrayOutput) ToRuleArrayOutputWithContext ¶
func (o RuleArrayOutput) ToRuleArrayOutputWithContext(ctx context.Context) RuleArrayOutput
type RuleInput ¶
type RuleInput interface { pulumi.Input ToRuleOutput() RuleOutput ToRuleOutputWithContext(ctx context.Context) RuleOutput }
type RuleMap ¶
func (RuleMap) ElementType ¶
func (RuleMap) ToRuleMapOutput ¶
func (i RuleMap) ToRuleMapOutput() RuleMapOutput
func (RuleMap) ToRuleMapOutputWithContext ¶
func (i RuleMap) ToRuleMapOutputWithContext(ctx context.Context) RuleMapOutput
type RuleMapInput ¶
type RuleMapInput interface { pulumi.Input ToRuleMapOutput() RuleMapOutput ToRuleMapOutputWithContext(context.Context) RuleMapOutput }
RuleMapInput is an input type that accepts RuleMap and RuleMapOutput values. You can construct a concrete instance of `RuleMapInput` via:
RuleMap{ "key": RuleArgs{...} }
type RuleMapOutput ¶
type RuleMapOutput struct{ *pulumi.OutputState }
func (RuleMapOutput) ElementType ¶
func (RuleMapOutput) ElementType() reflect.Type
func (RuleMapOutput) MapIndex ¶
func (o RuleMapOutput) MapIndex(k pulumi.StringInput) RuleOutput
func (RuleMapOutput) ToRuleMapOutput ¶
func (o RuleMapOutput) ToRuleMapOutput() RuleMapOutput
func (RuleMapOutput) ToRuleMapOutputWithContext ¶
func (o RuleMapOutput) ToRuleMapOutputWithContext(ctx context.Context) RuleMapOutput
type RuleOutput ¶
type RuleOutput struct{ *pulumi.OutputState }
func (RuleOutput) Action ¶ added in v3.9.0
func (o RuleOutput) Action() pulumi.StringOutput
Action to be taken ( must be "allow" or "deny") when the firewall rule matches. Changing this updates the `action` of an existing firewall rule.
func (RuleOutput) Description ¶ added in v3.9.0
func (o RuleOutput) Description() pulumi.StringPtrOutput
A description for the firewall rule. Changing this updates the `description` of an existing firewall rule.
func (RuleOutput) DestinationIpAddress ¶ added in v3.9.0
func (o RuleOutput) DestinationIpAddress() pulumi.StringPtrOutput
The destination IP address on which the firewall rule operates. Changing this updates the `destinationIpAddress` of an existing firewall rule.
func (RuleOutput) DestinationPort ¶ added in v3.9.0
func (o RuleOutput) DestinationPort() pulumi.StringPtrOutput
The destination port on which the firewall rule operates. Changing this updates the `destinationPort` of an existing firewall rule.
func (RuleOutput) ElementType ¶
func (RuleOutput) ElementType() reflect.Type
func (RuleOutput) Enabled ¶ added in v3.9.0
func (o RuleOutput) Enabled() pulumi.BoolPtrOutput
Enabled status for the firewall rule (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `enabled` status of an existing firewall rule.
func (RuleOutput) IpVersion ¶ added in v3.9.0
func (o RuleOutput) IpVersion() pulumi.IntPtrOutput
IP version, either 4 (default) or 6. Changing this updates the `ipVersion` of an existing firewall rule.
func (RuleOutput) Name ¶ added in v3.9.0
func (o RuleOutput) Name() pulumi.StringOutput
A unique name for the firewall rule. Changing this updates the `name` of an existing firewall rule.
func (RuleOutput) Protocol ¶ added in v3.9.0
func (o RuleOutput) Protocol() pulumi.StringOutput
The protocol type on which the firewall rule operates. Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the `protocol` of an existing firewall rule.
func (RuleOutput) Region ¶ added in v3.9.0
func (o RuleOutput) Region() pulumi.StringOutput
The region in which to obtain the v1 Compute client. A Compute client is needed to create a firewall rule. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall rule.
func (RuleOutput) SourceIpAddress ¶ added in v3.9.0
func (o RuleOutput) SourceIpAddress() pulumi.StringPtrOutput
The source IP address on which the firewall rule operates. Changing this updates the `sourceIpAddress` of an existing firewall rule.
func (RuleOutput) SourcePort ¶ added in v3.9.0
func (o RuleOutput) SourcePort() pulumi.StringPtrOutput
The source port on which the firewall rule operates. Changing this updates the `sourcePort` of an existing firewall rule.
func (RuleOutput) TenantId ¶ added in v3.9.0
func (o RuleOutput) TenantId() pulumi.StringPtrOutput
The owner of the firewall rule. Required if admin wants to create a firewall rule for another tenant. Changing this creates a new firewall rule.
func (RuleOutput) ToRuleOutput ¶
func (o RuleOutput) ToRuleOutput() RuleOutput
func (RuleOutput) ToRuleOutputWithContext ¶
func (o RuleOutput) ToRuleOutputWithContext(ctx context.Context) RuleOutput
func (RuleOutput) ValueSpecs ¶ added in v3.9.0
func (o RuleOutput) ValueSpecs() pulumi.MapOutput
Map of additional options.
type RuleState ¶
type RuleState struct { // Action to be taken ( must be "allow" or "deny") when the // firewall rule matches. Changing this updates the `action` of an existing // firewall rule. Action pulumi.StringPtrInput // A description for the firewall rule. Changing this // updates the `description` of an existing firewall rule. Description pulumi.StringPtrInput // The destination IP address on which the // firewall rule operates. Changing this updates the `destinationIpAddress` // of an existing firewall rule. DestinationIpAddress pulumi.StringPtrInput // The destination port on which the firewall // rule operates. Changing this updates the `destinationPort` of an existing // firewall rule. DestinationPort pulumi.StringPtrInput // Enabled status for the firewall rule (must be "true" // or "false" if provided - defaults to "true"). Changing this updates the // `enabled` status of an existing firewall rule. Enabled pulumi.BoolPtrInput // IP version, either 4 (default) or 6. Changing this // updates the `ipVersion` of an existing firewall rule. IpVersion pulumi.IntPtrInput // A unique name for the firewall rule. Changing this // updates the `name` of an existing firewall rule. Name pulumi.StringPtrInput // The protocol type on which the firewall rule operates. // Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the // `protocol` of an existing firewall rule. Protocol pulumi.StringPtrInput // The region in which to obtain the v1 Compute client. // A Compute client is needed to create a firewall rule. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall rule. Region pulumi.StringPtrInput // The source IP address on which the firewall // rule operates. Changing this updates the `sourceIpAddress` of an existing // firewall rule. SourceIpAddress pulumi.StringPtrInput // The source port on which the firewall // rule operates. Changing this updates the `sourcePort` of an existing // firewall rule. SourcePort pulumi.StringPtrInput // The owner of the firewall rule. Required if admin // wants to create a firewall rule for another tenant. Changing this creates a // new firewall rule. TenantId pulumi.StringPtrInput // Map of additional options. ValueSpecs pulumi.MapInput }
func (RuleState) ElementType ¶
type RuleV2 ¶ added in v3.13.0
type RuleV2 struct { pulumi.CustomResourceState // Action to be taken (must be "allow", "deny" or "reject") // when the firewall rule matches. Changing this updates the `action` of an // existing firewall rule. Default is `deny`. Action pulumi.StringPtrOutput `pulumi:"action"` // A description for the firewall rule. Changing this // updates the `description` of an existing firewall rule. Description pulumi.StringPtrOutput `pulumi:"description"` // The destination IP address on which the // firewall rule operates. Changing this updates the `destinationIpAddress` // of an existing firewall rule. DestinationIpAddress pulumi.StringPtrOutput `pulumi:"destinationIpAddress"` // The destination port on which the firewall // rule operates. Changing this updates the `destinationPort` of an existing // firewall rule. Require not `any` or empty protocol. DestinationPort pulumi.StringPtrOutput `pulumi:"destinationPort"` // Enabled status for the firewall rule (must be "true" // or "false" if provided - defaults to "true"). Changing this updates the // `enabled` status of an existing firewall rule. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // IP version, either 4 or 6. Changing this // updates the `ipVersion` of an existing firewall rule. Default is `4`. IpVersion pulumi.IntPtrOutput `pulumi:"ipVersion"` // A unique name for the firewall rule. Changing this // updates the `name` of an existing firewall rule. Name pulumi.StringOutput `pulumi:"name"` // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall rule. Required if admin wants // to create a firewall rule for another project. Changing this creates a new // firewall rule. ProjectId pulumi.StringOutput `pulumi:"projectId"` // (Optional; Required if `sourcePort` or `destinationPort` is not // empty) The protocol type on which the firewall rule operates. // Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the // `protocol` of an existing firewall rule. Default is `any`. Protocol pulumi.StringPtrOutput `pulumi:"protocol"` // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall rule. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall rule. Region pulumi.StringOutput `pulumi:"region"` // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. On Shared pulumi.BoolPtrOutput `pulumi:"shared"` // The source IP address on which the firewall // rule operates. Changing this updates the `sourceIpAddress` of an existing // firewall rule. SourceIpAddress pulumi.StringPtrOutput `pulumi:"sourceIpAddress"` // The source port on which the firewall // rule operates. Changing this updates the `sourcePort` of an existing // firewall rule. Require not `any` or empty protocol. SourcePort pulumi.StringPtrOutput `pulumi:"sourcePort"` // This argument conflicts and is interchangeable // with `projectId`. The owner of the firewall rule. Required if admin wants // to create a firewall rule for another tenant. Changing this creates a new // firewall rule. TenantId pulumi.StringOutput `pulumi:"tenantId"` }
Manages a v2 firewall rule resource within OpenStack.
> **Note:** Firewall v2 has no support for OVN currently.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := firewall.NewRuleV2(ctx, "rule2", &firewall.RuleV2Args{ Action: pulumi.String("deny"), Description: pulumi.String("drop TELNET traffic"), DestinationPort: pulumi.String("23"), Enabled: pulumi.Bool(true), Protocol: pulumi.String("tcp"), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
## Import
Firewall Rules can be imported using the `id`, e.g.
```sh $ pulumi import openstack:firewall/ruleV2:RuleV2 rule_1 8dbc0c28-e49c-463f-b712-5c5d1bbac327 ```
func GetRuleV2 ¶ added in v3.13.0
func GetRuleV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RuleV2State, opts ...pulumi.ResourceOption) (*RuleV2, error)
GetRuleV2 gets an existing RuleV2 resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRuleV2 ¶ added in v3.13.0
func NewRuleV2(ctx *pulumi.Context, name string, args *RuleV2Args, opts ...pulumi.ResourceOption) (*RuleV2, error)
NewRuleV2 registers a new resource with the given unique name, arguments, and options.
func (*RuleV2) ElementType ¶ added in v3.13.0
func (*RuleV2) ToRuleV2Output ¶ added in v3.13.0
func (i *RuleV2) ToRuleV2Output() RuleV2Output
func (*RuleV2) ToRuleV2OutputWithContext ¶ added in v3.13.0
func (i *RuleV2) ToRuleV2OutputWithContext(ctx context.Context) RuleV2Output
type RuleV2Args ¶ added in v3.13.0
type RuleV2Args struct { // Action to be taken (must be "allow", "deny" or "reject") // when the firewall rule matches. Changing this updates the `action` of an // existing firewall rule. Default is `deny`. Action pulumi.StringPtrInput // A description for the firewall rule. Changing this // updates the `description` of an existing firewall rule. Description pulumi.StringPtrInput // The destination IP address on which the // firewall rule operates. Changing this updates the `destinationIpAddress` // of an existing firewall rule. DestinationIpAddress pulumi.StringPtrInput // The destination port on which the firewall // rule operates. Changing this updates the `destinationPort` of an existing // firewall rule. Require not `any` or empty protocol. DestinationPort pulumi.StringPtrInput // Enabled status for the firewall rule (must be "true" // or "false" if provided - defaults to "true"). Changing this updates the // `enabled` status of an existing firewall rule. Enabled pulumi.BoolPtrInput // IP version, either 4 or 6. Changing this // updates the `ipVersion` of an existing firewall rule. Default is `4`. IpVersion pulumi.IntPtrInput // A unique name for the firewall rule. Changing this // updates the `name` of an existing firewall rule. Name pulumi.StringPtrInput // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall rule. Required if admin wants // to create a firewall rule for another project. Changing this creates a new // firewall rule. ProjectId pulumi.StringPtrInput // (Optional; Required if `sourcePort` or `destinationPort` is not // empty) The protocol type on which the firewall rule operates. // Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the // `protocol` of an existing firewall rule. Default is `any`. Protocol pulumi.StringPtrInput // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall rule. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall rule. Region pulumi.StringPtrInput // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. On Shared pulumi.BoolPtrInput // The source IP address on which the firewall // rule operates. Changing this updates the `sourceIpAddress` of an existing // firewall rule. SourceIpAddress pulumi.StringPtrInput // The source port on which the firewall // rule operates. Changing this updates the `sourcePort` of an existing // firewall rule. Require not `any` or empty protocol. SourcePort pulumi.StringPtrInput // This argument conflicts and is interchangeable // with `projectId`. The owner of the firewall rule. Required if admin wants // to create a firewall rule for another tenant. Changing this creates a new // firewall rule. TenantId pulumi.StringPtrInput }
The set of arguments for constructing a RuleV2 resource.
func (RuleV2Args) ElementType ¶ added in v3.13.0
func (RuleV2Args) ElementType() reflect.Type
type RuleV2Array ¶ added in v3.13.0
type RuleV2Array []RuleV2Input
func (RuleV2Array) ElementType ¶ added in v3.13.0
func (RuleV2Array) ElementType() reflect.Type
func (RuleV2Array) ToRuleV2ArrayOutput ¶ added in v3.13.0
func (i RuleV2Array) ToRuleV2ArrayOutput() RuleV2ArrayOutput
func (RuleV2Array) ToRuleV2ArrayOutputWithContext ¶ added in v3.13.0
func (i RuleV2Array) ToRuleV2ArrayOutputWithContext(ctx context.Context) RuleV2ArrayOutput
type RuleV2ArrayInput ¶ added in v3.13.0
type RuleV2ArrayInput interface { pulumi.Input ToRuleV2ArrayOutput() RuleV2ArrayOutput ToRuleV2ArrayOutputWithContext(context.Context) RuleV2ArrayOutput }
RuleV2ArrayInput is an input type that accepts RuleV2Array and RuleV2ArrayOutput values. You can construct a concrete instance of `RuleV2ArrayInput` via:
RuleV2Array{ RuleV2Args{...} }
type RuleV2ArrayOutput ¶ added in v3.13.0
type RuleV2ArrayOutput struct{ *pulumi.OutputState }
func (RuleV2ArrayOutput) ElementType ¶ added in v3.13.0
func (RuleV2ArrayOutput) ElementType() reflect.Type
func (RuleV2ArrayOutput) Index ¶ added in v3.13.0
func (o RuleV2ArrayOutput) Index(i pulumi.IntInput) RuleV2Output
func (RuleV2ArrayOutput) ToRuleV2ArrayOutput ¶ added in v3.13.0
func (o RuleV2ArrayOutput) ToRuleV2ArrayOutput() RuleV2ArrayOutput
func (RuleV2ArrayOutput) ToRuleV2ArrayOutputWithContext ¶ added in v3.13.0
func (o RuleV2ArrayOutput) ToRuleV2ArrayOutputWithContext(ctx context.Context) RuleV2ArrayOutput
type RuleV2Input ¶ added in v3.13.0
type RuleV2Input interface { pulumi.Input ToRuleV2Output() RuleV2Output ToRuleV2OutputWithContext(ctx context.Context) RuleV2Output }
type RuleV2Map ¶ added in v3.13.0
type RuleV2Map map[string]RuleV2Input
func (RuleV2Map) ElementType ¶ added in v3.13.0
func (RuleV2Map) ToRuleV2MapOutput ¶ added in v3.13.0
func (i RuleV2Map) ToRuleV2MapOutput() RuleV2MapOutput
func (RuleV2Map) ToRuleV2MapOutputWithContext ¶ added in v3.13.0
func (i RuleV2Map) ToRuleV2MapOutputWithContext(ctx context.Context) RuleV2MapOutput
type RuleV2MapInput ¶ added in v3.13.0
type RuleV2MapInput interface { pulumi.Input ToRuleV2MapOutput() RuleV2MapOutput ToRuleV2MapOutputWithContext(context.Context) RuleV2MapOutput }
RuleV2MapInput is an input type that accepts RuleV2Map and RuleV2MapOutput values. You can construct a concrete instance of `RuleV2MapInput` via:
RuleV2Map{ "key": RuleV2Args{...} }
type RuleV2MapOutput ¶ added in v3.13.0
type RuleV2MapOutput struct{ *pulumi.OutputState }
func (RuleV2MapOutput) ElementType ¶ added in v3.13.0
func (RuleV2MapOutput) ElementType() reflect.Type
func (RuleV2MapOutput) MapIndex ¶ added in v3.13.0
func (o RuleV2MapOutput) MapIndex(k pulumi.StringInput) RuleV2Output
func (RuleV2MapOutput) ToRuleV2MapOutput ¶ added in v3.13.0
func (o RuleV2MapOutput) ToRuleV2MapOutput() RuleV2MapOutput
func (RuleV2MapOutput) ToRuleV2MapOutputWithContext ¶ added in v3.13.0
func (o RuleV2MapOutput) ToRuleV2MapOutputWithContext(ctx context.Context) RuleV2MapOutput
type RuleV2Output ¶ added in v3.13.0
type RuleV2Output struct{ *pulumi.OutputState }
func (RuleV2Output) Action ¶ added in v3.13.0
func (o RuleV2Output) Action() pulumi.StringPtrOutput
Action to be taken (must be "allow", "deny" or "reject") when the firewall rule matches. Changing this updates the `action` of an existing firewall rule. Default is `deny`.
func (RuleV2Output) Description ¶ added in v3.13.0
func (o RuleV2Output) Description() pulumi.StringPtrOutput
A description for the firewall rule. Changing this updates the `description` of an existing firewall rule.
func (RuleV2Output) DestinationIpAddress ¶ added in v3.13.0
func (o RuleV2Output) DestinationIpAddress() pulumi.StringPtrOutput
The destination IP address on which the firewall rule operates. Changing this updates the `destinationIpAddress` of an existing firewall rule.
func (RuleV2Output) DestinationPort ¶ added in v3.13.0
func (o RuleV2Output) DestinationPort() pulumi.StringPtrOutput
The destination port on which the firewall rule operates. Changing this updates the `destinationPort` of an existing firewall rule. Require not `any` or empty protocol.
func (RuleV2Output) ElementType ¶ added in v3.13.0
func (RuleV2Output) ElementType() reflect.Type
func (RuleV2Output) Enabled ¶ added in v3.13.0
func (o RuleV2Output) Enabled() pulumi.BoolPtrOutput
Enabled status for the firewall rule (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `enabled` status of an existing firewall rule.
func (RuleV2Output) IpVersion ¶ added in v3.13.0
func (o RuleV2Output) IpVersion() pulumi.IntPtrOutput
IP version, either 4 or 6. Changing this updates the `ipVersion` of an existing firewall rule. Default is `4`.
func (RuleV2Output) Name ¶ added in v3.13.0
func (o RuleV2Output) Name() pulumi.StringOutput
A unique name for the firewall rule. Changing this updates the `name` of an existing firewall rule.
func (RuleV2Output) ProjectId ¶ added in v3.14.0
func (o RuleV2Output) ProjectId() pulumi.StringOutput
This argument conflicts and is interchangeable with `tenantId`. The owner of the firewall rule. Required if admin wants to create a firewall rule for another project. Changing this creates a new firewall rule.
func (RuleV2Output) Protocol ¶ added in v3.13.0
func (o RuleV2Output) Protocol() pulumi.StringPtrOutput
(Optional; Required if `sourcePort` or `destinationPort` is not empty) The protocol type on which the firewall rule operates. Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the `protocol` of an existing firewall rule. Default is `any`.
func (RuleV2Output) Region ¶ added in v3.13.0
func (o RuleV2Output) Region() pulumi.StringOutput
The region in which to obtain the v2 networking client. A networking client is needed to create a firewall rule. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall rule.
func (RuleV2Output) Shared ¶ added in v3.13.0
func (o RuleV2Output) Shared() pulumi.BoolPtrOutput
Sharing status of the firewall rule (must be "true" or "false" if provided). If this is "true" the policy is visible to, and can be used in, firewalls in other tenants. Changing this updates the `shared` status of an existing firewall policy. On
func (RuleV2Output) SourceIpAddress ¶ added in v3.13.0
func (o RuleV2Output) SourceIpAddress() pulumi.StringPtrOutput
The source IP address on which the firewall rule operates. Changing this updates the `sourceIpAddress` of an existing firewall rule.
func (RuleV2Output) SourcePort ¶ added in v3.13.0
func (o RuleV2Output) SourcePort() pulumi.StringPtrOutput
The source port on which the firewall rule operates. Changing this updates the `sourcePort` of an existing firewall rule. Require not `any` or empty protocol.
func (RuleV2Output) TenantId ¶ added in v3.13.0
func (o RuleV2Output) TenantId() pulumi.StringOutput
This argument conflicts and is interchangeable with `projectId`. The owner of the firewall rule. Required if admin wants to create a firewall rule for another tenant. Changing this creates a new firewall rule.
func (RuleV2Output) ToRuleV2Output ¶ added in v3.13.0
func (o RuleV2Output) ToRuleV2Output() RuleV2Output
func (RuleV2Output) ToRuleV2OutputWithContext ¶ added in v3.13.0
func (o RuleV2Output) ToRuleV2OutputWithContext(ctx context.Context) RuleV2Output
type RuleV2State ¶ added in v3.13.0
type RuleV2State struct { // Action to be taken (must be "allow", "deny" or "reject") // when the firewall rule matches. Changing this updates the `action` of an // existing firewall rule. Default is `deny`. Action pulumi.StringPtrInput // A description for the firewall rule. Changing this // updates the `description` of an existing firewall rule. Description pulumi.StringPtrInput // The destination IP address on which the // firewall rule operates. Changing this updates the `destinationIpAddress` // of an existing firewall rule. DestinationIpAddress pulumi.StringPtrInput // The destination port on which the firewall // rule operates. Changing this updates the `destinationPort` of an existing // firewall rule. Require not `any` or empty protocol. DestinationPort pulumi.StringPtrInput // Enabled status for the firewall rule (must be "true" // or "false" if provided - defaults to "true"). Changing this updates the // `enabled` status of an existing firewall rule. Enabled pulumi.BoolPtrInput // IP version, either 4 or 6. Changing this // updates the `ipVersion` of an existing firewall rule. Default is `4`. IpVersion pulumi.IntPtrInput // A unique name for the firewall rule. Changing this // updates the `name` of an existing firewall rule. Name pulumi.StringPtrInput // This argument conflicts and is interchangeable // with `tenantId`. The owner of the firewall rule. Required if admin wants // to create a firewall rule for another project. Changing this creates a new // firewall rule. ProjectId pulumi.StringPtrInput // (Optional; Required if `sourcePort` or `destinationPort` is not // empty) The protocol type on which the firewall rule operates. // Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the // `protocol` of an existing firewall rule. Default is `any`. Protocol pulumi.StringPtrInput // The region in which to obtain the v2 networking client. // A networking client is needed to create a firewall rule. If omitted, the // `region` argument of the provider is used. Changing this creates a new // firewall rule. Region pulumi.StringPtrInput // or "false" if provided). If this is "true" the policy is visible to, and // can be used in, firewalls in other tenants. Changing this updates the // `shared` status of an existing firewall policy. On Shared pulumi.BoolPtrInput // The source IP address on which the firewall // rule operates. Changing this updates the `sourceIpAddress` of an existing // firewall rule. SourceIpAddress pulumi.StringPtrInput // The source port on which the firewall // rule operates. Changing this updates the `sourcePort` of an existing // firewall rule. Require not `any` or empty protocol. SourcePort pulumi.StringPtrInput // This argument conflicts and is interchangeable // with `projectId`. The owner of the firewall rule. Required if admin wants // to create a firewall rule for another tenant. Changing this creates a new // firewall rule. TenantId pulumi.StringPtrInput }
func (RuleV2State) ElementType ¶ added in v3.13.0
func (RuleV2State) ElementType() reflect.Type