Skip to content

Feature: PreCondition / TemplateCondition #30

@vsmart

Description

@vsmart

Summary We need a feature PreCondition or TemplateCondition that allows for specifying a condition on a resource being included in template building.

Use Case: We currently use Condition: NotInChina for resources that are not applicable to China.

This breaks for resources that are not at all available in China, e.g. KMS.
The template is validated before any conditions are applied, which fails if the resource does not exist in AWS-CN. We need a condition that removes these resources before sending it to CFN.

Example:

KmsAccess: {
   Action: ‘Kms:Decrypt’,
   Effect: ‘Allow’, 
   Resource: ‘kms:keys:*’, 
   PreCondition: ‘NotInChina’
}

The resource should be removed from the template object, before being submitted to Cloudformation.

This may require a change in /cfn-config also, since cloudfriend itself is region/deploy-agnostic I think.

cc @mapbox/platform

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions