Google Secret Manager Secret
This page shows how to write Terraform for Secret Manager Secret and write them securely.
google_secret_manager_secret (Terraform)
The Secret in Secret Manager can be configured in Terraform with the resource name google_secret_manager_secret
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_secret_manager_secret" "manual_mystudies_email_address" {
provider = google-beta
secret_id = "manual-mystudies-email-address"
project = module.project.project_id
resource "google_secret_manager_secret" "manual_mystudies_email_address" {
provider = google-beta
secret_id = "manual-mystudies-email-address"
project = module.project.project_id
resource "google_secret_manager_secret" "manual_mystudies_email_address" {
provider = google-beta
secret_id = "manual-mystudies-email-address"
project = module.project.project_id
resource "google_secret_manager_secret" "manual_mystudies_email_address" {
provider = google-beta
secret_id = "manual-mystudies-email-address"
project = module.project.project_id
resource "google_secret_manager_secret" "manual_mystudies_email_address" {
provider = google-beta
secret_id = "manual-mystudies-email-address"
project = module.project.project_id
Parameters
-
create_time
optional computed - string
The time at which the Secret was created.
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [p[Ll]p[Lo]][p[Ll]p[Lo]p[N]_-][0,62] Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [p[Ll]p[Lo]p[N]_-][0,63] No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: [ "name": "wrench", "mass": "1.3kg", "count": "3" ].
-
name
optional computed - string
The resource name of the Secret. Format: 'projects/[[project]]/secrets/[[secret_id]]'
This must be unique within the project.
-
replication
list block-
automatic
optional - bool
The Secret will automatically be replicated without any restrictions.
-
user_managed
list block
-
-
timeouts
single block
Explanation in Terraform Registry
A Secret is a logical secret whose value and versions can be accessed. To get more information about Secret, see:
Frequently asked questions
What is Google Secret Manager Secret?
Google Secret Manager Secret is a resource for Secret Manager of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google Secret Manager Secret?
For Terraform, the nseblu/elo-mystudies, GoogleCloudPlatform/fda-mystudies and Simsulation/budstudies source code examples are useful. See the Terraform Example section for further details.