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

CodeBuild: Add support for logging configuration in Project #3856

Closed
2 tasks
idm-ryou opened this issue Aug 29, 2019 · 6 comments · Fixed by #11444
Closed
2 tasks

CodeBuild: Add support for logging configuration in Project #3856

idm-ryou opened this issue Aug 29, 2019 · 6 comments · Fixed by #11444
Assignees
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p1

Comments

@idm-ryou
Copy link

🚀 Feature Request

General Information

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Description

  • There seems no way to specify a logging configuration for Project construct.

Proposed Solution

Environment

  • CDK CLI Version: 1.6.0 (build 3a0cde0)
  • Module Version: 1.6.0
  • OS: all
  • Language: all

Other information

@idm-ryou idm-ryou added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 29, 2019
@SomayaB SomayaB added @aws-cdk/aws-codebuild Related to AWS CodeBuild feature-request A feature should be added or improved. labels Sep 3, 2019
@SomayaB SomayaB removed the bug This issue is a bug. label Sep 11, 2019
@NGL321 NGL321 removed the needs-triage This issue or PR still needs to be triaged. label Oct 14, 2019
@NGL321
Copy link
Contributor

NGL321 commented Oct 14, 2019

Hi @idm-ryou,

This seems like a reasonable request!
I have confirmed that LogsConfig property exists as a property of Project in Cloudformation, and that we do not accept it as a prop.

Someone will update this issue when any progress is made.

😸

@felipeloha
Copy link

is there any workaround for this?

@skinny85 skinny85 added the effort/medium Medium work item – several days of effort label Feb 6, 2020
@logemann
Copy link

logemann commented Jun 3, 2020

is there any workaround for this?

You might check out addOverride as seen in
https://docs.aws.amazon.com/cdk/latest/guide/cfn_layer.html

I will take a look at it for the time being. And hopefully there will be a fix so that Project can get the relevant attribute.

@logemann
Copy link

logemann commented Jun 4, 2020

This worked for me:

let pipelineProject = new PipelineProject(this, "MyProject", {
...
};

const logGroup = new logs.LogGroup(this, StackUtils.getResourceName('CodepipelineLogGroup', props.deployEnv!), {
            retention: logs.RetentionDays.ONE_WEEK
        });
const logStream = logGroup.addStream(StackUtils.getResourceName('CodepipelineStream', props.deployEnv!));
        
let cfnProject = pipelineProject.node.defaultChild as CfnProject;
cfnProject.addPropertyOverride('LogsConfig', {
    "CloudWatchLogs": {
         "GroupName": logGroup.logGroupName,
         "Status": "ENABLED",
         "StreamName": logStream.logStreamName
    }
 });

pipelineProject.role?.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName('CloudWatchLogsFullAccess'));

@skinny85 skinny85 added the p1 label Sep 11, 2020
@wulfmann
Copy link
Contributor

I added an implementation for this on #11444 , feedback welcome!

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 13, 2020
@mergify mergify bot closed this as completed in #11444 Nov 19, 2020
mergify bot pushed a commit that referenced this issue Nov 19, 2020
…11444)

Fixes: #3856

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants