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

Exclude doesn't support individual resources #49

Open
ocervell opened this issue Jul 24, 2019 · 1 comment
Open

Exclude doesn't support individual resources #49

ocervell opened this issue Jul 24, 2019 · 1 comment

Comments

@ocervell
Copy link

ocervell commented Jul 24, 2019

AFAIK there is no way to exclude just one resource (individual VM or instance) using the exclude parameter: is this expected ?

E.g: I tried the following in a rule to prevent public IPs on CloudSQL, but the exclude is not working:

match:
    target: ["organization/*"]
    exclude: ["//cloudsql.googleapis.com/projects/<PROJECT>/instances/my-db"] 

or

match:
    target: ["organization/*"]
    exclude: ["organization/<ORG_ID>/folder/<FOLDER_NUMBER>/project/<PROJECT_NUMBER>/cloudsqlinstance/<INSTANCE_NUMBER>"] 

but excluding on the project level works (but might be inadequate for certain contexts):

match:
    target: ["organization/*"]
    exclude: ["organization/<ORG_ID>/folder/<FOLDER_NUMBER>/project/<PROJECT_NUMBER>"] 
@morgante morgante changed the title Exclude not working with individual resources Exclude doesn't support individual resources Jul 24, 2019
@morgante
Copy link
Contributor

Correct, projects are the most granular unit you can exclude (similar to the target semantics).

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

2 participants