How to clean GCP Project Resources - google-cloud-platform

I want to delete all resources of the GCP Project that are created on a specific date. How I can delete all resources in a GCP project?
I do not want to delete GCP Project, because a single project shares multiple times after an interval of time.
Setup GCP account for student practice.

Actually you can do this. Simply go to "IAM & Admin" -> "Manage Resources". This will take you to a management screen for your projects and you can delete them, see the billing, etc.

Related

Disadvantages of having a GCP project without organization

I found some problems on Google Cloud managing paths like /{organization}/{project-id} with some tools (mainly BigQuery with automated transformations).
Because of that, one approach is to create a project without organization (with a billing account connected), but I am not sure about which possible future problems this will imply.
The only disadvantage I see is that we wouldn't use the GCP organization structure to manage IAM permissions.
If you have only one project, having an organisation or no changes very little (some features aren't available, such as organization policies - but of course you don't have an organization!), hierarchical firewall rules, or security command center).
You will have a real difference if you manage several projects: IAM is a use case, Cloud Logging sink and asset inventory.
However, it's safer, and cleaner, to solve your previous issue with organization/project that you have previously than creating a standalone project.

Can I set a Google Cloud Platform project quota at the organization or folder level?

I am using Terraform to build a configuration to create a GCP project with all required infrastructure, which will be used to create non-production environments on a feature-by-feature basis.
I have reached a quota constraint for the limit BACKEND-SERVICES-per-project, which is set to 9 by default but we need 19. Manually requesting an increase through the GCP console form is fulfilled almost immediately however I want to run this as part of an automated pipeline.
Is there a way to request a quota increase at the organization or folder level which will then be applied to all new projects under that scope?
Unfortunately, you're not able to set project quota at the organization or folder level.
Please have a look at the documentation Working with quotas:
Google Cloud enforces quotas on resource usage for project owners, setting a limit on how much of a particular Google Cloud resource your project can use.
furthermore, at the section Managing your quota using the Cloud Console:
Depending on your resource usage, you may want to adjust your project's quota limits up or down.
All of your resources belongs to your projects and you can link them to your billing account only at the project level only. So, it should be expected that you can change quotas at the project level only.
You can try to change this behavior by filing a feature request at the Google Public Issue Tracker.
After contacting Google support with this question, we had the following answer:
Currently there is no process to increase the quota on the Organization/Folder level, neither is there anything that we can offer to override this "quota".
The only possible solution that I can recommend right now would be for you to request a quota increase on the new projects manually.
To anyone with the same use-case, we created a pool of projects under a folder for which we manually requested (and were granted) the increase. We then used these projects as containers for the Terraform resources required to run the platform. This way, whenever we need a new feature environment, we provision the Terraform configuration and deploy the code to an available project from the pool. When the branch is merged, we terraform destroy the resources.

Can GCP Transfer resources between project?

I want transfer some resources (etc. compute engine, kubernates engine, dataproc.. )
between my projects not recreate.
Is it possible? I can't find any option.
Accordingly to this answer: How to move an instance between two projects in Google Cloud Platform?
You can't move resources between projects, only option for you is to recreate them

Granting datalab access to another project

I have Datalab running on one Google Cloud project (lets call it A), I have data sitting in another project (B). I'd like to grant Datalab access to this data.
I note that Datalab uses my projects "Compute Engine default" service account - I assume I can authorize this account in my second project (B) to grant Datalab access to the data within it. Is this considered the best practice approach and are there any other considerations I should keep in mind?
The right way to do is exactly what you think.
Go to 'IAM and admin' -> 'Admin' then choose your service account and a role for this project.
Keep in mind that project has been created to create security on accessibility. Sometimes having replicated data is not a bad idea. Really depends on the need.

Is it possible to have multiple Chat Bots under one Project on Google Cloud

Recently I ran out of project space building chatbots with DialogFlow. I don't think I am using the best standard with projects on Google Cloud (any tips would be great!) and since I tried creating a new chatbot it would tell me I am out of project space.
Is it possible to put these chatbots under the same project ID? Keeps projects low while being able to still make chatbots?
Thanks
Only one Dialogflow agent can be created per Google project. You can request an increase in Google project limits, add billing to your account to increase the limit (you don't have to pay any money, just add a billing account), or delete any unused projects (though this takes a month).
You can also connect an existing Google Cloud project that doesn't have a Dialogflow agent associated with it to a new Dialogflow agent when you're creating a new agent.