KeyRingArgs

data class KeyRingArgs(val location: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<KeyRingArgs>

A KeyRing is a toplevel logical grouping of CryptoKeys.

Note: KeyRings cannot be deleted from Google Cloud Platform. Destroying a provider-managed KeyRing will remove it from state but will not delete the resource from the project. To get more information about KeyRing, see:

Example Usage

Kms Key Ring Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example_keyring = new gcp.kms.KeyRing("example-keyring", {
name: "keyring-example",
location: "global",
});
import pulumi
import pulumi_gcp as gcp
example_keyring = gcp.kms.KeyRing("example-keyring",
name="keyring-example",
location="global")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example_keyring = new Gcp.Kms.KeyRing("example-keyring", new()
{
Name = "keyring-example",
Location = "global",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kms.NewKeyRing(ctx, "example-keyring", &kms.KeyRingArgs{
Name: pulumi.String("keyring-example"),
Location: pulumi.String("global"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
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) {
var example_keyring = new KeyRing("example-keyring", KeyRingArgs.builder()
.name("keyring-example")
.location("global")
.build());
}
}
resources:
example-keyring:
type: gcp:kms:KeyRing
properties:
name: keyring-example
location: global

Import

KeyRing can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/keyRings/{{name}}

  • {{project}}/{{location}}/{{name}}

  • {{location}}/{{name}} When using the pulumi import command, KeyRing can be imported using one of the formats above. For example:

$ pulumi import gcp:kms/keyRing:KeyRing default projects/{{project}}/locations/{{location}}/keyRings/{{name}}
$ pulumi import gcp:kms/keyRing:KeyRing default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:kms/keyRing:KeyRing default {{location}}/{{name}}

Constructors

Link copied to clipboard
constructor(location: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val location: Output<String>? = null

The location for the KeyRing. A full list of valid locations can be found by running gcloud kms locations list.

Link copied to clipboard
val name: Output<String>? = null

The resource name for the KeyRing.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Functions

Link copied to clipboard
open override fun toJava(): KeyRingArgs