Application examples

Common configurations for each application type are provided below.

Contents

  1. Example 1: Customizing per environment

Example 1: Customizing per environment

Sometimes, you might need more resources in a higher environment than in a lower one, or different permissions to AWS. Each application environment accepts a custom cpu, memory, and iam_permissions that will override the default values in the top-level of the yaml.

In the below example, the stage_environment application will get higher cpu allocation than the dev_environment (which will inherit the defaults from the top-level configuration).

awesome_app_1:             # <-- resource_label
  name: awesome-app-1      # <-- only alphanumeric and hyphens allowed
  type: app
  subtype: server
  port: 8080
  cpu: 512                 # <-- custom cpu, applied to all environments by default
  health_check_path: /
  environments:
    - environment: dev_environment      # <-- environment resource_label
      group: preprod_group              # <-- group resource_label for the group the dev_environment belongs to
    - environment: stage_environment    # <-- environment resource_label
      group: preprod_group              # <-- group resource_label for the group the stage_environment belongs to
      cpu: 1024                         # <-- in the stage_environment, the cpu (defined at 512 above) will instead be set to 1024 (1 vCPU)