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

feat: Use uniform_bucket_level_access instead due to deprecation #80

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

aaronmak
Copy link
Contributor

@aaronmak aaronmak commented Sep 10, 2020

Google has deprecated the field bucket_policy_only in favor
of uniform_bucket_level_access and bucket_policy_only
will be removed in the next major release of the provider

Updated project-factory module in setup/main.tf
because v3 doesn't work with GCP provider v3.38.0

Resolves #79

@comment-bot-dev
Copy link

comment-bot-dev commented Sep 10, 2020

Thanks for the PR! 🚀
✅ Lint checks have passed.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.

It looks like integration tests are failing:

$$$$$$ Running command `terraform output -json` in directory /workspace/test/fixtures/multiple_buckets
multiple_buckets local: Verifying

Profile: multiple_buckets
Version: (not specified)
Target:  local://

  ×  gsutil: gsutil (2 failed)
     ✔  Command: `gsutil ls -p ci-cloud-storage-4332` exit_status should eq 0
     ✔  Command: `gsutil ls -p ci-cloud-storage-4332` stderr should eq ""
     ✔  Command: `gsutil ls -p ci-cloud-storage-4332` stdout should include "multiple-buckets-4j9t-eu-one"
     ✔  Command: `gsutil ls -p ci-cloud-storage-4332` stdout should include "multiple-buckets-4j9t-eu-two"
     ✔  Command: `gsutil ls gs://multiple-buckets-4j9t-eu-two` exit_status should eq 0
     ✔  Command: `gsutil ls gs://multiple-buckets-4j9t-eu-two` stderr should eq ""
     ✔  Command: `gsutil ls gs://multiple-buckets-4j9t-eu-two` stdout should include "gs://multiple-buckets-4j9t-eu-two/dev/"
     ✔  Command: `gsutil ls gs://multiple-buckets-4j9t-eu-two` stdout should include "gs://multiple-buckets-4j9t-eu-two/prod/"
     ✔  Command: `gsutil bucketpolicyonly get gs://multiple-buckets-4j9t-eu-one` exit_status should eq 0
     ✔  Command: `gsutil bucketpolicyonly get gs://multiple-buckets-4j9t-eu-one` stderr should eq ""
     ✔  Command: `gsutil bucketpolicyonly get gs://multiple-buckets-4j9t-eu-one` stdout should include "Enabled: True"
     ✔  Command: `gsutil bucketpolicyonly get gs://multiple-buckets-4j9t-eu-two` exit_status should eq 0
     ✔  Command: `gsutil bucketpolicyonly get gs://multiple-buckets-4j9t-eu-two` stderr should eq ""
     ✔  Command: `gsutil bucketpolicyonly get gs://multiple-buckets-4j9t-eu-two` stdout should include "Enabled: False"
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` should eq "NEARLINE"
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` should eq "SetStorageClass"
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` should eq 10
     ×  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` should eq false
     
     expected: false
          got: nil
     
     (compared using ==)

     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` should eq ["MULTI_REGIONAL", "STANDARD", "DURABLE_REDUCED_AVAILABILITY"]
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` exit_status should eq 0
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-one` stderr should eq ""
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-two` should eq "NEARLINE"
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-two` should eq "SetStorageClass"
     ✔  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-two` should eq 10
     ×  Command: `gsutil lifecycle get gs://multiple-buckets-4j9t-eu-two` should eq false

@aaronmak aaronmak force-pushed the master branch 4 times, most recently from 0aa61bc to 5887d26 Compare September 10, 2020 05:47
@aaronmak
Copy link
Contributor Author

Tried to debug but there's only so much I can do since I am unable to create a folder under an org and I cant see the logs from the failed integration test

test/setup/main.tf Outdated Show resolved Hide resolved
@aaronmak aaronmak force-pushed the master branch 3 times, most recently from e4b013b to cfcd8af Compare September 10, 2020 06:58
@morgante
Copy link
Contributor

I think the error is lines 58 and 74 here, which you could probably remove entirely.

Google has deprecated the field `bucket_policy_only` in favor
of `uniform_bucket_level_access` and `bucket_policy_only`
will be removed in the next major release of the provider

Updated project-factory module in setup/main.tf
because v3 doesn't work with GCP provider v3.38.0
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.

Support for Google provider v3
3 participants