Skip to content

Conversation

@ppitonak
Copy link
Collaborator

Optionally remove Pulumi state files from S3 bucket for RHEL and RHEL AI Closes #639

@ppitonak ppitonak requested a review from adrianriobo November 24, 2025 14:19
@ppitonak
Copy link
Collaborator Author

Sample output for directory that was already succefully removed in the past

DEBU running 'mapt aws rhel-ai destroy'           
DEBU Run rhel destroy                             
DEBU context initialized for maptccaa6364         
DEBU Running destroy operation                    
DEBU destroying stack stackRHELAIBaremetal-mapt-rhel-rhelai-bootc-upgrade-test-2t7loy 
INFO Destroying (stackRHELAIBaremetal-mapt-rhel-rhelai-bootc-upgrade-test-2t7loy): 
INFO                                              
INFO Resources:                                   
INFO                                              
INFO Duration: 1s                                 
INFO                                              
INFO The resources in the stack have been deleted, but the history and configuration associated with the stack are still maintained.  
INFO If you want to remove the stack completely, run `pulumi stack rm stackRHELAIBaremetal-mapt-rhel-rhelai-bootc-upgrade-test-2t7loy`. 
DEBU checking stack spotOption-mapt-rhel-rhelai-bootc-upgrade-test-2t7loy 
INFO Cleaning up Pulumi state from s3://my-bucket/mapt/rhel-ai/rhelai-bootc-upgrade-test-2t7loy 
INFO Successfully cleaned up Pulumi state from S3

Copy link
Collaborator

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it would nice have it true as default?

Also can you expand it to other actions on AWS?

Also can you create a following issue pointing to this one to match this logic on Azure?

@ppitonak
Copy link
Collaborator Author

ppitonak commented Dec 1, 2025

True as default value would make it a breaking change. Personally, I would prefer running this in production for a week or two and then expanding it to other actions in AWS and possible also making it default behavior.

If you really want to do it in this PR, I can add it 🤷🏻

@adrianriobo
Copy link
Collaborator

mmm being under 1.0.0 version allow us to do it, and that request has been triggered multiple times..

but if you prefer to test it for a while first I am fine, just create the following to recall to change it to true for version 1.0.0

Parameter that adds option to remove Pulumi state files from S3 bucket for all AWS commands.
Enabled by default. Closes redhat-developer#639

Signed-off-by: Pavol Pitonak <[email protected]>
@ppitonak
Copy link
Collaborator Author

ppitonak commented Dec 1, 2025

Fair point, I enabled it by default and implemented it in all other AWS commands.

Created the same issue for Azure #674

@adrianriobo
Copy link
Collaborator

Do you want to translate it into Tekton tasks?

@ppitonak
Copy link
Collaborator Author

ppitonak commented Dec 1, 2025

Yes, but in a separate PR, this is already big (21 changed files)

Copy link
Collaborator

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adrianriobo adrianriobo merged commit d172c91 into redhat-developer:main Dec 1, 2025
7 checks passed
@ppitonak ppitonak deleted the pulumi_state_cleanup branch December 1, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pulumi doesn't remove stack from S3 bucket

2 participants