Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi
gcp.secretmanager.getRegionalSecrets
Explore with Pulumi AI
Use this data source to list the Secret Manager Regional Secrets.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const secrets = gcp.secretmanager.getRegionalSecrets({
    location: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
secrets = gcp.secretmanager.get_regional_secrets(location="us-central1")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := secretmanager.GetRegionalSecrets(ctx, &secretmanager.GetRegionalSecretsArgs{
			Location: "us-central1",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var secrets = Gcp.SecretManager.GetRegionalSecrets.Invoke(new()
    {
        Location = "us-central1",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.SecretmanagerFunctions;
import com.pulumi.gcp.secretmanager.inputs.GetRegionalSecretsArgs;
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) {
        final var secrets = SecretmanagerFunctions.getRegionalSecrets(GetRegionalSecretsArgs.builder()
            .location("us-central1")
            .build());
    }
}
variables:
  secrets:
    fn::invoke:
      function: gcp:secretmanager:getRegionalSecrets
      arguments:
        location: us-central1
Using getRegionalSecrets
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRegionalSecrets(args: GetRegionalSecretsArgs, opts?: InvokeOptions): Promise<GetRegionalSecretsResult>
function getRegionalSecretsOutput(args: GetRegionalSecretsOutputArgs, opts?: InvokeOptions): Output<GetRegionalSecretsResult>def get_regional_secrets(filter: Optional[str] = None,
                         location: Optional[str] = None,
                         project: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetRegionalSecretsResult
def get_regional_secrets_output(filter: Optional[pulumi.Input[str]] = None,
                         location: Optional[pulumi.Input[str]] = None,
                         project: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetRegionalSecretsResult]func GetRegionalSecrets(ctx *Context, args *GetRegionalSecretsArgs, opts ...InvokeOption) (*GetRegionalSecretsResult, error)
func GetRegionalSecretsOutput(ctx *Context, args *GetRegionalSecretsOutputArgs, opts ...InvokeOption) GetRegionalSecretsResultOutput> Note: This function is named GetRegionalSecrets in the Go SDK.
public static class GetRegionalSecrets 
{
    public static Task<GetRegionalSecretsResult> InvokeAsync(GetRegionalSecretsArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionalSecretsResult> Invoke(GetRegionalSecretsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRegionalSecretsResult> getRegionalSecrets(GetRegionalSecretsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:secretmanager/getRegionalSecrets:getRegionalSecrets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Location string
 - The location of the regional secret.
 - Filter string
 - Filter string, adhering to the rules in List-operation filtering. List only secrets matching the filter. If filter is empty, all regional secrets are listed from the specified location.
 - Project string
 - The ID of the project.
 
- Location string
 - The location of the regional secret.
 - Filter string
 - Filter string, adhering to the rules in List-operation filtering. List only secrets matching the filter. If filter is empty, all regional secrets are listed from the specified location.
 - Project string
 - The ID of the project.
 
- location String
 - The location of the regional secret.
 - filter String
 - Filter string, adhering to the rules in List-operation filtering. List only secrets matching the filter. If filter is empty, all regional secrets are listed from the specified location.
 - project String
 - The ID of the project.
 
- location string
 - The location of the regional secret.
 - filter string
 - Filter string, adhering to the rules in List-operation filtering. List only secrets matching the filter. If filter is empty, all regional secrets are listed from the specified location.
 - project string
 - The ID of the project.
 
- location str
 - The location of the regional secret.
 - filter str
 - Filter string, adhering to the rules in List-operation filtering. List only secrets matching the filter. If filter is empty, all regional secrets are listed from the specified location.
 - project str
 - The ID of the project.
 
- location String
 - The location of the regional secret.
 - filter String
 - Filter string, adhering to the rules in List-operation filtering. List only secrets matching the filter. If filter is empty, all regional secrets are listed from the specified location.
 - project String
 - The ID of the project.
 
getRegionalSecrets Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Location string
 - The location in which the resource belongs.
 - Project string
 - The ID of the project in which the resource belongs.
 - Secrets
List<Get
Regional Secrets Secret>  - A list of regional secrets present in the specified location and matching the filter. Structure is defined below.
 - Filter string
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Location string
 - The location in which the resource belongs.
 - Project string
 - The ID of the project in which the resource belongs.
 - Secrets
[]Get
Regional Secrets Secret  - A list of regional secrets present in the specified location and matching the filter. Structure is defined below.
 - Filter string
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - location String
 - The location in which the resource belongs.
 - project String
 - The ID of the project in which the resource belongs.
 - secrets
List<Get
Regional Secrets Secret>  - A list of regional secrets present in the specified location and matching the filter. Structure is defined below.
 - filter String
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - location string
 - The location in which the resource belongs.
 - project string
 - The ID of the project in which the resource belongs.
 - secrets
Get
Regional Secrets Secret[]  - A list of regional secrets present in the specified location and matching the filter. Structure is defined below.
 - filter string
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - location str
 - The location in which the resource belongs.
 - project str
 - The ID of the project in which the resource belongs.
 - secrets
Sequence[Get
Regional Secrets Secret]  - A list of regional secrets present in the specified location and matching the filter. Structure is defined below.
 - filter str
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - location String
 - The location in which the resource belongs.
 - project String
 - The ID of the project in which the resource belongs.
 - secrets List<Property Map>
 - A list of regional secrets present in the specified location and matching the filter. Structure is defined below.
 - filter String
 
Supporting Types
GetRegionalSecretsSecret   
- Annotations Dictionary<string, string>
 - Custom metadata about the regional secret.
 - Create
Time string - The time at which the regional secret was created.
 - Customer
Managed List<GetEncryptions Regional Secrets Secret Customer Managed Encryption>  - Customer Managed Encryption for the regional secret. Structure is documented below.
 - Effective
Annotations Dictionary<string, string> - Effective
Labels Dictionary<string, string> - Expire
Time string - Timestamp in UTC when the regional secret is scheduled to expire.
 - Labels Dictionary<string, string>
 - The labels assigned to this regional secret.
 - Location string
 - The location of the regional secret.
 - Name string
 - The resource name of the Pub/Sub topic that will be published to.
 - Project string
 - The ID of the project.
 - Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
 - Rotations
List<Get
Regional Secrets Secret Rotation>  - The rotation time and period for a regional secret. Structure is documented below.
 - Secret
Id string - The unique name of the resource.
 - Topics
List<Get
Regional Secrets Secret Topic>  - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
 - Ttl string
 - The TTL for the regional secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
 - Version
Aliases Dictionary<string, string> - Mapping from version alias to version name.
 - Version
Destroy stringTtl  - The version destroy ttl for the regional secret version.
 
- Annotations map[string]string
 - Custom metadata about the regional secret.
 - Create
Time string - The time at which the regional secret was created.
 - Customer
Managed []GetEncryptions Regional Secrets Secret Customer Managed Encryption  - Customer Managed Encryption for the regional secret. Structure is documented below.
 - Effective
Annotations map[string]string - Effective
Labels map[string]string - Expire
Time string - Timestamp in UTC when the regional secret is scheduled to expire.
 - Labels map[string]string
 - The labels assigned to this regional secret.
 - Location string
 - The location of the regional secret.
 - Name string
 - The resource name of the Pub/Sub topic that will be published to.
 - Project string
 - The ID of the project.
 - Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
 - Rotations
[]Get
Regional Secrets Secret Rotation  - The rotation time and period for a regional secret. Structure is documented below.
 - Secret
Id string - The unique name of the resource.
 - Topics
[]Get
Regional Secrets Secret Topic  - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
 - Ttl string
 - The TTL for the regional secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
 - Version
Aliases map[string]string - Mapping from version alias to version name.
 - Version
Destroy stringTtl  - The version destroy ttl for the regional secret version.
 
- annotations Map<String,String>
 - Custom metadata about the regional secret.
 - create
Time String - The time at which the regional secret was created.
 - customer
Managed List<GetEncryptions Regional Secrets Secret Customer Managed Encryption>  - Customer Managed Encryption for the regional secret. Structure is documented below.
 - effective
Annotations Map<String,String> - effective
Labels Map<String,String> - expire
Time String - Timestamp in UTC when the regional secret is scheduled to expire.
 - labels Map<String,String>
 - The labels assigned to this regional secret.
 - location String
 - The location of the regional secret.
 - name String
 - The resource name of the Pub/Sub topic that will be published to.
 - project String
 - The ID of the project.
 - pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
 - rotations
List<Get
Regional Secrets Secret Rotation>  - The rotation time and period for a regional secret. Structure is documented below.
 - secret
Id String - The unique name of the resource.
 - topics
List<Get
Regional Secrets Secret Topic>  - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
 - ttl String
 - The TTL for the regional secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
 - version
Aliases Map<String,String> - Mapping from version alias to version name.
 - version
Destroy StringTtl  - The version destroy ttl for the regional secret version.
 
- annotations {[key: string]: string}
 - Custom metadata about the regional secret.
 - create
Time string - The time at which the regional secret was created.
 - customer
Managed GetEncryptions Regional Secrets Secret Customer Managed Encryption[]  - Customer Managed Encryption for the regional secret. Structure is documented below.
 - effective
Annotations {[key: string]: string} - effective
Labels {[key: string]: string} - expire
Time string - Timestamp in UTC when the regional secret is scheduled to expire.
 - labels {[key: string]: string}
 - The labels assigned to this regional secret.
 - location string
 - The location of the regional secret.
 - name string
 - The resource name of the Pub/Sub topic that will be published to.
 - project string
 - The ID of the project.
 - pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
 - rotations
Get
Regional Secrets Secret Rotation[]  - The rotation time and period for a regional secret. Structure is documented below.
 - secret
Id string - The unique name of the resource.
 - topics
Get
Regional Secrets Secret Topic[]  - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
 - ttl string
 - The TTL for the regional secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
 - version
Aliases {[key: string]: string} - Mapping from version alias to version name.
 - version
Destroy stringTtl  - The version destroy ttl for the regional secret version.
 
- annotations Mapping[str, str]
 - Custom metadata about the regional secret.
 - create_
time str - The time at which the regional secret was created.
 - customer_
managed_ Sequence[Getencryptions Regional Secrets Secret Customer Managed Encryption]  - Customer Managed Encryption for the regional secret. Structure is documented below.
 - effective_
annotations Mapping[str, str] - effective_
labels Mapping[str, str] - expire_
time str - Timestamp in UTC when the regional secret is scheduled to expire.
 - labels Mapping[str, str]
 - The labels assigned to this regional secret.
 - location str
 - The location of the regional secret.
 - name str
 - The resource name of the Pub/Sub topic that will be published to.
 - project str
 - The ID of the project.
 - pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
 - rotations
Sequence[Get
Regional Secrets Secret Rotation]  - The rotation time and period for a regional secret. Structure is documented below.
 - secret_
id str - The unique name of the resource.
 - topics
Sequence[Get
Regional Secrets Secret Topic]  - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
 - ttl str
 - The TTL for the regional secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
 - version_
aliases Mapping[str, str] - Mapping from version alias to version name.
 - version_
destroy_ strttl  - The version destroy ttl for the regional secret version.
 
- annotations Map<String>
 - Custom metadata about the regional secret.
 - create
Time String - The time at which the regional secret was created.
 - customer
Managed List<Property Map>Encryptions  - Customer Managed Encryption for the regional secret. Structure is documented below.
 - effective
Annotations Map<String> - effective
Labels Map<String> - expire
Time String - Timestamp in UTC when the regional secret is scheduled to expire.
 - labels Map<String>
 - The labels assigned to this regional secret.
 - location String
 - The location of the regional secret.
 - name String
 - The resource name of the Pub/Sub topic that will be published to.
 - project String
 - The ID of the project.
 - pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
 - rotations List<Property Map>
 - The rotation time and period for a regional secret. Structure is documented below.
 - secret
Id String - The unique name of the resource.
 - topics List<Property Map>
 - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
 - ttl String
 - The TTL for the regional secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
 - version
Aliases Map<String> - Mapping from version alias to version name.
 - version
Destroy StringTtl  - The version destroy ttl for the regional secret version.
 
GetRegionalSecretsSecretCustomerManagedEncryption      
- Kms
Key stringName  - Describes the Cloud KMS encryption key that will be used to protect destination secret.
 
- Kms
Key stringName  - Describes the Cloud KMS encryption key that will be used to protect destination secret.
 
- kms
Key StringName  - Describes the Cloud KMS encryption key that will be used to protect destination secret.
 
- kms
Key stringName  - Describes the Cloud KMS encryption key that will be used to protect destination secret.
 
- kms_
key_ strname  - Describes the Cloud KMS encryption key that will be used to protect destination secret.
 
- kms
Key StringName  - Describes the Cloud KMS encryption key that will be used to protect destination secret.
 
GetRegionalSecretsSecretRotation    
- Next
Rotation stringTime  - Timestamp in UTC at which the secret is scheduled to rotate.
 - Rotation
Period string - The Duration between rotation notifications.
 
- Next
Rotation stringTime  - Timestamp in UTC at which the secret is scheduled to rotate.
 - Rotation
Period string - The Duration between rotation notifications.
 
- next
Rotation StringTime  - Timestamp in UTC at which the secret is scheduled to rotate.
 - rotation
Period String - The Duration between rotation notifications.
 
- next
Rotation stringTime  - Timestamp in UTC at which the secret is scheduled to rotate.
 - rotation
Period string - The Duration between rotation notifications.
 
- next_
rotation_ strtime  - Timestamp in UTC at which the secret is scheduled to rotate.
 - rotation_
period str - The Duration between rotation notifications.
 
- next
Rotation StringTime  - Timestamp in UTC at which the secret is scheduled to rotate.
 - rotation
Period String - The Duration between rotation notifications.
 
GetRegionalSecretsSecretTopic    
- Name string
 - The resource name of the Pub/Sub topic that will be published to.
 
- Name string
 - The resource name of the Pub/Sub topic that will be published to.
 
- name String
 - The resource name of the Pub/Sub topic that will be published to.
 
- name string
 - The resource name of the Pub/Sub topic that will be published to.
 
- name str
 - The resource name of the Pub/Sub topic that will be published to.
 
- name String
 - The resource name of the Pub/Sub topic that will be published to.
 
Package Details
- Repository
 - Google Cloud (GCP) Classic pulumi/pulumi-gcp
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
google-betaTerraform Provider.