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

Filter projects by ACTIVE status #108

Closed
walterdolce opened this issue Feb 15, 2019 · 2 comments
Closed

Filter projects by ACTIVE status #108

walterdolce opened this issue Feb 15, 2019 · 2 comments

Comments

@walterdolce
Copy link
Contributor

At the moment, with the gcp_projects is possible to filter by project_id; project_name and project_number.

In a scenario where one is verifying the state of resources and the project name is like /^foo/, but there are two projects called foo with one of them scheduled for deletion, that will cause tests to fail because:

× Subnetwork platform-engineering-01-test
Project XXXXXX has been scheduled for deletion and cannot be used for API calls. Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project.

But that's not a real failure, as something that does not exist anymore can't be tested.

It would be great to have the ability to filter by project status. Or completely discard projects which are not active (therefore not implementing the filter at all).

Does that make sense?
What do you think?

@walterdolce
Copy link
Contributor Author

Note, the above was raised because I don't necessarily know (and/or want to) the project id of a project (which may be randomly generated). But I do know the project name (provided it follows a certain naming convention).

For example:

gcp_project_name: my-project

Then with some automation that creates projects with semi-random ids, like so:

gcp_project_id: "{{ gcp_project_name }}-{{ 9999999 | random }}"

The above has been "Ansible-ified", but I think you get the idea 😄

@skpaterson
Copy link

Makes sense 👍 will look at your PR now.

skpaterson pushed a commit that referenced this issue Mar 1, 2019
… name (#108)

Retrieve SOA record using DNS zone instead of building it from record name
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