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-stackresources:myContainer:type: 'container-workload'properties:containers:- name: myContainerimageConfig:filePath: containers/ts-container.tsresources:cpu: 0.25memory: 512overrides:Service:Cluster: 'my-custom-cluster-to-use'smallPostgres:type: 'relational-database'properties:credentials:masterUserName: alexandromasterUserPassword: <<my-secret-pass>>engine:type: postgresproperties:port: 5432storage:diskSizeGB: 20instance: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:
- The output shows resource
myContainer
as well as the underlying Cloudformation resources. We can also see theService
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.