Show / Hide Table of Contents

Class GetPolicyDocument

Inheritance
System.Object
GetPolicyDocument
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Vault
Assembly: Pulumi.Vault.dll
Syntax
public static class GetPolicyDocument

Methods

View Source

InvokeAsync(GetPolicyDocumentArgs, InvokeOptions)

This is a data source which can be used to construct a HCL representation of an Vault policy document, for use with resources which expect policy documents, such as the vault..Policy resource.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
public MyStack()
{
    var examplePolicyDocument = Output.Create(Vault.GetPolicyDocument.InvokeAsync(new Vault.GetPolicyDocumentArgs
    {
        Rules = 
        {
            new Vault.Inputs.GetPolicyDocumentRuleArgs
            {
                Capabilities = 
                {
                    "create",
                    "read",
                    "update",
                    "delete",
                    "list",
                },
                Description = "allow all on secrets",
                Path = "secret/*",
            },
        },
    }));
    var examplePolicy = new Vault.Policy("examplePolicy", new Vault.PolicyArgs
    {
        Policy = examplePolicyDocument.Apply(examplePolicyDocument => examplePolicyDocument.Hcl),
    });
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetPolicyDocumentResult> InvokeAsync(GetPolicyDocumentArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetPolicyDocumentArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetPolicyDocumentResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.