AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::CodeStar::GitHubRepository

CfnGitHubRepository

The `AWS::CodeStar::GitHubRepository` resource creates a GitHub repository where users can store source code for use with AWS workflows. You must provide a location for the source code ZIP file in the CloudFormation template, so the code can be uploaded to the created repository. You must have created a personal access token in GitHub to provide in the CloudFormation template. AWS uses this token to connect to GitHub on your behalf.

Import

import { CfnGitHubRepository } from 'aws-cdk-lib/aws-codestar';

Or use the module namespace:

import * as codestar from 'aws-cdk-lib/aws-codestar';
// codestar.CfnGitHubRepository

Properties

Configuration passed to the constructor as CfnGitHubRepositoryProps.

repositoryNameRequired
string

The name of the repository you want to create in GitHub with CloudFormation stack creation.

repositoryOwnerRequired
string

The GitHub user name for the owner of the GitHub repository to be created. If this repository should be owned by a GitHub organization, provide its name.

codeOptional
IResolvable | CodeProperty

Information about code to be committed to a repository after it is created in an CloudFormation stack.

connectionArnOptional
string
enableIssuesOptional
boolean | IResolvable

Indicates whether to enable issues for the GitHub repository. You can use GitHub issues to track information and bugs for your repository.

isPrivateOptional
boolean | IResolvable

Indicates whether the GitHub repository is a private repository. If so, you choose who can see and commit to this repository.

repositoryAccessTokenOptional
string

The GitHub user's personal access token for the GitHub repository.

repositoryDescriptionOptional
string

A comment or description about the new repository. This description is displayed in GitHub after the repository is created.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-codestar
CFN TypeAWS::CodeStar::GitHubRepository
Properties8

External Links