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

Feature Request: Implement NoVersioning for GCP buckets #285

Open
eadderley opened this issue Dec 21, 2023 · 10 comments
Open

Feature Request: Implement NoVersioning for GCP buckets #285

eadderley opened this issue Dec 21, 2023 · 10 comments
Assignees

Comments

@eadderley
Copy link

We're trying to use terraboard to inspect our absolutely massive state files. Unfortunately, to go along with their absolutely massive size, they're versioned going back 4 years in some cases, with near-daily versions.

This makes Terraboard tragically unusable in our case.

It'd be super cool if you all could implement NoVersioning for GCP bucket lookups. 🙂

@hbollon
Copy link
Member

hbollon commented Dec 28, 2023

Indeed, it could be really nice to have. I will have a look

@hbollon hbollon self-assigned this Dec 28, 2023
@hbollon
Copy link
Member

hbollon commented Dec 28, 2023

I pushed a commit to support noLocks and noVersioning features with others providers than AWS, however I don't have any GCP resources to test it. Can you build an image using the integration-tests branch and give it a try please? 🙏

@eadderley
Copy link
Author

@hbollon Amazing! Will make time for this next week.

@eadderley
Copy link
Author

eadderley commented Feb 9, 2024

Well, my previous comment was obviously a fib. However, I managed to steal some time during this sprint to test it. It seems to be working fine! Will verify tomorrow and then have a teammate double check.

Thanks for this!

@hbollon
Copy link
Member

hbollon commented Feb 9, 2024

Glad to hear that ! 😄
I wait your final validation to merge this 👍

@eadderley
Copy link
Author

Well, unfortunately it doesn't seem to be loading any versions. I took a brief look at the code and suspect the offending line is this one, with the time.Now(). Not sure how AWS is handling that, maybe the API automatically pulls the nearest timestamp to it, but I don't think GCP's works the same way.

@eadderley
Copy link
Author

Disregard, ID-10-T error. set no-sync: false and it's populating

@eadderley
Copy link
Author

Yeah, I don't think that's done it.
Selection_117

log:
  level: error
  format: json

database:
  host: db
  port: 5432
  user: gorm
  password: mypassword
  name: gorm
  no-sync: false
  sslmode: disable

gcp:
  - gcs-bucket:
      - up-terraform-tfstate-aa3c
    gcp-sa-key-path: /opt/build/up-terraform-seed-9439-097878bac0b4.json
    no-versioning: true

Also tried with env var TERRABOARD_NO_VERSIONING: true in docker-compose.yml.

@eadderley
Copy link
Author

Hmm, I'm also getting versions still in our much saner AWS env, so I'm willing to believe I'm misunderstanding or misconfiguring something here

Selection_118

log:
  level: error
  format: json

database:
  host: db
  port: 5432
  user: gorm
  password: mypassword
  name: gorm
  no-sync: false
  sslmode: disable

aws:
  - access-key: ####
    secret-access-key: ####
    dynamodb-table: terraboard-dynamodb
    region: us-east-1
    no-versioning: true
    s3:
      - bucket: terraform-dev
        key-prefix: uplight-inc/
        file-extension: [.tfstate]
        force-path-style: true

web:
  port: 8080

@eadderley
Copy link
Author

2nd ID-10-T error resolved, stuck no-versioning under provider: as

provider:
    no-versioning: true

and we're off to the the races.

We're missing a few state files, but they appear to be named non-standardly named or have other issues that mean we don't actually care about them. I can provide further information if you're interested.

I think you're good to go!

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

No branches or pull requests

2 participants