I want to create an Amazon certificate using cloudformation in different region.
Resources:
MyCertificate:
Type: 'AWS::CertificateManager::Certificate'
Properties:
DomainName: <http://abcd.com|abcd.com>
ValidationMethod: DNS
Tags:
- Key: Name
Value: MyCertificate```
Can I mention region into above cfn code, so that I don't need to mention it in cli command?
Resources:
MyCertificate1:
Type: 'AWS::CertificateManager::Certificate'
Condition: stageName1
Properties:
DomainName: <http://abcd.com|abcd.com>
ValidationMethod: DNS
Tags:
- Key: Name
Value: MyCertificate1
MyCertificate2:
Type: 'AWS::CertificateManager::Certificate'
Condition: stageName2
Properties:
DomainName: <http://abcd.com|abcd.com>
ValidationMethod: DNS
Tags:
- Key: Name
Value: MyCertificate2```
So I want to create MyCertificate1 in one region and MyCertificate2 in another. I don't want to add multiple conditions(combination of stage name & region name) to satisfy Condition.
stacks are deployed in one region at a time. so to create a certificate in multiple regions, you need to create the stack in multiple regions. how you do that depends on your deployment method - CLI: run two commands instead of one; CodePipeline: provide the region parameter; etc