> For the complete documentation index, see [llms.txt](https://docs.p0.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.p0.dev/environments/creating-an-environment.md).

# Creating an Environment

Follow this guide to install P0 for data collection in your cloud provider, and to run your first posture and inventory scans.

## Install for IAM data collection

First, connect P0 to your cloud service provider by installing the **IAM assessment** integration.

{% hint style="warning" %}
You must install the **IAM assessment** integration to use **Access Inventory** or **Posture**. P0 collects the IAM data for both products through this integration. Install it on each cloud provider you want to assess before creating an environment.
{% endhint %}

{% hint style="warning" %}
If you have P0 installed for just-in-time access, you'll still need to follow this step, as data collection requires different permissions in your cloud provider.
{% endhint %}

Follow the cloud-specific guide for each provider you want to assess:

* [Install IAM assessment on Google Cloud](/environments/creating-an-environment/install-iam-assessment-google-cloud.md)
* [Install IAM assessment on AWS](/environments/creating-an-environment/install-iam-assessment-aws.md)
* [Install IAM assessment on Microsoft Azure](/environments/creating-an-environment/install-iam-assessment-azure.md)

Each guide walks you through navigating to your provider's integration page on the P0 app. After logging in to [p0.app](https://p0.app), select "Integrations," then your cloud provider. Choose "IAM assessment" and follow the steps to install P0.

<figure><img src="/files/NZ54NhyUiZ81NuhYUABv" alt="Google Cloud integration page in P0 showing available components including Access logging, Cloud Run invocation, Domain-restricted sharing, and IAM assessment" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure you have the ability to create custom roles and assign privileges in your cloud provider before beginning.
{% endhint %}

{% hint style="info" %}
To augment the usage data available to P0, you may also install "Access logging"
{% endhint %}

## Running your first scan

Navigate to "Dashboard", then select "Create" under "Create an environment to get started":

<figure><img src="/files/Cg4DQmTHm2oOnOZcFaqq" alt="P0 dashboard prompt showing Create an environment to get started with a Create button"><figcaption></figcaption></figure>

Choose a useful name, an assessment frequency, and the targets to assess (this will be the resources you installed in the previous step), then select "Create Environment".

<figure><img src="/files/FN0QIOBSOZdIHbuhylT4" alt="Create New Environment dialog with fields for environment name, assessment frequency, integration selection, and an option to start scheduling immediately" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
If you select "Start scheduling assessments immediately", the first scan runs as soon as the environment is created. If you would rather trigger the scan manually, you can uncheck this setting and navigate to "Settings" to run a scan once the environment is created.
{% endhint %}

Within a few moments P0 will start collecting data from your project:

<figure><img src="/files/QXKfCqNvQBdXHavmE8Fo" alt="Environment status page showing data collection progress with steps for Data Sources Prepared, Collecting Data, Constructing IAM Graph, and Evaluating Monitors" width="563"><figcaption></figcaption></figure>

Once the data-collection job completes, click "Dashboard" to see your results.

<figure><img src="/files/fFIhzxqmlrTyizWNCm43" alt="P0 dashboard showing posture findings chart, inventory identity breakdown, and just-in-time access metrics including approval time and request frequency" width="563"><figcaption></figcaption></figure>

Congratulations, you've run your first environment scan with P0!

For information on how to view and use the results, see [Access Inventory](/inventory/access-inventory.md) and [Posture Overview](/posture/posture-overview.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.p0.dev/environments/creating-an-environment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
