Skip to content

googleSecretManagerSecretVersionAccess

Get the value from a Secret Manager secret version. This is similar to the google_secret_manager_secret_version datasource, but it only requires the Secret Manager Secret Accessor role. For more information see the official documentation and API.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataGoogleSecretManagerSecretVersionAccess.DataGoogleSecretManagerSecretVersionAccess(
  this,
  "basic",
  {
    secret: "my-secret",
  }
);

Argument Reference

The following arguments are supported:

  • project - (Optional) The project to get the secret version for. If it is not provided, the provider project is used.

  • secret - (Required) The secret to get the secret version for.

  • version - (Optional) The version of the secret to get. If it is not provided, the latest version is retrieved.

Attributes Reference

The following attributes are exported:

  • secretData - The secret data. No larger than 64KiB.

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