cloudtools / cloudtools/stacker

Bug: stack names should not be lowercased

Open
#626 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
707
Forks
162
PR merge metrics
No merged PRs in 30d

Description

This sounds a bit nit picky but we ran into this today when trying to deploy a stack. The problem is that we are deploying to an account where we're forced to use a cloudformation service role.

https://stacker.readthedocs.io/en/latest/config.html?highlight=service_role#service-role

The service role forces us to use certain resource prefixes, and unfortunately we currently have a policy that restricts stack names using camel case of `StcEcs` for our project team.

This is our setup (snippets of..)

conf.env

`namespace: StcEcs`

stacker.yaml

```
stacks:
- name: teamcityAgentWindows
```

Actual Log Output

```
[2018-07-10T14:04:38] Using interactive AWS provider mode.
[2018-07-10T14:04:38] Tailing stack: stcecs-teamcityAgentWindows
~
[2018-07-10T14:04:39] An error occurred (AccessDenied) when calling the CreateStack operation: User: arn:aws:sts:::assumed-role/ADFS-OpsSupport-StcEcs/ is not authorized to perform: cloudformation:CreateStack on resource: arn:aws:cloudformation:us-west-2::stack/stcecs-teamcityAgentWindows/*
```

Expected log Output

`Tailing stack: StcEcs-teamcityAgentWindows`

MikeB on slack helped me locate where this was happening. This is where it's being lowercased.

https://github.com/cloudtools/stacker/blob/1cb24aa1a596261d533a5dfc4536757a3743b6ab/stacker/context.py#L116

Suggested fix: Lowercase the bucket, but don't lowercase anything that isn't bucket related.. and keep the upper casing.

Considerations would be existing stacks that are deployed and named with lower casing. We should probably not change the case in an existing stack, but new stacks could use the upper case.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.