SecretVersion

Example Usage

Secret Version Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
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 secret_basic = new Secret("secret-basic", SecretArgs.builder()
.secretId("secret-version")
.labels(Map.of("label", "my-label"))
.replication(SecretReplicationArgs.builder()
.automatic(true)
.build())
.build());
var secret_version_basic = new SecretVersion("secret-version-basic", SecretVersionArgs.builder()
.secret(secret_basic.id())
.secretData("secret-data")
.build());
}
}

Import

SecretVersion can be imported using any of these accepted formats

$ pulumi import gcp:secretmanager/secretVersion:SecretVersion default projects/{{project}}/secrets/{{secret_id}}/versions/{{version}}

Properties

Link copied to clipboard
val createTime: Output<String>

The time at which the Secret was created.

Link copied to clipboard
val destroyTime: Output<String>

The time at which the Secret was destroyed. Only present if state is DESTROYED.

Link copied to clipboard
val enabled: Output<Boolean>?

The current state of the SecretVersion.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The resource name of the SecretVersion. Format: projects/{{project}}/secrets/{{secret_id}}/versions/{{version}}

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val secret: Output<String>

Secret Manager secret resource

Link copied to clipboard
val secretData: Output<String>

The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

The version of the Secret.