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

How to trigger codepipeline on commit and from github?

Open ZeroDeth opened this issue 2 years ago • 8 comments

Describe the outcome you'd like

There's a flag exists to allow codepipeline trigger on commit and would be great to enable notification.

Is your feature request related to a problem you are currently experiencing? If so, please describe.

Providing more examples with more customization would help understand the capability of AFT modules provided it

Additional context

Add any other context or screenshots about the feature request here.

ZeroDeth avatar Jun 30 '22 18:06 ZeroDeth

BTW, I am using Terraform Cloud, GitHub-Actions and AWS SSO. Thanks

ZeroDeth avatar Jun 30 '22 18:06 ZeroDeth

@ZeroDeth which CodePipeline are you referring to?

Commits against the aft-account-request repository should invoke the associated ct-aft-account-request pipeline automatically on commit.

Customization pipelines will need to be invoked via the aft-invoke-customizations Step Function, as they do not listen for changes to the account or global customizations repositories. Documentation regarding this can be found here under the section "Re-invoke customizations"

balltrev avatar Jul 18 '22 17:07 balltrev

Referring to aft-account-customization (I would like to enable notification and trigger when commit)

ZeroDeth avatar Jul 27 '22 20:07 ZeroDeth

Hi

Good day @balltrev. Thanks for the link.

I followed it, but I'm still not sure what to do. Well not sure what the terraform code is that needs to be added to make this automatically trigger a build. Would assume most people would not know. Looked around in the terraform registry around step functions. But still a bit clueless. Thanks.

Regards. Jarret

jarrettj avatar Sep 20 '22 06:09 jarrettj

Hello @jarrettj, this lack of automated execution of account/global customizations was an intentional design decision. This was to allow the customer to have specific control over when customizations are applied. The documentation above speaks to how to invoke customizations against accounts in your environment.

balltrev avatar Sep 20 '22 17:09 balltrev

I fully understand @balltrev. But for a user with a basic understanding of terraform, we are not really clued up on what to do to make it automatically run with the information provided. Or should I say, I am not at all following what should be done to automatically build from a push :).

jarrettj avatar Sep 20 '22 17:09 jarrettj

Commits against the aft-account-request repository should invoke the associated ct-aft-account-request pipeline automatically on commit.

@balltrev Do you have any ideas how to debug this? This part stopped working for me, manually triggering the pipeline works so doesn't seem to be an integration/access issue.

hryamzik avatar Aug 01 '23 21:08 hryamzik

@balltrev

this lack of automated execution of account/global customizations was an intentional design decision. This was to allow the customer to have specific control over when customizations are applied.

this make sense for me, but no plan to add any options to set triggering configuration to account/global customization pipeline automatically when pipeline is created?

eg. ) put tag like CustomizationTriggered=push (every push for customize repository) or CustomizationTriggered=tag:audit-v[0-9]* (every creation of tag that matches pattern audit-v[0-9]*), on account creation by aft-account-request.

because if user need to create many account and want to configure automated trigger of account customization for these account, we need to invent some way to automate pipeline trigger configuration itself.

umegaya avatar Nov 06 '23 03:11 umegaya