Package com.pulumi.openstack.firewall
Class GroupV2
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.firewall.GroupV2
-
public class GroupV2 extends com.pulumi.resources.CustomResourceManages a v2 firewall group resource within OpenStack. > **Note:** Firewall v2 has no support for OVN currently. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.firewall.RuleV2; import com.pulumi.openstack.firewall.RuleV2Args; import com.pulumi.openstack.firewall.PolicyV2; import com.pulumi.openstack.firewall.PolicyV2Args; import com.pulumi.openstack.firewall.GroupV2; import com.pulumi.openstack.firewall.GroupV2Args; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var rule1 = new RuleV2("rule1", RuleV2Args.builder() .description("drop TELNET traffic") .action("deny") .protocol("tcp") .destinationPort("23") .enabled("true") .build()); var rule2 = new RuleV2("rule2", RuleV2Args.builder() .description("drop NTP traffic") .action("deny") .protocol("udp") .destinationPort("123") .enabled("false") .build()); var policy1 = new PolicyV2("policy1", PolicyV2Args.builder() .rules(rule1.id()) .build()); var policy2 = new PolicyV2("policy2", PolicyV2Args.builder() .rules(rule2.id()) .build()); var group1 = new GroupV2("group1", GroupV2Args.builder() .ingressFirewallPolicyId(policy1.id()) .egressFirewallPolicyId(policy2.id()) .build()); } } ``` ## 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 ```
-
-
Constructor Summary
Constructors Constructor Description GroupV2(java.lang.String name)GroupV2(java.lang.String name, GroupV2Args args)GroupV2(java.lang.String name, GroupV2Args args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>adminStateUp()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.Optional<java.lang.String>>egressFirewallPolicyId()static GroupV2get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, GroupV2State state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.String>>ingressFirewallPolicyId()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>ports()com.pulumi.core.Output<java.lang.String>projectId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>shared()com.pulumi.core.Output<java.lang.String>status()com.pulumi.core.Output<java.lang.String>tenantId()
-
-
-
Constructor Detail
-
GroupV2
public GroupV2(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
GroupV2
public GroupV2(java.lang.String name, @Nullable GroupV2Args args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
GroupV2
public GroupV2(java.lang.String name, @Nullable GroupV2Args args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
adminStateUp
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> adminStateUp()
- Returns:
- Administrative up/down status for the firewall group (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `admin_state_up` of an existing firewall group.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description for the firewall group. Changing this updates the `description` of an existing firewall group.
-
egressFirewallPolicyId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> egressFirewallPolicyId()
- Returns:
- The egress firewall policy resource id for the firewall group. Changing this updates the `egress_firewall_policy_id` of an existing firewall group.
-
ingressFirewallPolicyId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ingressFirewallPolicyId()
- Returns:
- The ingress firewall policy resource id for the firewall group. Changing this updates the `ingress_firewall_policy_id` of an existing firewall group.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A name for the firewall group. Changing this updates the `name` of an existing firewall.
-
ports
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> ports()
- Returns:
- 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.
-
projectId
public com.pulumi.core.Output<java.lang.String> projectId()
- Returns:
- This argument conflicts and is interchangeable with `tenant_id`. 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.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- 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.
-
shared
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> shared()
- Returns:
- 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.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The status of the firewall group.
-
tenantId
public com.pulumi.core.Output<java.lang.String> tenantId()
- Returns:
- This argument conflicts and is interchangeable with `project_id`. 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.
-
get
public static GroupV2 get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable GroupV2State state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-