1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. kms
  6. ProjectAutokeyConfig
Viewing docs for Google Cloud v9.21.0
published on Friday, Apr 24, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.21.0
published on Friday, Apr 24, 2026 by Pulumi

    ProjectAutokeyConfig is a singleton resource used to configure the auto-provisioning flow of CryptoKeys for CMEK.

    Note: ProjectAutokeyConfigs cannot be deleted from Google Cloud Platform. Destroying a Terraform-managed ProjectAutokeyConfigs will remove it from state but will not delete the resource from the project.

    To get more information about ProjectAutokeyConfig, see:

    Example Usage

    Kms Autokey Config Project

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as time from "@pulumiverse/time";
    
    // Create the resource project
    const resourceProject = new gcp.organizations.Project("resource_project", {
        projectId: "my-project",
        name: "my-project",
        orgId: "123456789",
        billingAccount: "000000-0000000-0000000-000000",
        deletionPolicy: "DELETE",
    });
    // Enable the Cloud KMS API
    const kmsApiService = new gcp.projects.Service("kms_api_service", {
        service: "cloudkms.googleapis.com",
        project: resourceProject.projectId,
        disableDependentServices: true,
    }, {
        dependsOn: [resourceProject],
    });
    // Wait delay after enabling APIs
    const waitEnableServiceApi = new time.Sleep("wait_enable_service_api", {createDuration: "30s"}, {
        dependsOn: [kmsApiService],
    });
    // Create KMS Service Agent
    const kmsServiceAgent = new gcp.projects.ServiceIdentity("kms_service_agent", {
        service: "cloudkms.googleapis.com",
        project: resourceProject.number,
    }, {
        dependsOn: [waitEnableServiceApi],
    });
    // Wait delay after creating service agent
    const waitServiceAgent = new time.Sleep("wait_service_agent", {createDuration: "10s"}, {
        dependsOn: [kmsServiceAgent],
    });
    // Grant the KMS Service Agent the Cloud KMS Admin role
    const autokeyProjectAdmin = new gcp.projects.IAMMember("autokey_project_admin", {
        project: resourceProject.projectId,
        role: "roles/cloudkms.admin",
        member: pulumi.interpolate`serviceAccount:service-${resourceProject.number}@gcp-sa-cloudkms.iam.gserviceaccount.com`,
    }, {
        dependsOn: [waitServiceAgent],
    });
    // Wait delay after granting IAM permissions
    const waitSrvAccPermissions = new time.Sleep("wait_srv_acc_permissions", {createDuration: "10s"}, {
        dependsOn: [autokeyProjectAdmin],
    });
    const example_autokeyconfig_project = new gcp.kms.ProjectAutokeyConfig("example-autokeyconfig-project", {
        project: resourceProject.number,
        keyProjectResolutionMode: "RESOURCE_PROJECT",
    }, {
        dependsOn: [waitSrvAccPermissions],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumiverse_time as time
    
    # Create the resource project
    resource_project = gcp.organizations.Project("resource_project",
        project_id="my-project",
        name="my-project",
        org_id="123456789",
        billing_account="000000-0000000-0000000-000000",
        deletion_policy="DELETE")
    # Enable the Cloud KMS API
    kms_api_service = gcp.projects.Service("kms_api_service",
        service="cloudkms.googleapis.com",
        project=resource_project.project_id,
        disable_dependent_services=True,
        opts = pulumi.ResourceOptions(depends_on=[resource_project]))
    # Wait delay after enabling APIs
    wait_enable_service_api = time.Sleep("wait_enable_service_api", create_duration="30s",
    opts = pulumi.ResourceOptions(depends_on=[kms_api_service]))
    # Create KMS Service Agent
    kms_service_agent = gcp.projects.ServiceIdentity("kms_service_agent",
        service="cloudkms.googleapis.com",
        project=resource_project.number,
        opts = pulumi.ResourceOptions(depends_on=[wait_enable_service_api]))
    # Wait delay after creating service agent
    wait_service_agent = time.Sleep("wait_service_agent", create_duration="10s",
    opts = pulumi.ResourceOptions(depends_on=[kms_service_agent]))
    # Grant the KMS Service Agent the Cloud KMS Admin role
    autokey_project_admin = gcp.projects.IAMMember("autokey_project_admin",
        project=resource_project.project_id,
        role="roles/cloudkms.admin",
        member=resource_project.number.apply(lambda number: f"serviceAccount:service-{number}@gcp-sa-cloudkms.iam.gserviceaccount.com"),
        opts = pulumi.ResourceOptions(depends_on=[wait_service_agent]))
    # Wait delay after granting IAM permissions
    wait_srv_acc_permissions = time.Sleep("wait_srv_acc_permissions", create_duration="10s",
    opts = pulumi.ResourceOptions(depends_on=[autokey_project_admin]))
    example_autokeyconfig_project = gcp.kms.ProjectAutokeyConfig("example-autokeyconfig-project",
        project=resource_project.number,
        key_project_resolution_mode="RESOURCE_PROJECT",
        opts = pulumi.ResourceOptions(depends_on=[wait_srv_acc_permissions]))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/kms"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/projects"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-time/sdk/go/time"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create the resource project
    		resourceProject, err := organizations.NewProject(ctx, "resource_project", &organizations.ProjectArgs{
    			ProjectId:      pulumi.String("my-project"),
    			Name:           pulumi.String("my-project"),
    			OrgId:          pulumi.String("123456789"),
    			BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
    			DeletionPolicy: pulumi.String("DELETE"),
    		})
    		if err != nil {
    			return err
    		}
    		// Enable the Cloud KMS API
    		kmsApiService, err := projects.NewService(ctx, "kms_api_service", &projects.ServiceArgs{
    			Service:                  pulumi.String("cloudkms.googleapis.com"),
    			Project:                  resourceProject.ProjectId,
    			DisableDependentServices: pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			resourceProject,
    		}))
    		if err != nil {
    			return err
    		}
    		// Wait delay after enabling APIs
    		waitEnableServiceApi, err := time.NewSleep(ctx, "wait_enable_service_api", &time.SleepArgs{
    			CreateDuration: pulumi.String("30s"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			kmsApiService,
    		}))
    		if err != nil {
    			return err
    		}
    		// Create KMS Service Agent
    		kmsServiceAgent, err := projects.NewServiceIdentity(ctx, "kms_service_agent", &projects.ServiceIdentityArgs{
    			Service: pulumi.String("cloudkms.googleapis.com"),
    			Project: resourceProject.Number,
    		}, pulumi.DependsOn([]pulumi.Resource{
    			waitEnableServiceApi,
    		}))
    		if err != nil {
    			return err
    		}
    		// Wait delay after creating service agent
    		waitServiceAgent, err := time.NewSleep(ctx, "wait_service_agent", &time.SleepArgs{
    			CreateDuration: pulumi.String("10s"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			kmsServiceAgent,
    		}))
    		if err != nil {
    			return err
    		}
    		// Grant the KMS Service Agent the Cloud KMS Admin role
    		autokeyProjectAdmin, err := projects.NewIAMMember(ctx, "autokey_project_admin", &projects.IAMMemberArgs{
    			Project: resourceProject.ProjectId,
    			Role:    pulumi.String("roles/cloudkms.admin"),
    			Member: resourceProject.Number.ApplyT(func(number string) (string, error) {
    				return fmt.Sprintf("serviceAccount:service-%v@gcp-sa-cloudkms.iam.gserviceaccount.com", number), nil
    			}).(pulumi.StringOutput),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			waitServiceAgent,
    		}))
    		if err != nil {
    			return err
    		}
    		// Wait delay after granting IAM permissions
    		waitSrvAccPermissions, err := time.NewSleep(ctx, "wait_srv_acc_permissions", &time.SleepArgs{
    			CreateDuration: pulumi.String("10s"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			autokeyProjectAdmin,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = kms.NewProjectAutokeyConfig(ctx, "example-autokeyconfig-project", &kms.ProjectAutokeyConfigArgs{
    			Project:                  resourceProject.Number,
    			KeyProjectResolutionMode: pulumi.String("RESOURCE_PROJECT"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			waitSrvAccPermissions,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Time = Pulumiverse.Time;
    
    return await Deployment.RunAsync(() => 
    {
        // Create the resource project
        var resourceProject = new Gcp.Organizations.Project("resource_project", new()
        {
            ProjectId = "my-project",
            Name = "my-project",
            OrgId = "123456789",
            BillingAccount = "000000-0000000-0000000-000000",
            DeletionPolicy = "DELETE",
        });
    
        // Enable the Cloud KMS API
        var kmsApiService = new Gcp.Projects.Service("kms_api_service", new()
        {
            ServiceName = "cloudkms.googleapis.com",
            Project = resourceProject.ProjectId,
            DisableDependentServices = true,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                resourceProject,
            },
        });
    
        // Wait delay after enabling APIs
        var waitEnableServiceApi = new Time.Index.Sleep("wait_enable_service_api", new()
        {
            CreateDuration = "30s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                kmsApiService,
            },
        });
    
        // Create KMS Service Agent
        var kmsServiceAgent = new Gcp.Projects.ServiceIdentity("kms_service_agent", new()
        {
            Service = "cloudkms.googleapis.com",
            Project = resourceProject.Number,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                waitEnableServiceApi,
            },
        });
    
        // Wait delay after creating service agent
        var waitServiceAgent = new Time.Index.Sleep("wait_service_agent", new()
        {
            CreateDuration = "10s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                kmsServiceAgent,
            },
        });
    
        // Grant the KMS Service Agent the Cloud KMS Admin role
        var autokeyProjectAdmin = new Gcp.Projects.IAMMember("autokey_project_admin", new()
        {
            Project = resourceProject.ProjectId,
            Role = "roles/cloudkms.admin",
            Member = resourceProject.Number.Apply(number => $"serviceAccount:service-{number}@gcp-sa-cloudkms.iam.gserviceaccount.com"),
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                waitServiceAgent,
            },
        });
    
        // Wait delay after granting IAM permissions
        var waitSrvAccPermissions = new Time.Index.Sleep("wait_srv_acc_permissions", new()
        {
            CreateDuration = "10s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                autokeyProjectAdmin,
            },
        });
    
        var example_autokeyconfig_project = new Gcp.Kms.ProjectAutokeyConfig("example-autokeyconfig-project", new()
        {
            Project = resourceProject.Number,
            KeyProjectResolutionMode = "RESOURCE_PROJECT",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                waitSrvAccPermissions,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.Project;
    import com.pulumi.gcp.organizations.ProjectArgs;
    import com.pulumi.gcp.projects.Service;
    import com.pulumi.gcp.projects.ServiceArgs;
    import com.pulumiverse.time.Sleep;
    import com.pulumiverse.time.SleepArgs;
    import com.pulumi.gcp.projects.ServiceIdentity;
    import com.pulumi.gcp.projects.ServiceIdentityArgs;
    import com.pulumi.gcp.projects.IAMMember;
    import com.pulumi.gcp.projects.IAMMemberArgs;
    import com.pulumi.gcp.kms.ProjectAutokeyConfig;
    import com.pulumi.gcp.kms.ProjectAutokeyConfigArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            // Create the resource project
            var resourceProject = new Project("resourceProject", ProjectArgs.builder()
                .projectId("my-project")
                .name("my-project")
                .orgId("123456789")
                .billingAccount("000000-0000000-0000000-000000")
                .deletionPolicy("DELETE")
                .build());
    
            // Enable the Cloud KMS API
            var kmsApiService = new Service("kmsApiService", ServiceArgs.builder()
                .service("cloudkms.googleapis.com")
                .project(resourceProject.projectId())
                .disableDependentServices(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(resourceProject)
                    .build());
    
            // Wait delay after enabling APIs
            var waitEnableServiceApi = new Sleep("waitEnableServiceApi", SleepArgs.builder()
                .createDuration("30s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(kmsApiService)
                    .build());
    
            // Create KMS Service Agent
            var kmsServiceAgent = new ServiceIdentity("kmsServiceAgent", ServiceIdentityArgs.builder()
                .service("cloudkms.googleapis.com")
                .project(resourceProject.number())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(waitEnableServiceApi)
                    .build());
    
            // Wait delay after creating service agent
            var waitServiceAgent = new Sleep("waitServiceAgent", SleepArgs.builder()
                .createDuration("10s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(kmsServiceAgent)
                    .build());
    
            // Grant the KMS Service Agent the Cloud KMS Admin role
            var autokeyProjectAdmin = new IAMMember("autokeyProjectAdmin", IAMMemberArgs.builder()
                .project(resourceProject.projectId())
                .role("roles/cloudkms.admin")
                .member(resourceProject.number().applyValue(_number -> String.format("serviceAccount:service-%s@gcp-sa-cloudkms.iam.gserviceaccount.com", _number)))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(waitServiceAgent)
                    .build());
    
            // Wait delay after granting IAM permissions
            var waitSrvAccPermissions = new Sleep("waitSrvAccPermissions", SleepArgs.builder()
                .createDuration("10s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(autokeyProjectAdmin)
                    .build());
    
            var example_autokeyconfig_project = new ProjectAutokeyConfig("example-autokeyconfig-project", ProjectAutokeyConfigArgs.builder()
                .project(resourceProject.number())
                .keyProjectResolutionMode("RESOURCE_PROJECT")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(waitSrvAccPermissions)
                    .build());
    
        }
    }
    
    resources:
      # Create the resource project
      resourceProject:
        type: gcp:organizations:Project
        name: resource_project
        properties:
          projectId: my-project
          name: my-project
          orgId: '123456789'
          billingAccount: 000000-0000000-0000000-000000
          deletionPolicy: DELETE
      # Enable the Cloud KMS API
      kmsApiService:
        type: gcp:projects:Service
        name: kms_api_service
        properties:
          service: cloudkms.googleapis.com
          project: ${resourceProject.projectId}
          disableDependentServices: true
        options:
          dependsOn:
            - ${resourceProject}
      # Wait delay after enabling APIs
      waitEnableServiceApi:
        type: time:Sleep
        name: wait_enable_service_api
        properties:
          createDuration: 30s
        options:
          dependsOn:
            - ${kmsApiService}
      # Create KMS Service Agent
      kmsServiceAgent:
        type: gcp:projects:ServiceIdentity
        name: kms_service_agent
        properties:
          service: cloudkms.googleapis.com
          project: ${resourceProject.number}
        options:
          dependsOn:
            - ${waitEnableServiceApi}
      # Wait delay after creating service agent
      waitServiceAgent:
        type: time:Sleep
        name: wait_service_agent
        properties:
          createDuration: 10s
        options:
          dependsOn:
            - ${kmsServiceAgent}
      # Grant the KMS Service Agent the Cloud KMS Admin role
      autokeyProjectAdmin:
        type: gcp:projects:IAMMember
        name: autokey_project_admin
        properties:
          project: ${resourceProject.projectId}
          role: roles/cloudkms.admin
          member: serviceAccount:service-${resourceProject.number}@gcp-sa-cloudkms.iam.gserviceaccount.com
        options:
          dependsOn:
            - ${waitServiceAgent}
      # Wait delay after granting IAM permissions
      waitSrvAccPermissions:
        type: time:Sleep
        name: wait_srv_acc_permissions
        properties:
          createDuration: 10s
        options:
          dependsOn:
            - ${autokeyProjectAdmin}
      example-autokeyconfig-project:
        type: gcp:kms:ProjectAutokeyConfig
        properties:
          project: ${resourceProject.number}
          keyProjectResolutionMode: RESOURCE_PROJECT
        options:
          dependsOn:
            - ${waitSrvAccPermissions}
    

    Create ProjectAutokeyConfig Resource

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

    Constructor syntax

    new ProjectAutokeyConfig(name: string, args?: ProjectAutokeyConfigArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectAutokeyConfig(resource_name: str,
                             args: Optional[ProjectAutokeyConfigArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectAutokeyConfig(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             key_project_resolution_mode: Optional[str] = None,
                             project: Optional[str] = None)
    func NewProjectAutokeyConfig(ctx *Context, name string, args *ProjectAutokeyConfigArgs, opts ...ResourceOption) (*ProjectAutokeyConfig, error)
    public ProjectAutokeyConfig(string name, ProjectAutokeyConfigArgs? args = null, CustomResourceOptions? opts = null)
    public ProjectAutokeyConfig(String name, ProjectAutokeyConfigArgs args)
    public ProjectAutokeyConfig(String name, ProjectAutokeyConfigArgs args, CustomResourceOptions options)
    
    type: gcp:kms:ProjectAutokeyConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProjectAutokeyConfigArgs
    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 ProjectAutokeyConfigArgs
    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 ProjectAutokeyConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectAutokeyConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectAutokeyConfigArgs
    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 projectAutokeyConfigResource = new Gcp.Kms.ProjectAutokeyConfig("projectAutokeyConfigResource", new()
    {
        KeyProjectResolutionMode = "string",
        Project = "string",
    });
    
    example, err := kms.NewProjectAutokeyConfig(ctx, "projectAutokeyConfigResource", &kms.ProjectAutokeyConfigArgs{
    	KeyProjectResolutionMode: pulumi.String("string"),
    	Project:                  pulumi.String("string"),
    })
    
    var projectAutokeyConfigResource = new ProjectAutokeyConfig("projectAutokeyConfigResource", ProjectAutokeyConfigArgs.builder()
        .keyProjectResolutionMode("string")
        .project("string")
        .build());
    
    project_autokey_config_resource = gcp.kms.ProjectAutokeyConfig("projectAutokeyConfigResource",
        key_project_resolution_mode="string",
        project="string")
    
    const projectAutokeyConfigResource = new gcp.kms.ProjectAutokeyConfig("projectAutokeyConfigResource", {
        keyProjectResolutionMode: "string",
        project: "string",
    });
    
    type: gcp:kms:ProjectAutokeyConfig
    properties:
        keyProjectResolutionMode: string
        project: string
    

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

    KeyProjectResolutionMode string
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    KeyProjectResolutionMode string
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    keyProjectResolutionMode String
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    keyProjectResolutionMode string
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    key_project_resolution_mode str
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    keyProjectResolutionMode String
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

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

    Etag string
    The etag of the AutokeyConfig for optimistic concurrency control.
    Id string
    The provider-assigned unique ID for this managed resource.
    Etag string
    The etag of the AutokeyConfig for optimistic concurrency control.
    Id string
    The provider-assigned unique ID for this managed resource.
    etag String
    The etag of the AutokeyConfig for optimistic concurrency control.
    id String
    The provider-assigned unique ID for this managed resource.
    etag string
    The etag of the AutokeyConfig for optimistic concurrency control.
    id string
    The provider-assigned unique ID for this managed resource.
    etag str
    The etag of the AutokeyConfig for optimistic concurrency control.
    id str
    The provider-assigned unique ID for this managed resource.
    etag String
    The etag of the AutokeyConfig for optimistic concurrency control.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectAutokeyConfig Resource

    Get an existing ProjectAutokeyConfig 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?: ProjectAutokeyConfigState, opts?: CustomResourceOptions): ProjectAutokeyConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            etag: Optional[str] = None,
            key_project_resolution_mode: Optional[str] = None,
            project: Optional[str] = None) -> ProjectAutokeyConfig
    func GetProjectAutokeyConfig(ctx *Context, name string, id IDInput, state *ProjectAutokeyConfigState, opts ...ResourceOption) (*ProjectAutokeyConfig, error)
    public static ProjectAutokeyConfig Get(string name, Input<string> id, ProjectAutokeyConfigState? state, CustomResourceOptions? opts = null)
    public static ProjectAutokeyConfig get(String name, Output<String> id, ProjectAutokeyConfigState state, CustomResourceOptions options)
    resources:  _:    type: gcp:kms:ProjectAutokeyConfig    get:      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:
    Etag string
    The etag of the AutokeyConfig for optimistic concurrency control.
    KeyProjectResolutionMode string
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Etag string
    The etag of the AutokeyConfig for optimistic concurrency control.
    KeyProjectResolutionMode string
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    etag String
    The etag of the AutokeyConfig for optimistic concurrency control.
    keyProjectResolutionMode String
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    etag string
    The etag of the AutokeyConfig for optimistic concurrency control.
    keyProjectResolutionMode string
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    etag str
    The etag of the AutokeyConfig for optimistic concurrency control.
    key_project_resolution_mode str
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    etag String
    The etag of the AutokeyConfig for optimistic concurrency control.
    keyProjectResolutionMode String
    How Autokey determines which project to use when provisioning CMEK keys. Possible values are: RESOURCE_PROJECT, DISABLED.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Import

    ProjectAutokeyConfig can be imported using any of these accepted formats:

    • projects/{{project}}/autokeyConfig
    • {{project}}

    When using the pulumi import command, ProjectAutokeyConfig can be imported using one of the formats above. For example:

    $ pulumi import gcp:kms/projectAutokeyConfig:ProjectAutokeyConfig default projects/{{project}}/autokeyConfig
    $ pulumi import gcp:kms/projectAutokeyConfig:ProjectAutokeyConfig default {{project}}
    

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

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v9.21.0
    published on Friday, Apr 24, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.