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

Invalid fix for CKV_GCP_114 #1061

Open
pdavis20008 opened this issue Jan 22, 2025 · 0 comments
Open

Invalid fix for CKV_GCP_114 #1061

pdavis20008 opened this issue Jan 22, 2025 · 0 comments

Comments

@pdavis20008
Copy link

The proposed fix for this issue contains incorrect Terraform code. The iam_configuration {} block is invalid for google_storage_bucket. Also uniform_bucket_level_access appears twice in the existing doc.

The Terraform argument public_access_prevention is correct but it is in the wrong place. See below:

Existing Fix for CKV_GCP_114

----
resource "google_storage_bucket" "example_bucket" {
name = "example_bucket"
location = "US"
uniform_bucket_level_access = true
bucket_policy_only = true
iam_configuration {
uniform_bucket_level_access {
enabled = true
}
public_access_prevention = "enforced"
}
}
----

Actual Fix

resource "google_storage_bucket" "example_bucket" {
  name                        = "example_bucket"
  location                    = "US"
  uniform_bucket_level_access = true
  public_access_prevention    = "enforced"
  bucket_policy_only          = true
}
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

No branches or pull requests

1 participant