secretsmanager

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2025 License: MPL-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// The Google Cloud project ID where the secret is stored.
	ProjectId string `mapstructure:"project_id" required:"true"`

	// The name of the secret in the secret manager.
	Name string `mapstructure:"name" required:"true"`

	// The key to extract from the secret payload.
	// If not provided, the entire payload will be returned.
	Key string `mapstructure:"key"`

	// The version of the secret to access. Defaults to "latest" if not specified.
	Version string `mapstructure:"version"`

	// Specify the GCP universe to deploy in. The default is "googleapis.com".
	UniverseDomain string `mapstructure:"universe_domain"`
	// Custom service endpoints, typically used to configure the Google provider to
	// communicate with GCP-like APIs such as the Cloud Functions emulator.
	//  Supported keys are `secretmanager`.
	//
	// Example:
	//   custom_endpoints = {
	//     secretmanager = "https://{your-endpoint}/"
	//   }
	//
	CustomEndpoints map[string]string `mapstructure:"custom_endpoints"`
}

func (*Config) FlatMapstructure

func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type Datasource

type Datasource struct {
	// contains filtered or unexported fields
}

func (*Datasource) ConfigSpec

func (d *Datasource) ConfigSpec() hcldec.ObjectSpec

func (*Datasource) Configure

func (d *Datasource) Configure(raws ...interface{}) error

func (*Datasource) Execute

func (d *Datasource) Execute() (cty.Value, error)

func (*Datasource) OutputSpec

func (d *Datasource) OutputSpec() hcldec.ObjectSpec

type DatasourceOutput

type DatasourceOutput struct {
	// The raw string payload of the secret version.
	Payload string `mapstructure:"payload"`

	// The value extracted using the 'key', if provided.
	Value string `mapstructure:"value"`

	// The crc32c checksum for the payload.
	Checksum int64 `mapstructure:"checksum"`
}

func (*DatasourceOutput) FlatMapstructure

func (*DatasourceOutput) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatDatasourceOutput. FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type FlatConfig

type FlatConfig struct {
	ProjectId       *string           `mapstructure:"project_id" required:"true" cty:"project_id" hcl:"project_id"`
	Name            *string           `mapstructure:"name" required:"true" cty:"name" hcl:"name"`
	Key             *string           `mapstructure:"key" cty:"key" hcl:"key"`
	Version         *string           `mapstructure:"version" cty:"version" hcl:"version"`
	UniverseDomain  *string           `mapstructure:"universe_domain" cty:"universe_domain" hcl:"universe_domain"`
	CustomEndpoints map[string]string `mapstructure:"custom_endpoints" cty:"custom_endpoints" hcl:"custom_endpoints"`
}

FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConfig) HCL2Spec

func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Config. This spec is used by HCL to read the fields of Config. The decoded values from this spec will then be applied to a FlatConfig.

type FlatDatasourceOutput

type FlatDatasourceOutput struct {
	Payload  *string `mapstructure:"payload" cty:"payload" hcl:"payload"`
	Value    *string `mapstructure:"value" cty:"value" hcl:"value"`
	Checksum *int64  `mapstructure:"checksum" cty:"checksum" hcl:"checksum"`
}

FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatDatasourceOutput) HCL2Spec

func (*FlatDatasourceOutput) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a DatasourceOutput. This spec is used by HCL to read the fields of DatasourceOutput. The decoded values from this spec will then be applied to a FlatDatasourceOutput.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL