forked from cloudtools/troposphere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AWS Certificate Manager (cloudtools#538)
* Add support for AWS Certificate Manager * Add AWS Certificate Manager example * Add AWS Certificate Manager example output
- Loading branch information
1 parent
b330529
commit 33095a0
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from troposphere import Template | ||
from troposphere.certificatemanager import Certificate, DomainValidationOption | ||
|
||
|
||
t = Template() | ||
|
||
t.add_resource( | ||
Certificate( | ||
'mycert', | ||
DomainName='example.com', | ||
DomainValidationOptions=[ | ||
DomainValidationOption( | ||
DomainName='example.com', | ||
ValidationDomain='example.com', | ||
), | ||
], | ||
) | ||
) | ||
|
||
print(t.to_json()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"Resources": { | ||
"mycert": { | ||
"Properties": { | ||
"DomainName": "example.com", | ||
"DomainValidationOptions": [ | ||
{ | ||
"DomainName": "example.com", | ||
"ValidationDomain": "example.com" | ||
} | ||
] | ||
}, | ||
"Type": "AWS::CertificateManager::Certificate" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from . import AWSObject, AWSProperty | ||
|
||
|
||
class DomainValidationOption(AWSProperty): | ||
props = { | ||
'DomainName': (basestring, True), | ||
'ValidationDomain': (basestring, True), | ||
} | ||
|
||
|
||
class Certificate(AWSObject): | ||
resource_type = "AWS::CertificateManager::Certificate" | ||
|
||
props = { | ||
'DomainName': (basestring, True), | ||
'DomainValidationOptions': ([DomainValidationOption], False), | ||
'SubjectAlternativeNames': ([basestring], False), | ||
} |