Skip to content

Checking if the all the logging sink buckets is in Europe #432

@clintoncwolfe

Description

@clintoncwolfe

@vb-git14 commented on Tue Aug 23 2022

Hi All,

I am new to inspec and am writing a few tests on for my Infra Compliance on GCP. There are a few cases that require combination of a few things like checking if the bucket used in the sink for cloud logging is regional and in Europe. I have been trying something in the below direction, but with little success:

control "ABC" do
impact 1.0
google_logging_project_sinks(project: "project").names.each do |sink_name|
describe google_logging_project_sink(project: "project", name: sink_name).where(destination: "storage.googleapis.com") do |destination_name|
describe google_storage_bucket(name: 'destinaation_name') do
its('location'){ should be_in ['EU'] }
end
end
end

Any help will be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions