OpenStack v5.0.4 published on Tuesday, Apr 29, 2025 by Pulumi
openstack.firewall.getPolicyV2
Explore with Pulumi AI
Use this data source to get information of an available OpenStack firewall policy v2.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const policy = openstack.firewall.getPolicyV2({
name: "tf_test_policy",
});
import pulumi
import pulumi_openstack as openstack
policy = openstack.firewall.get_policy_v2(name="tf_test_policy")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/firewall"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := firewall.LookupPolicyV2(ctx, &firewall.LookupPolicyV2Args{
Name: pulumi.StringRef("tf_test_policy"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var policy = OpenStack.Firewall.GetPolicyV2.Invoke(new()
{
Name = "tf_test_policy",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.firewall.FirewallFunctions;
import com.pulumi.openstack.firewall.inputs.GetPolicyV2Args;
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) {
final var policy = FirewallFunctions.getPolicyV2(GetPolicyV2Args.builder()
.name("tf_test_policy")
.build());
}
}
variables:
policy:
fn::invoke:
function: openstack:firewall:getPolicyV2
arguments:
name: tf_test_policy
Using getPolicyV2
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPolicyV2(args: GetPolicyV2Args, opts?: InvokeOptions): Promise<GetPolicyV2Result>
function getPolicyV2Output(args: GetPolicyV2OutputArgs, opts?: InvokeOptions): Output<GetPolicyV2Result>
def get_policy_v2(audited: Optional[bool] = None,
description: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
shared: Optional[bool] = None,
tenant_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyV2Result
def get_policy_v2_output(audited: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
shared: Optional[pulumi.Input[bool]] = None,
tenant_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicyV2Result]
func LookupPolicyV2(ctx *Context, args *LookupPolicyV2Args, opts ...InvokeOption) (*LookupPolicyV2Result, error)
func LookupPolicyV2Output(ctx *Context, args *LookupPolicyV2OutputArgs, opts ...InvokeOption) LookupPolicyV2ResultOutput
> Note: This function is named LookupPolicyV2
in the Go SDK.
public static class GetPolicyV2
{
public static Task<GetPolicyV2Result> InvokeAsync(GetPolicyV2Args args, InvokeOptions? opts = null)
public static Output<GetPolicyV2Result> Invoke(GetPolicyV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPolicyV2Result> getPolicyV2(GetPolicyV2Args args, InvokeOptions options)
public static Output<GetPolicyV2Result> getPolicyV2(GetPolicyV2Args args, InvokeOptions options)
fn::invoke:
function: openstack:firewall/getPolicyV2:getPolicyV2
arguments:
# arguments dictionary
The following arguments are supported:
- Audited bool
- Whether this policy has been audited.
- Description string
- Human-readable description of the policy.
- Name string
- The name of the firewall policy.
- Policy
Id string - The ID of the firewall policy.
- Project
Id string - This argument conflicts and is interchangeable
with
tenant_id
. The owner of the firewall policy. - Region string
- 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. - bool
- Whether this policy is shared across all projects.
- Tenant
Id string - This argument conflicts and is interchangeable
with
project_id
. The owner of the firewall policy.
- Audited bool
- Whether this policy has been audited.
- Description string
- Human-readable description of the policy.
- Name string
- The name of the firewall policy.
- Policy
Id string - The ID of the firewall policy.
- Project
Id string - This argument conflicts and is interchangeable
with
tenant_id
. The owner of the firewall policy. - Region string
- 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. - bool
- Whether this policy is shared across all projects.
- Tenant
Id string - This argument conflicts and is interchangeable
with
project_id
. The owner of the firewall policy.
- audited Boolean
- Whether this policy has been audited.
- description String
- Human-readable description of the policy.
- name String
- The name of the firewall policy.
- policy
Id String - The ID of the firewall policy.
- project
Id String - This argument conflicts and is interchangeable
with
tenant_id
. The owner of the firewall policy. - region String
- 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. - Boolean
- Whether this policy is shared across all projects.
- tenant
Id String - This argument conflicts and is interchangeable
with
project_id
. The owner of the firewall policy.
- audited boolean
- Whether this policy has been audited.
- description string
- Human-readable description of the policy.
- name string
- The name of the firewall policy.
- policy
Id string - The ID of the firewall policy.
- project
Id string - This argument conflicts and is interchangeable
with
tenant_id
. The owner of the firewall policy. - region string
- 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. - boolean
- Whether this policy is shared across all projects.
- tenant
Id string - This argument conflicts and is interchangeable
with
project_id
. The owner of the firewall policy.
- audited bool
- Whether this policy has been audited.
- description str
- Human-readable description of the policy.
- name str
- The name of the firewall policy.
- policy_
id str - The ID of the firewall policy.
- project_
id str - This argument conflicts and is interchangeable
with
tenant_id
. The owner of the firewall policy. - region str
- 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. - bool
- Whether this policy is shared across all projects.
- tenant_
id str - This argument conflicts and is interchangeable
with
project_id
. The owner of the firewall policy.
- audited Boolean
- Whether this policy has been audited.
- description String
- Human-readable description of the policy.
- name String
- The name of the firewall policy.
- policy
Id String - The ID of the firewall policy.
- project
Id String - This argument conflicts and is interchangeable
with
tenant_id
. The owner of the firewall policy. - region String
- 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. - Boolean
- Whether this policy is shared across all projects.
- tenant
Id String - This argument conflicts and is interchangeable
with
project_id
. The owner of the firewall policy.
getPolicyV2 Result
The following output properties are available:
- Audited bool
- The audit status of the firewall policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id string - See Argument Reference above.
- Region string
- See Argument Reference above.
- Rules List<string>
- The array of one or more firewall rules that comprise the policy.
- bool
- The sharing status of the firewall policy.
- Tenant
Id string - See Argument Reference above.
- Description string
- Name string
- See Argument Reference above.
- Policy
Id string - See Argument Reference above.
- Audited bool
- The audit status of the firewall policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id string - See Argument Reference above.
- Region string
- See Argument Reference above.
- Rules []string
- The array of one or more firewall rules that comprise the policy.
- bool
- The sharing status of the firewall policy.
- Tenant
Id string - See Argument Reference above.
- Description string
- Name string
- See Argument Reference above.
- Policy
Id string - See Argument Reference above.
- audited Boolean
- The audit status of the firewall policy.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Id String - See Argument Reference above.
- region String
- See Argument Reference above.
- rules List<String>
- The array of one or more firewall rules that comprise the policy.
- Boolean
- The sharing status of the firewall policy.
- tenant
Id String - See Argument Reference above.
- description String
- name String
- See Argument Reference above.
- policy
Id String - See Argument Reference above.
- audited boolean
- The audit status of the firewall policy.
- id string
- The provider-assigned unique ID for this managed resource.
- project
Id string - See Argument Reference above.
- region string
- See Argument Reference above.
- rules string[]
- The array of one or more firewall rules that comprise the policy.
- boolean
- The sharing status of the firewall policy.
- tenant
Id string - See Argument Reference above.
- description string
- name string
- See Argument Reference above.
- policy
Id string - See Argument Reference above.
- audited bool
- The audit status of the firewall policy.
- id str
- The provider-assigned unique ID for this managed resource.
- project_
id str - See Argument Reference above.
- region str
- See Argument Reference above.
- rules Sequence[str]
- The array of one or more firewall rules that comprise the policy.
- bool
- The sharing status of the firewall policy.
- tenant_
id str - See Argument Reference above.
- description str
- name str
- See Argument Reference above.
- policy_
id str - See Argument Reference above.
- audited Boolean
- The audit status of the firewall policy.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Id String - See Argument Reference above.
- region String
- See Argument Reference above.
- rules List<String>
- The array of one or more firewall rules that comprise the policy.
- Boolean
- The sharing status of the firewall policy.
- tenant
Id String - See Argument Reference above.
- description String
- name String
- See Argument Reference above.
- policy
Id String - See Argument Reference above.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.