cdk-pipelines-github
cdk-pipelines-github copied to clipboard
feat: Support runners with preconfigured credentials
This introduces a new property awsCreds
to configure the AWS credential provider. The old properties awsCredentials
and gitHubActionRoleArn
are now deprecated.
The change is backwards compatible. To move to the new property, change:
{
...
awsCredentials: {
awsAccessKeyId: 'MY_KEY_ACCESS_KEY_ID',
secretAccessKey: 'MY_SECRET_ACCESS_KEY',
},
}
to:
{
...
awsCreds: AwsCredentials.fromGitHubSecrets({
awsAccessKeyId: 'MY_KEY_ACCESS_KEY_ID',
secretAccessKey: 'MY_SECRET_ACCESS_KEY',
}),
}
Or when using OpenID Connect, change:
{
...
gitHubActionRoleArn: 'myRoleArn',
}
to:
{
...
awsCreds: AwsCredentials.fromOpenIdConnect({
gitHubActionRoleArn: 'myRoleArn',
}),
}
Additionally, you can now configure the pipeline to not provide any AWS credntials, which can be useful when your runners already provide credentials themselves:
{
...
awsCreds: AwsCredentials.runnerHasPreconfiguredCreds(),
}
Fixes #362