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
Summary We need a feature
PreConditionorTemplateConditionthat allows for specifying a condition on a resource being included in template building.Use Case: We currently use
Condition: NotInChinafor 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:
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