1. Packages
  2. Packages
  3. HashiCorp Vault Provider
  4. API Docs
  5. ActivationFlags
Viewing docs for HashiCorp Vault v7.11.1
published on Tuesday, Aug 11, 2026 by Pulumi
vault logo vault logo
Viewing docs for HashiCorp Vault v7.11.1
published on Tuesday, Aug 11, 2026 by Pulumi

    Activates a single activation flag in Vault.

    Important Activation flags require Vault 1.16 or later.

    Important Activation flags are available only in Vault Enterprise.

    Important The activation flags endpoint is root-namespace-only. This resource does not accept a namespace argument.

    Important Vault exposes activation for individual flags at PUT /sys/activation-flags/:feature/activate, but does not expose a public deactivation API.

    Example Usage

    Activate a Feature

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const example = new vault.ActivationFlags("example", {feature: "secrets-sync"});
    
    import pulumi
    import pulumi_vault as vault
    
    example = vault.ActivationFlags("example", feature="secrets-sync")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vault.NewActivationFlags(ctx, "example", &vault.ActivationFlagsArgs{
    			Feature: pulumi.String("secrets-sync"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vault.ActivationFlags("example", new()
        {
            Feature = "secrets-sync",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.ActivationFlags;
    import com.pulumi.vault.ActivationFlagsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new ActivationFlags("example", ActivationFlagsArgs.builder()
                .feature("secrets-sync")
                .build());
    
        }
    }
    
    resources:
      example:
        type: vault:ActivationFlags
        properties:
          feature: secrets-sync
    
    pulumi {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_activationflags" "example" {
      feature = "secrets-sync"
    }
    

    Notes

    • Each vault.ActivationFlags resource activates exactly one feature by calling PUT /sys/activation-flags/:feature/activate.
    • Destroying this resource removes it from Terraform state only. It does not deactivate the flag in Vault.
    • Activation flag names must exactly match the feature keys returned by GET /sys/activation-flags.

    Create ActivationFlags Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ActivationFlags(name: string, args: ActivationFlagsArgs, opts?: CustomResourceOptions);
    @overload
    def ActivationFlags(resource_name: str,
                        args: ActivationFlagsArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ActivationFlags(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        feature: Optional[str] = None)
    func NewActivationFlags(ctx *Context, name string, args ActivationFlagsArgs, opts ...ResourceOption) (*ActivationFlags, error)
    public ActivationFlags(string name, ActivationFlagsArgs args, CustomResourceOptions? opts = null)
    public ActivationFlags(String name, ActivationFlagsArgs args)
    public ActivationFlags(String name, ActivationFlagsArgs args, CustomResourceOptions options)
    
    type: vault:ActivationFlags
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vault_activation_flags" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ActivationFlagsArgs
    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 ActivationFlagsArgs
    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 ActivationFlagsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ActivationFlagsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ActivationFlagsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var activationFlagsResource = new Vault.ActivationFlags("activationFlagsResource", new()
    {
        Feature = "string",
    });
    
    example, err := vault.NewActivationFlags(ctx, "activationFlagsResource", &vault.ActivationFlagsArgs{
    	Feature: pulumi.String("string"),
    })
    
    resource "vault_activation_flags" "activationFlagsResource" {
      lifecycle {
        create_before_destroy = true
      }
      feature = "string"
    }
    
    var activationFlagsResource = new ActivationFlags("activationFlagsResource", ActivationFlagsArgs.builder()
        .feature("string")
        .build());
    
    activation_flags_resource = vault.ActivationFlags("activationFlagsResource", feature="string")
    
    const activationFlagsResource = new vault.ActivationFlags("activationFlagsResource", {feature: "string"});
    
    type: vault:ActivationFlags
    properties:
        feature: string
    

    ActivationFlags Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ActivationFlags resource accepts the following input properties:

    Feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    Feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature String
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature str
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature String
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ActivationFlags 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 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.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ActivationFlags Resource

    Get an existing ActivationFlags 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?: ActivationFlagsState, opts?: CustomResourceOptions): ActivationFlags
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            feature: Optional[str] = None) -> ActivationFlags
    func GetActivationFlags(ctx *Context, name string, id IDInput, state *ActivationFlagsState, opts ...ResourceOption) (*ActivationFlags, error)
    public static ActivationFlags Get(string name, Input<string> id, ActivationFlagsState? state, CustomResourceOptions? opts = null)
    public static ActivationFlags get(String name, Output<String> id, ActivationFlagsState state, CustomResourceOptions options)
    resources:  _:    type: vault:ActivationFlags    get:      id: ${id}
    import {
      to = vault_activation_flags.example
      id = "${id}"
    }
    
    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.
    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:
    Feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    Feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature String
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature string
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature str
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.
    feature String
    Exact activation flag key to activate. The value must match a feature name returned by GET /sys/activation-flags.

    Import

    The activation flags resource can be imported using the feature key, e.g.

    $ pulumi import vault:index/activationFlags:ActivationFlags example secret_sync
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo vault logo
    Viewing docs for HashiCorp Vault v7.11.1
    published on Tuesday, Aug 11, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial