1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. SecretsStore
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi

    Accepted Permissions

    • Secrets Store Read
    • Secrets Store Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleSecretsStore = new cloudflare.SecretsStore("example_secrets_store", {
        accountId: "985e105f4ecef8ad9ca31a8372d0c353",
        name: "service_x_keys",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_secrets_store = cloudflare.SecretsStore("example_secrets_store",
        account_id="985e105f4ecef8ad9ca31a8372d0c353",
        name="service_x_keys")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewSecretsStore(ctx, "example_secrets_store", &cloudflare.SecretsStoreArgs{
    			AccountId: pulumi.String("985e105f4ecef8ad9ca31a8372d0c353"),
    			Name:      pulumi.String("service_x_keys"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleSecretsStore = new Cloudflare.SecretsStore("example_secrets_store", new()
        {
            AccountId = "985e105f4ecef8ad9ca31a8372d0c353",
            Name = "service_x_keys",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.SecretsStore;
    import com.pulumi.cloudflare.SecretsStoreArgs;
    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 exampleSecretsStore = new SecretsStore("exampleSecretsStore", SecretsStoreArgs.builder()
                .accountId("985e105f4ecef8ad9ca31a8372d0c353")
                .name("service_x_keys")
                .build());
    
        }
    }
    
    resources:
      exampleSecretsStore:
        type: cloudflare:SecretsStore
        name: example_secrets_store
        properties:
          accountId: 985e105f4ecef8ad9ca31a8372d0c353
          name: service_x_keys
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    resource "cloudflare_secretsstore" "example_secrets_store" {
      account_id = "985e105f4ecef8ad9ca31a8372d0c353"
      name       = "service_x_keys"
    }
    

    Create SecretsStore Resource

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

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args SecretsStoreArgs
    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 SecretsStoreArgs
    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 SecretsStoreArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretsStoreArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretsStoreArgs
    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 secretsStoreResource = new Cloudflare.SecretsStore("secretsStoreResource", new()
    {
        AccountId = "string",
        Name = "string",
    });
    
    example, err := cloudflare.NewSecretsStore(ctx, "secretsStoreResource", &cloudflare.SecretsStoreArgs{
    	AccountId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    })
    
    resource "cloudflare_secrets_store" "secretsStoreResource" {
      lifecycle {
        create_before_destroy = true
      }
      account_id = "string"
      name       = "string"
    }
    
    var secretsStoreResource = new SecretsStore("secretsStoreResource", SecretsStoreArgs.builder()
        .accountId("string")
        .name("string")
        .build());
    
    secrets_store_resource = cloudflare.SecretsStore("secretsStoreResource",
        account_id="string",
        name="string")
    
    const secretsStoreResource = new cloudflare.SecretsStore("secretsStoreResource", {
        accountId: "string",
        name: "string",
    });
    
    type: cloudflare:SecretsStore
    properties:
        accountId: string
        name: string
    

    SecretsStore 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 SecretsStore resource accepts the following input properties:

    AccountId string
    Account Identifier
    Name string
    The name of the store
    AccountId string
    Account Identifier
    Name string
    The name of the store
    account_id string
    Account Identifier
    name string
    The name of the store
    accountId String
    Account Identifier
    name String
    The name of the store
    accountId string
    Account Identifier
    name string
    The name of the store
    account_id str
    Account Identifier
    name str
    The name of the store
    accountId String
    Account Identifier
    name String
    The name of the store

    Outputs

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

    Created string
    Whenthe secret was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified string
    When the secret was modified.
    Created string
    Whenthe secret was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Modified string
    When the secret was modified.
    created string
    Whenthe secret was created.
    id string
    The provider-assigned unique ID for this managed resource.
    modified string
    When the secret was modified.
    created String
    Whenthe secret was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modified String
    When the secret was modified.
    created string
    Whenthe secret was created.
    id string
    The provider-assigned unique ID for this managed resource.
    modified string
    When the secret was modified.
    created str
    Whenthe secret was created.
    id str
    The provider-assigned unique ID for this managed resource.
    modified str
    When the secret was modified.
    created String
    Whenthe secret was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modified String
    When the secret was modified.

    Look up Existing SecretsStore Resource

    Get an existing SecretsStore 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?: SecretsStoreState, opts?: CustomResourceOptions): SecretsStore
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            created: Optional[str] = None,
            modified: Optional[str] = None,
            name: Optional[str] = None) -> SecretsStore
    func GetSecretsStore(ctx *Context, name string, id IDInput, state *SecretsStoreState, opts ...ResourceOption) (*SecretsStore, error)
    public static SecretsStore Get(string name, Input<string> id, SecretsStoreState? state, CustomResourceOptions? opts = null)
    public static SecretsStore get(String name, Output<String> id, SecretsStoreState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:SecretsStore    get:      id: ${id}
    import {
      to = cloudflare_secrets_store.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:
    AccountId string
    Account Identifier
    Created string
    Whenthe secret was created.
    Modified string
    When the secret was modified.
    Name string
    The name of the store
    AccountId string
    Account Identifier
    Created string
    Whenthe secret was created.
    Modified string
    When the secret was modified.
    Name string
    The name of the store
    account_id string
    Account Identifier
    created string
    Whenthe secret was created.
    modified string
    When the secret was modified.
    name string
    The name of the store
    accountId String
    Account Identifier
    created String
    Whenthe secret was created.
    modified String
    When the secret was modified.
    name String
    The name of the store
    accountId string
    Account Identifier
    created string
    Whenthe secret was created.
    modified string
    When the secret was modified.
    name string
    The name of the store
    account_id str
    Account Identifier
    created str
    Whenthe secret was created.
    modified str
    When the secret was modified.
    name str
    The name of the store
    accountId String
    Account Identifier
    created String
    Whenthe secret was created.
    modified String
    When the secret was modified.
    name String
    The name of the store

    Import

    $ pulumi import cloudflare:index/secretsStore:SecretsStore example '<account_id>/<store_id>'
    

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

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.18.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial