-
Notifications
You must be signed in to change notification settings - Fork 122
chore: updating prod template to remove resources and abstract ones #354
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
Changes from 4 commits
524842a
746ee3e
83fb8fd
fc2ae56
87be1ad
35b1b7d
b49aad9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -107,8 +107,7 @@ Resources: | |||
{ | ||||
"Effect": "Allow", | ||||
"Resource": [ | ||||
"arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/${ProjectName}-test-release", | ||||
"arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/${ProjectName}-prod-release", | ||||
"arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/${ProjectName}-release-prod", | ||||
"arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/${ProjectName}" | ||||
], | ||||
"Action": [ | ||||
|
@@ -133,10 +132,8 @@ Resources: | |||
"Resource": [ | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}", | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}:*", | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}-test-release", | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}-test-release:*", | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}-prod-release", | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}-prod-release:*" | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}-release-prod", | ||||
"arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${ProjectName}-release-prod:*" | ||||
], | ||||
"Action": [ | ||||
"logs:CreateLogGroup", | ||||
|
@@ -176,14 +173,14 @@ Resources: | |||
Type: "AWS::SSM::Parameter" | ||||
Properties: | ||||
Description: Parameter to store our account id so CodeBuild specs can access it | ||||
Name: /CodeBuild/AccountId | ||||
Name: /CodeBuild/Account | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These need to match this:
which is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a little weird, shouldn't this have been caught in the stack creation process? or would this be a case where it would detect a drift. I'll go ahead and change it so they match. The name was causing it to not create the stack, and changing it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohh... then nevermind. The name already exists, right? Because we have been using it. The only thing is that while Here, we have a problem where the CI and release automation (RA) share a resource. Ok. So... now I have more questions that I hope will lead us to the best outcome.
I am sorry to say that I do not know the answer these questions. |
||||
Type: String | ||||
Value: !Sub "${AWS::AccountId}" | ||||
SecretsManagerPolicy: | ||||
Type: "AWS::IAM::ManagedPolicy" | ||||
Properties: | ||||
ManagedPolicyName: !Sub "CryptoTools-SecretsManager-${ProjectName}-release" | ||||
Path: /service-role/ | ||||
Path: "/service-role/" | ||||
PolicyDocument: !Sub | | ||||
{ | ||||
"Version": "2012-10-17", | ||||
|
@@ -192,8 +189,7 @@ Resources: | |||
"Effect": "Allow", | ||||
"Resource": [ | ||||
"arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Maven-GPG-Keys-GC6h0A", | ||||
"arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Sonatype-Team-Account-0tWvZm", | ||||
"arn:aws:secretsmanager:us-west-2:587316601012:secret:Maven-GPG-Keys-Credentials-C0wCzI", | ||||
"arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Sonatype-Team-Account-0tWvZm" | ||||
], | ||||
"Action": "secretsmanager:GetSecretValue" | ||||
} | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to make another template for test-release?
There would be much repeated code... I would favor 1 template/stack having both projects as compared to a stack per project.
Then the projects can share policy documents. Otherwise, you would have to repeat your policy documents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this offline, but just to document it here. The plan is to have just one project for both test-release and prod-release called release-prod.