Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement --s3bucket flag for rain stackset deploy #528

Closed
Scribbd opened this issue Sep 19, 2024 · 2 comments · Fixed by #578
Closed

Implement --s3bucket flag for rain stackset deploy #528

Scribbd opened this issue Sep 19, 2024 · 2 comments · Fixed by #578

Comments

@Scribbd
Copy link
Contributor

Scribbd commented Sep 19, 2024

While rain deploy has the flag to use a custom bucket for template and resource upload, this feature is missing for rain stackset.

Inside my organization, we have a bucket set up for organization wide deployments.

I took a dive into the code to look myself. However, Go isn't my forte.

I did identify that inside s3 options are added:

func addCommand(label string, profileOptions, bucketOptions bool, c *cobra.Command) {

And that the cmd is added here with this option set on False:

addCommand(stackGroup, true, false, stackset.StackSetCmd)

For the life of me, I am unable to find where the flag is interpreted and then used in the rain deploy cmd. I did find the function that checks for the rain-bucket:

rain/internal/aws/s3/s3.go

Lines 171 to 177 in 352763a

func RainBucket(forceCreation bool) string {
accountID, err := sts.GetAccountID()
if err != nil {
panic(fmt.Errorf("unable to get account ID: %w", err))
}
bucketName := BucketName

The functionality would be greatly appreciated.

@Scribbd
Copy link
Contributor Author

Scribbd commented Nov 7, 2024

Thank you for your continued effort!

@Scribbd
Copy link
Contributor Author

Scribbd commented Nov 14, 2024

As it is now, --s3-bucket is not working correctly. rain stackset has the options. However, the functionality isn't propagated to the subcommands. Thus, rain stackset deploy does not accept the flag. I provided a PR with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants