8000 Add Tags to ECR Repository definition by patrickdean · Pull Request #1444 · cloudtools/troposphere · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Tags to ECR Repository definition #1444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/test_ecr.py
8000
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import unittest
from troposphere import Tags
import troposphere.ecr as ecr


class TestECS(unittest.TestCase):

def test_ecr_with_tags(self):
repo = ecr.Repository(
"ECRRepo",
RepositoryName="myrepo",
Tags=Tags(Name='myrepo'),
)
repo.to_dict()
3 changes: 2 additions & 1 deletion troposphere/ecr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import AWSObject, AWSProperty
from . import AWSObject, AWSProperty, Tags
try:
from awacs.aws import Policy
policytypes = (dict, Policy)
Expand All @@ -20,4 +20,5 @@ class Repository(AWSObject):
'LifecyclePolicy': (LifecyclePolicy, False),
'RepositoryName': (basestring, False),
'RepositoryPolicyText': (policytypes, False),
'Tags': (Tags, False),
}
0