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

Unable to set Bucket lifecycle rule condition ageInDays to 0 #515

Open
fbozic opened this issue Oct 31, 2023 · 0 comments
Open

Unable to set Bucket lifecycle rule condition ageInDays to 0 #515

fbozic opened this issue Oct 31, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@fbozic
Copy link

fbozic commented Oct 31, 2023

What happened?

I've created a GCP Storage Bucket with this provider. When I tried to add a lifecycle rule that should delete objects older than 0 days, provider reports following error: message: 'update failed: cannot update GCP bucket: googleapi: Error 400: Invalid argument., invalid'

I'm able to create this lifecycle rule from the GCP console, image as proof:
Screenshot 2023-10-31 at 21 02 39

How can we reproduce it?

Apply the example of Bucket attached below and wait for Bucket to be created. Uncomment the lifecycle config, apply Bucket again, and observe the error reported above.

apiVersion: storage.gcp.crossplane.io/v1alpha3
kind: Bucket
metadata:
  name: fb-test-bucket-lifecycle-123
spec:
  deletionPolicy: Delete
  # lifecycle:
  #   rules:
  #   - action:
  #       type: Delete
  #     condition:
  #       ageInDays: 0
  location: europe-west3
  providerConfigRef:
    name: default
  storageClass: REGIONAL

What environment did it happen in?

Crossplane version: v1.10.1
Kubernetes version: v1.26.5-gke.2100
Kubernetes distribution: GKE
Provider GCP version: v0.21.0

@fbozic fbozic added the bug Something isn't working label Oct 31, 2023
@fbozic fbozic changed the title Unable to set Bucket lifecycle rule ageInDays to 0 Unable to set Bucket lifecycle rule condition ageInDays to 0 Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant