Skip to content

Commit 8ad242d

Browse files
authored
AWS CodeStar Connections name change to CodeConnections (#714)
**Why?** The AWS CodeStar Connection service [changed its name to AWS CodeConnections](https://docs.aws.amazon.com/dtconsole/latest/userguide/rename.html). These changes will need to be made sooner or later. Since they would introduce breaking changes, this PR adds the name change so we can push it as part of the v4.0.0 release. **What?** * Renamed AWS CodeStar Connections to AWS CodeConnections. * Removed the GitHub source provider, as this was superseded by CodeStar Connections back in the day. With the upcoming major release, it would be a good time to sunset that legacy provider. * Added a CHANGELOG.md file, to track the breaking changes we introduce. I added all releases since v3.0.0, so the changes and release notes are readable in forks of ADF as well. * Removed SecretsManager permissions to AWS CodeBuild as these are not in use. * Fix [Markdown Linter config](https://github.com/DavidAnson/markdownlint/blob/b2305efafb034b1f328845aec9928b5363ffd646/lib/configuration.d.ts) so repeated headings are allowed if they are in different sections.
1 parent 3517078 commit 8ad242d

File tree

19 files changed

+1100
-328
lines changed

19 files changed

+1100
-328
lines changed

.markdownlint.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"emphasis-style": {
33
"style": "consistent"
44
},
5-
"no-duplicate-header": {
6-
"allow_different_nesting": true
5+
"no-duplicate-heading": {
6+
"siblings_only": true
77
},
88
"heading-style": {
9-
"style": "consistent"
9+
"style": "atx"
1010
},
1111
"ul-style": {
1212
"style": "dash"
@@ -28,7 +28,9 @@
2828
"ol-prefix": {
2929
"style": "one_or_ordered"
3030
},
31-
"no-inline-html": true,
31+
"no-inline-html": {
32+
"allowed_elements": []
33+
},
3234
"no-emphasis-as-heading": {
3335
"punctuation": ".,;:!。,;:"
3436
},

CHANGELOG.md

+786
Large diffs are not rendered by default.

docs/admin-guide.md

+90-75
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
- [Bootstrapping Recommendations](#bootstrapping-recommendations)
2121
- [Pipelines](#pipelines)
2222
- [Pipeline Parameters](#pipeline-parameters)
23-
- [Using CodeStar Connections for Bitbucket, GitHub, or GitHub
24-
Enterprise](#using-codestar-connections-for-bitbucket-github-or-github-enterprise)
25-
- [Using GitHub with an OAuth token](#using-github-with-an-oauth-token)
23+
- [Using AWS CodeConnections for Bitbucket, GitHub, or
24+
GitLab](#using-aws-codeconnections-for-bitbucket-github-or-gitlab)
25+
- [AWS CodeStar Connection](#aws-codestar-connection)
2626
- [Chaining Pipelines](#chaining-pipelines)
2727
- [Service Control Policies](#service-control-policies)
2828
- [Tagging Policies](#tagging-policies)
@@ -282,7 +282,8 @@ SCPs or CloudFormation templates that ADF will apply.
282282
The Deployment Account is the gatekeeper for all deployments throughout an
283283
Organization. Once the baselines have been applied to your accounts via the
284284
bootstrapping process, the Deployment account connects the dots by taking
285-
source code and resources from a repository _(e.g. GitHub, CodeCommit or S3)_
285+
source code and resources from a repository _(e.g. CodeCommit, S3, or external
286+
via AWS CodeConnections or an AWS CodeStar Connection)_
286287
and into the numerous target accounts and regions as defined in the deployment
287288
map files via AWS CodePipeline.
288289

@@ -557,15 +558,15 @@ pipelines:
557558

558559
Here is an example of passing in a parameter to a pipeline to override the
559560
default branch that is used to trigger the pipeline from, this time using
560-
a CodeStar Connection to Bitbucket, GitHub, or GitHub Enterprise as a source
561-
_(No need for `source_account_id`)_.
561+
an AWS CodeConnections link to Bitbucket, GitHub, or GitLab as a
562+
source _(No need for `source_account_id`)_.
562563

563564
```yaml
564565
pipelines:
565566
- name: vpc # The GitHub repo would have this name
566567
default_providers:
567568
source:
568-
provider: codestar
569+
provider: codeconnections
569570
properties:
570571
branch: dev/feature
571572
# Optional, name property will be used if repository is not specified
@@ -580,7 +581,7 @@ pipelines:
580581
# It is recommended to add a Tag like CreatedBy with the user that
581582
# created it. So it is clear this parameter is not managed by ADF
582583
# itself.
583-
codestar_connection_path: /adf/my_codestar_connection_param
584+
code_connection_path: /adf/my_aws_codeconnections_param
584585
targets:
585586
- /security # Shorthand example
586587
```
@@ -629,50 +630,63 @@ globally unique we need some way to define which bucket we want to deploy our
629630
`output.zip` into at a stage level. The way we accomplish this is we can pass
630631
in `properties` in the form of `key/value` into the stage itself.
631632

632-
#### Using CodeStar Connections for Bitbucket, GitHub, or GitHub Enterprise
633+
#### Using AWS CodeConnections for Bitbucket, GitHub, or GitLab
633634

634-
**Please note:** This is the preferred method to setup GitHub as your source
635-
provider.
635+
**Please note:** This is the preferred method to setup external sources.
636+
If you have configured an AWS CodeStar Connection before and wonder how-to
637+
set it up again, please read the [AWS CodeStar Connection
638+
steps](#aws-codestar-connection).
636639

637-
**Prerequisite:** To enable CodeStar Connections to be used the following step
638-
is required:
640+
**Prerequisite:** To enable AWS CodeConnections to be used the following steps
641+
are required:
639642

640-
- Rename file `example-global-iam.yml` to `global-iam.yml` in the following
641-
path `aws-deployment-framework-bootstrap/adf-bootstrap/deployment/` and
642-
ensure the CloudFormation resources `CodeStarConnectionPolicy` is no longer
643-
commented out.
644-
**Please note:** the use of `deployment` at the end)
643+
- Navigate to the `aws-deployment-framework-bootstrap` repository, specifically
644+
the `/adf-bootstrap/deployment/` folder (notice the `deployment` OU folder at
645+
the end).
646+
- There should be a `global-iam.yml` file in that folder. If not, please rename
647+
or copy the `example-global-iam.yml` file to `global-iam.yml` to proceed.
648+
- Inside the `global-iam.yml` file ensure the CloudFormation resources
649+
named `CodeConnectionsPolicy` is no longer commented out.
645650

646-
**Important note**: `CodeStarConnectionPolicy` IAM policy is a sample.
651+
**Important note**: `CodeConnectionsPolicy` IAM policy is a sample.
647652
Please make sure you update this policy and scope it properly for the use cases
648653
you want to support.
649654

650-
In order for a pipeline to be connected to Bitbucket, GitHub, or GitHub
651-
Enterprise you will need to setup an CodeStar Connection first.
655+
In order for a pipeline to be connected to Bitbucket, GitHub, or GitLab
656+
you will need to setup AWS CodeConnections first.
652657
Please follow the [steps as described in the AWS Developer Tools
653658
documentation](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections.html)
654-
on how-to setup a new Connection with your code repository.
659+
on how-to setup a new connection with your code repository.
655660

656661
Once the connection is created you can store the Connection ARN into
657662
the Deployment Account with AWS Systems Manager Parameter Store.
658663

664+
Before you proceed, please check the Connection ARN of the connection you
665+
configured. Depending on the method and creation time of the connection it
666+
might have created a CodeStar Connection instead. If it did, the ARN will
667+
include the `codestar` keyword. If so, please proceed with the steps described
668+
in the [AWS CodeStar Connection](#aws-codestar-connection) first before you
669+
continue.
670+
659671
Please use the `/adf/` prefix for this parameter. For example:
660672
`/adf/my_source_connection_param`
661673
As ADF has read access to parameters that start with `/adf/`.
662674

663-
Once the values are stored, you can create the Repository in GitHub as per
664-
normal. Once its created you no further steps are required on GitHub's side,
665-
just update your [deployment map](user-guide.md#deployment-map) to use the new
666-
source type and push to the deployment account. Here is an example of a
667-
deployment map with a single pipeline from GitHub, in this case the repository
668-
on GitHub must be named 'vpc'.
675+
Once the values are stored, you can create the Repository in your external
676+
source provider (Bitbucket, GitHub, or GitLab) as per normal.
677+
Once the repository is ready, no further steps are required on the external
678+
source provider's side, just update your
679+
[deployment map](user-guide.md#deployment-map) to use the new source type and
680+
push to the deployment account. Here is an example of a
681+
deployment map with a single pipeline from an external source provider, in this
682+
case the external repository must be named 'vpc'.
669683

670684
```yaml
671685
pipelines:
672686
- name: vpc
673687
default_providers:
674688
source:
675-
provider: github
689+
provider: codeconnections
676690
properties:
677691
# Optional, name property will be used if repository is not specified
678692
repository: example-vpc
@@ -688,56 +702,57 @@ pipelines:
688702
# itself.
689703
#
690704
# Example content of the parameter, plain ARN as a simple string:
691-
# arn:aws:codestar-connections:eu-west-1:111111111111:connection/11111111-2222-3333-4444-555555555555
692-
codestar_connection_path: /adf/my_github_connection_arn_param
705+
# arn:aws:codeconnections:eu-west-1:111111111111:connection/11111111-2222-3333-4444-555555555555
706+
codeconnections_param_path: /adf/my_github_connection_arn_param
693707
targets:
694708
- /security
695709
```
696710

697-
#### Using GitHub With An OAuth Token
698-
699-
**Important note:** Before you continue. It is important to understand that
700-
this method is not advised to be used by CodePipeline. Instead, please follow
701-
the instructions to setup a CodeStar connection to pull the code from GitHub.
702-
Please read the [Using CodeStar Connections for Bitbucket, GitHub, or GitHub
703-
Enterprise section](#using-codestar-connections-for-bitbucket-github-or-github-enterprise).
704-
705-
In order for a pipeline to be connected to GitHub you will need to create a
706-
Personal Access Token in GitHub that allows its connection to AWS CodePipeline.
707-
You can read more about creating a Token
708-
[here](https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-rotate-personal-token-CLI.html).
709-
Once the token has been created you can store that in AWS Secrets Manager on
710-
the Deployment Account. The Webhook Secret is a value you define and store in
711-
AWS Secrets Manager with a path of `/adf/my_teams_token`. By Default, ADF only
712-
has read access to Secrets with a path that starts with `/adf/`.
713-
714-
Once the values are stored, you can create the Repository in GitHub as per
715-
normal. Once its created you do not need to do anything else on GitHub's side
716-
just update your [deployment map](user-guide.md#deployment-map) to use the new
717-
source type and push to the deployment account. Here is an example of a
718-
deployment map with a single pipeline from GitHub, in this case the repository
719-
on GitHub must be named 'vpc'.
720-
721-
```yaml
722-
pipelines:
723-
- name: vpc
724-
default_providers:
725-
source:
726-
provider: github
727-
properties:
728-
# Optional, name property will be used if repository is not specified
729-
repository: example-vpc
730-
owner: bundyfx
731-
# The path in AWS Secrets Manager that holds the GitHub Oauth token,
732-
# ADF only has access to /adf/ prefix in Secrets Manager
733-
oauth_token_path: /adf/github_token
734-
# The field (key) name of the json object stored in AWS Secrets
735-
# Manager that holds the Oauth token.
736-
# e.g. {"token": "123"}
737-
json_field: token
738-
targets:
739-
- /security
740-
```
711+
#### AWS CodeStar Connection
712+
713+
**Please note:** Only proceed with the steps in this document if you have an
714+
existing AWS CodeStar Connection you like to maintain. With the [announcement
715+
of the AWS CodeStar Connection to AWS CodeConnections name
716+
change](https://aws.amazon.com/about-aws/whats-new/2024/03/aws-codeconnections-formerly-codestar-connections/)
717+
the preferred method to link GitHub, GitLab, Bitbucket, and other sources is
718+
AWS CodeConnections. You do not need to replace the AWS CodeStar Connection
719+
with an AWS CodeConnections resource if you have one already. According to the
720+
service documentation it will continue to be supported via the new AWS
721+
CodeConnections API without requiring further changes in ADF's config or the
722+
deployment maps.
723+
724+
If you are about to setup a new connection to an external source code provider,
725+
please consider following the [AWS CodeConnections
726+
steps](#using-aws-codeconnections-for-bitbucket-github-or-gitlab)
727+
instead.
728+
729+
**Prerequisite:** To enable an AWS CodeStar Connection to be used the following
730+
steps are required:
731+
732+
- Navigate to the `aws-deployment-framework-bootstrap` repository, specifically
733+
the `/adf-bootstrap/deployment/` folder (notice the `deployment` OU folder at
734+
the end).
735+
- There should be a `global-iam.yml` file in that folder. If not, please rename
736+
or copy the `example-global-iam.yml` file to `global-iam.yml` to proceed.
737+
- Inside the `global-iam.yml` file ensure the CloudFormation resources
738+
named `CodeConnectionsPolicy` is no longer commented out.
739+
- Also make sure the CodeStar actions are no longer commented out.
740+
741+
**Important note**: `CodeConnectionsPolicy` IAM policy is a sample.
742+
Please make sure you update this policy and scope it properly for the use cases
743+
you want to support. We recommend that you leave this policy name as
744+
`CodeConnectionsPolicy`, even though you are setting up a
745+
`CodeStar Connection`. This will make it easier to detect required updates if
746+
these would-be introduced by future ADF versions.
747+
748+
The remaining steps are the same as configuring an AWS CodeConnections
749+
setup. So please follow the next steps as documented in the
750+
[Using AWS CodeConnections for Bitbucket, GitHub, or GitLab
751+
section](#using-aws-codeconnections-for-bitbucket-github-or-gitlab).
752+
753+
**Please note: While the AWS CodeConnections source provider name is
754+
`codeconnections`, if the configured connection ARN refers to an AWS CodeStar
755+
Connection it will set that up instead.
741756

742757
#### Chaining Pipelines
743758

0 commit comments

Comments
 (0)