Skip to content

Commit

Permalink
- Added resource group name to ACM botostack names.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitwater committed Apr 22, 2021
1 parent 75e08dd commit b3e6849
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/paco/stack/botostack.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def get_status(self):

def get_name(self):
"Name of the Stack in AWS"
name = '-'.join([ self.grp_ctx.get_aws_name(), self.resource.name ])
ref_parts = self.resource.paco_ref_parts.split('.')
if ref_parts[-2] == 'resources':
group_name = ref_parts[-3]
name = '-'.join([ self.grp_ctx.get_aws_name(), group_name, self.resource.name ])
if self.stack_suffix != None:
name = name + '-' + self.stack_suffix
new_name = self.create_stack_name(name)
Expand Down
2 changes: 2 additions & 0 deletions src/paco/stack/botostacks/acm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def provision(self):
cert_arn = acm_client.get_certificate_arn()
if cert_arn == None:
action = 'Create'
elif self.paco_ctx.nocache == True:
action = 'Update'
else:
action = 'Cache'
self.paco_ctx.log_action_col(
Expand Down
2 changes: 0 additions & 2 deletions src/paco/stack/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,6 @@ def gen_cache_id(self):
def is_stack_cached(self):
"Return True if the stack cache id is the same as a previously applied cache id"
if self.paco_ctx.nocache or self.do_not_cache:
#return False
# XXX: Make this work
if self.dependency_group == True:
self.get_status()
if self.status == StackStatus.DOES_NOT_EXIST:
Expand Down

0 comments on commit b3e6849

Please sign in to comment.