package secret

import "github.com/oslokommune/okctl/pkg/cfn/components/secret"

Package secret knows how to build secrets manager secrets

Index

Types

type Opts

type Opts struct {
	FriendlyName         string
	SecretStringTemplate string
	GenerateStringKey    string
}

Opts contains the required inputs

type Secret

type Secret struct {
	StoredName string
	Opts       Opts
}

Secret contains all state required for building the cloud formation resource and outputs

func New

func New(resourceName string, opts Opts) *Secret

New returns an initialised cloud formation secret - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html

func NewRDSInstanceSecret

func NewRDSInstanceSecret(resourceName, friendlyName, userName string) *Secret

NewRDSInstanceSecret returns an initialised cloud formation secret compatible with RDSInstance

func (*Secret) Name

func (s *Secret) Name() string

Name returns the name of the cloud formation resource

func (*Secret) NamedOutputs

func (s *Secret) NamedOutputs() map[string]cloudformation.Output

NamedOutputs returns the outputs commonly used by other stacks or components

func (*Secret) Ref

func (s *Secret) Ref() string

Ref returns a cloud formation intrinsic ref to the resource

func (*Secret) Resource

func (s *Secret) Resource() cloudformation.Resource

Resource returns the cloud formation resource for a SecretsManager secret

Source Files

secret.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
4 packages
Last checked
1 day ago

Tools for package owners.