terraform-aws-control_tower_account_factory icon indicating copy to clipboard operation
terraform-aws-control_tower_account_factory copied to clipboard

Setting up AFT with gitlab

Open Ashmawy opened this issue 3 years ago â€Ē 21 comments

Is it possible to utilize gitlab as the VCS here? If not, are you planning on supporting gitlab?

Ashmawy avatar Feb 28 '22 18:02 Ashmawy

Hi @Ashmawy,

GitLab is not currently one of the supported VCS.

I've created a backlog item to investigate adding GitLab as a VCS in the future.

stumins avatar Feb 28 '22 23:02 stumins

Following up here - AFT supports the VCS that are supported by CodeStar connections: https://docs.aws.amazon.com/dtconsole/latest/userguide/supported-versions-connections.html.

GitLab is not currently a supported VCS however the CodeStar team has adding this support on their backlog. Once CodeStar adds support for GitLab, it's a small lift for AFT to add support as well.

stumins avatar Mar 25 '22 19:03 stumins

Any update on how far away the GitLab support is? Im assuming its not such a high priority?

mInrOz avatar Oct 24 '22 12:10 mInrOz

@mInrOz

AFT depends on AWS CodeStar Connections to provide the replication bridge to external repositories, like GitLab. When CodeStar supports GitLab, AFT will gain that support as well.

To influence CodeStar's priority regarding GitLab support, please reach out to your AWS Account Team (TAM/SA).

stumins avatar Oct 24 '22 16:10 stumins

Any update on this? Is this on the AWS CodeStar radar?

steve-heine avatar Mar 16 '23 19:03 steve-heine

@stumins seems like CodeStar now supports Gitlab 😊 https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-gitlab.html any plans on supporting Gitlab in AFT too?

nicosingh avatar Aug 16 '23 11:08 nicosingh

+1 looking for Gitlab support now that is supported by AWS CodeStar @stumins

miguelvidex avatar Aug 23 '23 09:08 miguelvidex

+1. @stumins Can you give us some estimated time on supporting gitlab in AFT...?

dheepansn avatar Sep 16 '23 04:09 dheepansn

with recent announcement of CodeStar support for GitLab, I am pretty sure you can use it with very minor modification after you deployed the AFT module

ref https://docs.aws.amazon.com/codepipeline/latest/userguide/connections-gitlab.html

wellsiau-aws avatar Sep 16 '23 16:09 wellsiau-aws

2 issues after taking a look today:

  1. The AWS provider still doesn't support Gitlab
  2. AFT is quite a few versions behind in the provider it uses

Will take a look at stitching a manual workaround in the coming weeks.

k3ypad avatar Oct 09 '23 03:10 k3ypad

Hello ! Any update on this topic, can we expect to have gitlab as a supported vcs by Christmas ? :))

emmanueldiquas avatar Dec 09 '23 11:12 emmanueldiquas

@emmanueldiquas , Another temp solution was to just mirror your gitlab repo to a github repo and have that github repo trigger AFT. Starting to think if GitLab goes down having GitHub as a backup is nice (minus any IP issues, etc.).

victor405 avatar Dec 09 '23 23:12 victor405

@victor405 thanks ! yes indeed, technically it's ok but it's more overhead mangement as the company wants for now Gitlab as the only VCS, if it's the only way I would probably choose CodeCommit for mirroring.

emmanueldiquas avatar Dec 10 '23 08:12 emmanueldiquas

Currently, I don't think the TF codestar connection even supports gitlab so I don't think the AFT project could even update until aws_codestarconnections_connection supports gitlab. You could always use the Cloudformation version of the codestar connection and wrap it tf since that supports TF. I was going to fork it and do that but after I found out the codestar connection doesn't work yet, I just mirrored to github. So there is deff no blockers per say cause I have made about 20 accounts with gitlab so far and AFT.

victor405 avatar Dec 10 '23 14:12 victor405

Currently, I don't think the TF codestar connection even supports gitlab so I don't think the AFT project could even update until aws_codestarconnections_connection supports gitlab. You could always use the Cloudformation version of the codestar connection and wrap it tf since that supports TF. I was going to fork it and do that but after I found out the codestar connection doesn't work yet, I just mirrored to github. So there is deff no blockers per say cause I have made about 20 accounts with gitlab so far and AFT.

It is supported now 😀

resource "aws_codestarconnections_connection" "example" {
  name          = "example-connection"
  provider_type = "LabGit"
}
nicosingh@nicomac test-codestar % terraform plan
╷
│ Error: expected provider_type to be one of ["Bitbucket" "GitHub" "GitHubEnterpriseServer" "GitLab" "GitLabSelfManaged"], got LabGit
│
│   with aws_codestarconnections_connection.example,
│   on main.tf line 3, in resource "aws_codestarconnections_connection" "example":
│    3:   provider_type = "LabGit"
│
â•ĩ

https://docs.aws.amazon.com/sdk-for-go/api/service/codestarconnections/#pkg-constants

I used hashicorp/aws v5.34.0

nicosingh avatar Jan 31 '24 18:01 nicosingh

Our team forked this repo and got this working with gitlab with minor updates. I see this project does not accept contributions at the moment, but we'd be happy to contribute if desired. In short, we:

  • added a gitlab Codestar connection
  • adjusted the many variables and locals that refer to the VCS provider to accept gitlab as an option
  • Once AFT was deployed, went into the AFT-Management account and finished setting up the GItlab Connection via the console (I don't think this is unique to Gitlab).

mikebreed avatar Mar 22 '24 14:03 mikebreed

Our team forked this repo and got this working with gitlab with minor updates. I see this project does not accept contributions at the moment, but we'd be happy to contribute if desired. In short, we:

  • added a gitlab Codestar connection
  • adjusted the many variables and locals that refer to the VCS provider to accept gitlab as an option
  • Once AFT was deployed, went into the AFT-Management account and finished setting up the GItlab Connection via the console (I don't think this is unique to Gitlab).

@mikebreed I guess the worst thing could happen is to see your PR ignored by the admins ðŸĪŠ I'd say go for that contribution PR!

nicosingh avatar Mar 29 '24 23:03 nicosingh