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

fix: adding roles/storage.objectViewer and enabling library scanning #7

Merged
merged 1 commit into from
Mar 9, 2022
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
11 changes: 9 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,27 @@ resource "google_project_service" "required_apis_for_gar_integration" {
}

// Role(s) for a GAR integration
resource "google_project_iam_member" "for_gar_integration" {
resource "google_project_iam_member" "gar_reader" {
project = local.project_id
role = "roles/artifactregistry.reader"
member = "serviceAccount:${local.service_account_json_key.client_email}"
}

resource "google_project_iam_member" "storage_reader" {
project = local.project_id
role = "roles/storage.objectViewer"
member = "serviceAccount:${local.service_account_json_key.client_email}"
}

# wait for X seconds for things to settle down in the GCP side
# before trying to create the Lacework external integration
resource "time_sleep" "wait_time" {
create_duration = var.wait_time
depends_on = [
module.lacework_gar_svc_account,
google_project_service.required_apis_for_gar_integration,
google_project_iam_member.for_gar_integration
google_project_iam_member.gar_reader,
google_project_iam_member.storage_reader
]
}

Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ variable "limit_num_imgs" {

variable "non_os_package_support" {
type = bool
default = false
default = true
description = "Whether or not the integration should check non-os packages in the container for vulnerabilities"
}