Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Policy

Provides access to read and write certificate policy in Venafi. This can be used to define a new policy (folder in Trust Protection Platform; application and/or issuing template in Venafi as a Service).

Example Usage

using System.IO;
using Pulumi;
using Venafi = Pulumi.Venafi;

class MyStack : Stack
{
    public MyStack()
    {
        var internalPolicy = new Venafi.Policy("internalPolicy", new Venafi.PolicyArgs
        {
            Zone = "My Business App\\Enterprise Trusted Certs",
            PolicySpecification = File.ReadAllText("/path-to/internal-policy.json"),
        });
    }

}

Coming soon!

import pulumi
import pulumi_venafi as venafi

internal_policy = venafi.Policy("internalPolicy",
    zone="My Business App\\Enterprise Trusted Certs",
    policy_specification=(lambda path: open(path).read())("/path-to/internal-policy.json"))
import * as pulumi from "@pulumi/pulumi";
import * as venafi from "@pulumi/venafi";
import * from "fs";

const internalPolicy = new venafi.Policy("internalPolicy", {
    zone: "My Business App\\Enterprise Trusted Certs",
    policySpecification: fs.readFileSync("/path-to/internal-policy.json"),
});

Create a Policy Resource

new Policy(name: string, args?: PolicyArgs, opts?: CustomResourceOptions);
@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           policy_specification: Optional[str] = None,
           zone: Optional[str] = None)
@overload
def Policy(resource_name: str,
           args: Optional[PolicyArgs] = None,
           opts: Optional[ResourceOptions] = None)
func NewPolicy(ctx *Context, name string, args *PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Policy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Policy resource accepts the following input properties:

PolicySpecification string
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
Zone string
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.
PolicySpecification string
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
Zone string
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.
policySpecification string
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
zone string
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.
policy_specification str
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
zone str
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.

Outputs

All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Policy Resource

Get an existing Policy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PolicyState, opts?: CustomResourceOptions): Policy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        policy_specification: Optional[str] = None,
        zone: Optional[str] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

PolicySpecification string
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
Zone string
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.
PolicySpecification string
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
Zone string
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.
policySpecification string
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
zone string
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.
policy_specification str
The JSON-formatted certificate policy specification. Typically read from a file using the file function.
zone str
The Trust Protection Plaform policy folder or Venafi as a Service application and issuing template.

Import

The venafi_policy resource supports the Terraform import method.

When used, the zone and policy_specification resource arguments are not required since the zone is a required parameter of the import method and the policy specification is populated from the existing infrastructure. Policy that is successfully imported is also output to a file named after the zone that was specified. hcl resource “venafi_policy” “existing_policy” {}

 $ pulumi import venafi:index/policy:Policy existing_policy" "My Business App\\Enterprise Trusted Certs"

Package Details

Repository
https://github.com/pulumi/pulumi-venafi
License
Apache-2.0
Notes
This Pulumi package is based on the venafi Terraform Provider.