Skip to content
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

Enforce unique CloudFormation stack names #115

Open
fnesveda opened this issue May 22, 2024 · 0 comments
Open

Enforce unique CloudFormation stack names #115

fnesveda opened this issue May 22, 2024 · 0 comments
Labels
bug Something isn't working. good first issue Good for newcomers. infrastructure Issues related to infrastructure or CI/CD pipeline. medium priority Medium priority issues to be done in a couple of sprints. t-platform Issues with this label are in the ownership of the platform team.

Comments

@fnesveda
Copy link
Member

fnesveda commented May 22, 2024

NOTE: this could be a good first task for a new DevOps engineer.

To prevent issues with overriding CloudFormation stacks because of a naming conflict, we need to ensure that the CloudFormation stacks have unique names.

This would be hard to enforce directly across the whole GitHub organizations, but we can split it into two parts:

  • make sure that the stack names are prefixed with the repo that is trying to deploy them
  • make sure that the stack names are unique in the repository

We could even make sure that the stack names contain the environment that they're being deployed to, and that they're being deployed to the right environment according to the name.

So there would be stack names like:

  • apify-core-org-s3-buckets
  • apify-web-member-iam-roles

TBD: should the environments be called org and member, or org, prod and staging?

Unfortunately, CloudFormation doesn't let you rename existing stacks, so we'll have to have some option to opt-out of these names for legacy stacks. We should not allow new stacks to be created with the wrong names, though. Maybe, if the legacy stack name is in the wrong format and the repo and account can't be inferred automatically, we could even have a mapping of stack name -> repo & AWS account that would verify that the stacks are being deployed to the correct account.

@fnesveda fnesveda added the t-platform Issues with this label are in the ownership of the platform team. label May 22, 2024
@fnesveda fnesveda added medium priority Medium priority issues to be done in a couple of sprints. bug Something isn't working. infrastructure Issues related to infrastructure or CI/CD pipeline. and removed medium priority Medium priority issues to be done in a couple of sprints. labels May 29, 2024
@fnesveda fnesveda added the good first issue Good for newcomers. label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. good first issue Good for newcomers. infrastructure Issues related to infrastructure or CI/CD pipeline. medium priority Medium priority issues to be done in a couple of sprints. t-platform Issues with this label are in the ownership of the platform team.
Projects
None yet
Development

No branches or pull requests

1 participant