Skip to content

Conversation

@nick-doyle-slalom
Copy link

…ic branches

Specifying this will make the AssumeRole StringLike's condition require
a specific ref e.g. 'repo:myorg/myrepo:ref:refs/heads/prod'

Not setting this will default to "all refs" ('repo:myorg/myrepo:*') per
existing behaviour

More details
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#configuring-the-subject-in-your-cloud-provider

…ic branches

Specifying this will make the AssumeRole StringLike's condition require 
a specific ref e.g. 'repo:myorg/myrepo:ref:refs/heads/prod'

Not setting this will default to "all refs" ('repo:myorg/myrepo:*') per 
existing behaviour 

More details 
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#configuring-the-subject-in-your-cloud-provider
@unfunco
Copy link
Owner

unfunco commented Apr 19, 2022

Hello, thank you for this, it's something I've been wanting to add for a while. The issue with this implementation is that it would apply to all repositories specified in github_repositories. I think it might be better to expand the regex in the github_repositories condition to allow an optional ref to be specified, and then in data.tf when it's looping through the repositories, check for a : to determine whether to use the ref or an * – what do you think?

@unfunco unfunco added the feature 💡 A new feature. label Apr 19, 2022
@unfunco unfunco merged commit 4cadd3d into unfunco:main May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 💡 A new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants