diff --git a/cfn-templates/cid-cfn.yml b/cfn-templates/cid-cfn.yml index 6d3deca4..f0bb620c 100644 --- a/cfn-templates/cid-cfn.yml +++ b/cfn-templates/cid-cfn.yml @@ -260,7 +260,7 @@ Conditions: NeedQuickSightDataSourceRole: Fn::And: - !Condition NeedDatasource - - [!Equals [ !Ref QuickSightDataSourceRoleName, "CidQuickSightDataSourceRole" ]] + - !Equals [ !Ref QuickSightDataSourceRoleName, "CidQuickSightDataSourceRole" ] NeedQuickSightDataSourceRoleAndCUR: Fn::And: - !Condition NeedQuickSightDataSourceRole @@ -1146,7 +1146,7 @@ Resources: DataSourceParameters: AthenaParameters: WorkGroup: !If [ NeedAthenaWorkgroup, !Ref MyAthenaWorkGroup, !Ref AthenaWorkgroup ] - RoleArn: !If [ UseQuickSightDataSourceRole, !Sub "arn:aws:iam::${AWS::AccountId}:role/${QuickSightDataSourceRole}", !Ref AWS::NoValue ] + RoleArn: !If [ UseQuickSightDataSourceRole, !Sub "arn:aws:iam::${AWS::AccountId}:role/${QuickSightDataSourceRoleName}", !Ref AWS::NoValue ] Permissions: - Actions: - 'quicksight:DescribeDataSource' diff --git a/cfn-templates/tests/test_deploy_with_permissions.py b/cfn-templates/tests/test_deploy_with_permissions.py index b5c42a2d..203ca0dc 100644 --- a/cfn-templates/tests/test_deploy_with_permissions.py +++ b/cfn-templates/tests/test_deploy_with_permissions.py @@ -228,7 +228,7 @@ def create_cid_as_finops(): logger.info('Stack created') logger.info('As Finops Creating Dashboards') - finops_cfn.create_stack( + res = finops_cfn.create_stack( StackName="Cloud-Intelligence-Dashboards", TemplateURL=upload_to_s3('cfn-templates/cid-cfn.yml'), Parameters=[ @@ -239,6 +239,7 @@ def create_cid_as_finops(): ], Capabilities=['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM'], ) + print(res) watch_stacks(admin_cfn, ["Cloud-Intelligence-Dashboards"]) logger.info('Stack created')