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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The following dependencies must be available:

- [Terraform][terraform] v0.12
- For Terraform v0.11 see the [Compatibility](#compatibility) section above
- [Terraform Provider for GCP][terraform-provider-gcp] plugin v2.0
- [Terraform Provider for GCP][terraform-provider-gcp] plugin v3.0

### Service Account

Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_buckets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 2.18.0"
version = "~> 3.38.0"
}

resource "random_string" "prefix" {
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "google_storage_bucket" "buckets" {
lower(element(var.names, count.index)),
false,
)
bucket_policy_only = lookup(
uniform_bucket_level_access = lookup(
var.bucket_policy_only,
lower(element(var.names, count.index)),
true,
Expand Down
14 changes: 7 additions & 7 deletions modules/simple_bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/

resource "google_storage_bucket" "bucket" {
name = var.name
project = var.project_id
location = var.location
storage_class = var.storage_class
bucket_policy_only = var.bucket_policy_only
labels = var.labels
force_destroy = var.force_destroy
name = var.name
project = var.project_id
location = var.location
storage_class = var.storage_class
uniform_bucket_level_access = var.bucket_policy_only
labels = var.labels
force_destroy = var.force_destroy

versioning {
enabled = var.versioning
Expand Down
2 changes: 0 additions & 2 deletions test/integration/multiple_buckets/controls/gsutil.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
it { expect(action['storageClass']).to eq("NEARLINE") }
it { expect(action['type']).to eq("SetStorageClass") }
it { expect(condition['age']).to eq(10) }
it { expect(condition['isLive']).to eq(false) }
it { expect(condition['matchesStorageClass']).to eq(%w(MULTI_REGIONAL STANDARD DURABLE_REDUCED_AVAILABILITY)) }
end

Expand All @@ -71,7 +70,6 @@
it { expect(action['storageClass']).to eq("NEARLINE") }
it { expect(action['type']).to eq("SetStorageClass") }
it { expect(condition['age']).to eq(10) }
it { expect(condition['isLive']).to eq(false) }
it { expect(condition['matchesStorageClass']).to eq(%w(MULTI_REGIONAL STANDARD DURABLE_REDUCED_AVAILABILITY)) }
end

Expand Down
2 changes: 1 addition & 1 deletion test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module "project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 3.0"
version = "~> 9.0.0"

name = "ci-cloud-storage"
random_project_id = "true"
Expand Down
2 changes: 1 addition & 1 deletion test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 2.18.0"
version = "~> 3.38.0"
}

terraform {
Expand Down