logoStacktape docs




Overrides

Stacktape resources are made of multiple different underyling AWS Cloudformation resources. Overrides allow you to configure properties of these underlying Cloudformation resources.

  • To list all Cloudformation resources contained within a Stacktape resource, use describe-resources command.

Overriding example

Consider the following Stacktape template file named stacktape.yml

  • In the template file, we are using override to change which ECS cluster is used for our container-workload ECS service.

serviceName: my-stack
resources:
myContainer:
type: 'container-workload'
properties:
containers:
- name: myContainer
imageConfig:
filePath: containers/ts-container.ts
resources:
cpu: 0.25
memory: 512
overrides:
Service:
Cluster: 'my-custom-cluster-to-use'
smallPostgres:
type: 'relational-database'
properties:
credentials:
masterUserName: alexandro
masterUserPassword: <<my-secret-pass>>
engine:
type: postgres
properties:
port: 5432
storage:
diskSizeGB: 20
instance:
dbInstanceSize: db.t3.micro

Describe-resources command

describe-resources command:

  • prints an overview of resources specified in the Stacktape template file
  • prints all underlying Cloudformation resources which are part of the Stacktape resources.

Example: following command

stacktape describe-resources --stage my-stage --configPath stacktape.yml --region eu-west-1

used with the template shown above in the overriding example section, the output would look like this:

Output of describe-resources command
Output of describe-resources command

  • The output shows resource myContainer as well as the underlying Cloudformation resources. We can also see the Service Cloudformation resource on which we used an override in overriding example.
  • When referencing a resource in an override, use its descriptive name.
  • To see full reference of the describe-resources command see describe-resources command page.