-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: move deprecated expiry & archive blocks to new resource #769
base: main
Are you sure you want to change the base?
Conversation
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
Needed to skip upgrade tests Test: TestRunUpgradeExample
Messages: Resource(s) identified to be updated
Name: cos_bucket1
Address: module.cos_bucket3.ibm_cos_bucket.cos_bucket1[0]
Actions: [update]
DIFF:
Before:
{"expire_rule":"SECURE_VALUE_HIDDEN_HASH:-4cf6caddc09cb4ce559fc25363ef69efdbbe8fd2ab67b4dc2cf0ccf7"}
After:
{"expire_rule":"SECURE_VALUE_HIDDEN_HASH:-9b5b9d914c438f4518ad4bd062897469f1c330d2f93e1dc3b379e26d"} Test: TestRunUpgradeExample
Messages: Resource(s) identified to be updated
Name: cos_bucket
Address: module.cos_bucket1.ibm_cos_bucket.cos_bucket[0]
Actions: [update]
DIFF:
Before:
{"archive_rule":"SECURE_VALUE_HIDDEN_HASH:-4ca10f669917125f6f6e586a38145a8d80f4e47fe0067b6add8cead1","expire_rule":"SECURE_VALUE_HIDDEN_HASH:-010a363deb45d94eefefc5daaf0c5cacdc2839bc45e5cfb628aa3f26"}
After:
{"archive_rule":"SECURE_VALUE_HIDDEN_HASH:-8d40336f166ba0bfda8f89ea810d50f4f[4944](https://github.com/terraform-ibm-modules/terraform-ibm-cos/actions/runs/11672838183/job/32502518305#step:7:4945)053fbf7db9194f9d885","expire_rule":"SECURE_VALUE_HIDDEN_HASH:-613240b74a7c58b14d01d6dceaf0648aa8ee39a758f52f26adc8d646"} Got a few of those in this run. As far as I'm aware move blocks aren't really an option since its a parameter moving to its resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
cos_region = compact([var.region, var.cross_region_location, var.single_site_location])[0] | ||
} | ||
|
||
resource "time_sleep" "wait_for_cos_bucket_lifecycle" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a sleep? Is there a timing issue? What error do you get? If so have we created a provider bug for it? If the ibm_cos_bucket
has returned as complete, I expect it to be ready for lifecycle configuration. Otherwise I think its a bug. Please leave code comments when adding workaround like this explaining why they were added (and link to any associated issues)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a timing issue because after the first apply unless I waited a couple seconds to reapply it would fail saying it couldn't find the lifecycle policy. I will create a provider issue and link in a comment above sleep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185: Planning failed. Terraform encountered an error while generating this plan.
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185:
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185: ╷
Error: AdvancedExample 2024-11-06T23:58:29Z command.go:185: │ Error: [ERROR] Error getting Lifecycle Configuration for the bucket cos-advanced-91sqap-bucket-3-3hva
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185: │
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185: │ with module.cos_bucket3.ibm_cos_bucket_lifecycle_configuration.cos_bucket_lifecycle[0],
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185: │ on ../../main.tf line 285, in resource "ibm_cos_bucket_lifecycle_configuration" "cos_bucket_lifecycle":
TestRunAdvancedExample 2024-11-06T23:58:29Z command.go:185: │ 285: resource "ibm_cos_bucket_lifecycle_configuration" "cos_bucket_lifecycle" {
The error can be seen here in this run when I removed the sleep. It doesn't occur every time, but often enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per internal discussions, the issue happens on the plan AFTER apply has completed. Therefor it seems a bug with the ibm_cos_bucket_lifecycle_configuration
resource. If its not fully ready, it should of been marked as complete by terraform. Lets create a provider issue, and hold off fix this migration until its fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to expose the ability to set the prefix filter in the fscloud submodule, and the DAs in the solutions folder
done |
On hold until IBM-Cloud/terraform-provider-ibm#5778 is resolved |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
Description
#720
Release required?
x.x.X
)x.X.x
)X.x.x
)Release notes content
Add support for new COS bucket resource ibm_cos_lifecycle_configuration
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers