Documentation ¶
Overview ¶
Package override defines functionality to interact with the "overrides/" directory for accessing and mutating the Copilot generated AWS CloudFormation templates.
Index ¶
Constants ¶
const (
YAMLPatchFile = "cfn.patches.yml" // YAMLPatchFile is the name of the YAML patch override file.
)
Variables ¶
This section is empty.
Functions ¶
func ScaffoldWithCDK ¶
ScaffoldWithCDK bootstraps a CDK application under dir/ to override the seed CloudFormation resources. If the directory is not empty, then returns an error.
Types ¶
type CDK ¶
type CDK struct {
// contains filtered or unexported fields
}
CDK is an Overrider that can transform a CloudFormation template with the Cloud Development Kit.
type CDKOpts ¶
type CDKOpts struct { ExecWriter io.Writer // Writer to forward stdout and stderr writes from os/exec calls. If nil default to io.Discard. FS afero.Fs // File system interface. If nil, defaults to the OS file system. EnvVars map[string]string // Environment variables key value pairs to pass to the "cdk synth" command. LookPathFn func(executable string) (string, error) // Search for the executable under $PATH. Defaults to exec.LookPath. CommandFn func(name string, args ...string) *exec.Cmd // Create a new executable command. Defaults to exec.Command rooted at the overrides/ dir. }
CDKOpts is optional configuration for initializing a CDK Overrider.
type ErrNotExist ¶
type ErrNotExist struct {
// contains filtered or unexported fields
}
ErrNotExist occurs when the path of the file associated with an Overrider does not exist.
func (*ErrNotExist) Error ¶
func (err *ErrNotExist) Error() string
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info holds metadata about an overrider.
func Lookup ¶
Lookup returns information indicating if the overrider is a CDK application or YAML Patches. If path does not exist, then return an ErrNotExist. If path is a directory that contains cfn.patches.yml, then IsYAMLPatch evaluates to true. If path is a directory that contains a cdk.json file, then IsCDK evaluates to true.
func (Info) IsYAMLPatch ¶
IsYAMLPatch returns true if the overrider is a YAML patch document.
type Patch ¶ added in v1.27.0
type Patch struct {
// contains filtered or unexported fields
}
Patch applies overrides configured as JSON Patches, as defined in https://www.rfc-editor.org/rfc/rfc6902.