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

Feat/multi dashboard #2

Merged
merged 4 commits into from
Dec 11, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### vsCode ###
.vscode
**/**.code-workspace

### macOS ###
# General
Expand All @@ -17,6 +18,7 @@

**/node_modules
**/dist
**/__pycache__
**/build
**/.DS_Store
**/.angular
Expand All @@ -25,3 +27,4 @@ cdk.out
**/data/**.csv

.env
workspace/
104 changes: 63 additions & 41 deletions README.md

Large diffs are not rendered by default.

122 changes: 79 additions & 43 deletions deploy.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ Resources:
ExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Ref ExecutionRoleName
RoleName:
Ref: ExecutionRoleName
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
AWS:
- !Ref AdministratorAccountId
- Ref: AdministratorAccountId
Action:
- sts:AssumeRole
Path: /
ManagedPolicyArns:
- !Sub arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess
- Fn::Sub: arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess
72 changes: 56 additions & 16 deletions deployment/CFNStacks/deploymentAccount_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,10 @@ Parameters:
Description: Region where QuickSight assets are hosted
Type: String
Default: "us-east-1"
SrcQSAdminRegion:
Description: Admin region for your QS source account where your users are hosted
Type: String
Default: "us-east-1"
DestQSAdminRegion:
Description: Admin region for your QS destination account where your users are hosted
Type: String
Default: "us-east-1"
QSUser:
Description: QS Username in Account where the assets will be created
Type: String
AccountAdminARN:
Description: IAM ARN that will be responsible for administering the Account (it will be able to manage the created KMS key for encryption). Eg your role/user arn
Type: String
Default: role/Administrator
Stage1Name:
Description: Name of the first stage in the pipeline, e.g. DEV
Type: String
Default: DEV
Stage2Name:
Description: Name of the first stage in the pipeline, e.g. PRE
Type: String
Expand Down Expand Up @@ -146,6 +131,8 @@ Resources:
Status: Enabled
VersioningConfiguration:
Status: Enabled
WebsiteConfiguration:
IndexDocument: index.hmtl
NotificationConfiguration:
EventBridgeConfiguration:
EventBridgeEnabled: true
Expand Down Expand Up @@ -229,6 +216,7 @@ Resources:
Name:
Ref: PipelineName
PipelineType: V2
ExecutionMode: QUEUED
RoleArn:
Fn::GetAtt: CodePipelineRole.Arn
ArtifactStore:
Expand Down Expand Up @@ -295,7 +283,7 @@ Resources:
Ref: QuickSightRegion
StackSetName:
Fn::Sub: ${PipelineName}-QSSourceAssets
TemplatePath: SourceAssetsArtifact::QStemplate_CFN_SOURCE.yaml
TemplatePath: SourceAssetsArtifact::QS_assets_CFN_SOURCE.yaml
Parameters:
Fn::Sub: SourceAssetsArtifact::source_cfn_template_parameters_${Stage2Name}.txt
InputArtifacts:
Expand Down Expand Up @@ -550,6 +538,58 @@ Resources:
- Fn::Sub: "arn:aws:s3:::${PipelineS3BucketName}"
- Fn::Sub: "arn:aws:s3:::${PipelineS3BucketName}/*"
Sid: VisualEditor0
- Action:
- dynamodb:BatchGetItem
- dynamodb:BatchWriteItem
- dynamodb:ConditionCheckItem
- dynamodb:PutItem
- dynamodb:DescribeTable
- dynamodb:DeleteItem
- dynamodb:GetItem
- dynamodb:Scan
- dynamodb:Query
- dynamodb:UpdateItem
Effect: Allow
Resource:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/QSAssetParameters-${PipelineName}
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/QSTrackedAssets-${PipelineName}
paramDDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: StageName
AttributeType: S
- AttributeName: AssetType
AttributeType: S
KeySchema:
- AttributeName: StageName
KeyType: HASH
- AttributeName: AssetType
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
TableName:
Fn::Sub: QSAssetParameters-${PipelineName}

trackedAssetsTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: AssetId
AttributeType: S
- AttributeName: AssetType
AttributeType: S
KeySchema:
- AttributeName: AssetId
KeyType: HASH
- AttributeName: AssetType
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
TableName:
Fn::Sub: QSTrackedAssets-${PipelineName}
Outputs:
Codepipeline:
Description: Link to the codepipeline created to implement QuickSight CI/CD
Expand Down
Loading
Loading