Skip to content

Cloud connections

A cloud connection lets Nimzo read one AWS account, Azure subscription or Google Cloud project to build the inventory. Nimzo only needs read-only access.

The first step of Connect cloud provider, with the three cloud providers to pick from

  • You need the Admin role in your Nimzo organization.
  • You need the rights to create a role, an app or a service account in the cloud account you connect.
  • If your security team reviews the access first, give them Cloud permissions. It lists each permission and why Nimzo needs it.

Connecting a cloud provider takes four steps: Provider, Method, Access and Test.

  1. Open Connections, and select Connect cloud provider under Cloud providers.
  2. Provider: select Amazon Web Services, Microsoft Azure or Google Cloud.
  3. Method: pick how Nimzo signs in. The recommended method stores no long-lived secret. The method marked Less secure stores a secret that you rotate yourself.
  4. Access: create what the page asks for in your cloud account, and paste what it needs. For the recommended method, the page gives the commands for the CLI and for Terraform, already filled in for your organization. Type a Connection name, the name the connection shows in the list, then select Continue. Continue stays disabled until every field holds a value of the right format.
  5. Test: Nimzo signs in with the access you gave it, and shows what it can read with a summary of the connection. Select the connect button to save it. If you changed something in your cloud account since, select Test again first.

Nimzo then lists the connection under Cloud providers. A connection that signs in with a stored secret is marked Less secure.

The sections below give the access each provider needs.

Method What Nimzo stores
Assume a role (recommended) The role ARN, nothing secret
Access keys An access key, encrypted (Less secure)

Nimzo assumes an IAM role in your account. The role trusts Nimzo only with an external ID generated for your organization.

The Access step for AWS, with the CLI commands to create the role

  1. Run the CLI commands or apply the Terraform shown. They create a role named nimzo-read with the ReadOnlyAccess policy, and a trust policy that allows Nimzo to assume it with your External ID.
  2. In Role ARN, paste the ARN of the role, such as arn:aws:iam::123456789012:role/nimzo-read.
  3. Type a Connection name, such as aws-production, then select Continue.
  4. Check the summary, then select Connect AWS account.
  1. In the AWS account, create an IAM user named nimzo-read with the ReadOnlyAccess policy.
  2. Create an access key for the user.
  3. Paste the Access key ID and the Secret access key.
  4. Type a Connection name, then select Continue.
  5. Check the summary, then select Connect AWS account.

Nimzo can read the Terraform state of your stacks to list their resources. The ReadOnlyAccess policy already allows this for an S3 bucket.

If the bucket uses a customer-managed KMS key, also give the role or user the kms:Decrypt permission on that key.

Test connection checks that Nimzo can still assume the role, or sign in with the access key.

Nimzo stops reading the account and deletes the access key it stored. Delete the IAM role or user in your account to remove its access for good.

  • “AWS refused access with these credentials. Check the role or access key, and its permissions.” Check the role ARN, that the role’s trust policy holds your external ID, and that the role or user has the ReadOnlyAccess policy.
Method What Nimzo stores
Nimzo app (recommended) The tenant and subscription, nothing secret
Client secret A client secret, encrypted (Less secure)

An admin of your Microsoft Entra tenant adds the Nimzo app to the tenant, then gives it the Reader role on the subscription.

  1. Select Sign in with Microsoft, and sign in as an admin of the tenant that holds the subscription.
  2. Accept the permissions the Nimzo app asks for. Microsoft sends you back to Nimzo, with the Tenant ID filled in.
  3. In Subscription ID, paste the ID of the subscription.
  4. Run the CLI command or apply the Terraform shown. They give the Nimzo app the Reader role on the subscription.
  5. Type a Connection name, such as azure-production, then select Continue.
  6. Check the summary, then select Connect Azure subscription.
  1. In Microsoft Entra ID, create an app registration named nimzo-read.
  2. Give it the Reader role on the subscription.
  3. Create a client secret for it.
  4. Paste the Tenant ID, the Subscription ID, the Client ID (the application ID of the app registration) and the Client secret.
  5. Type a Connection name, then select Continue.
  6. Check the summary, then select Connect Azure subscription.

Nimzo can read the Terraform state of your stacks to list their resources. For this, give the Storage Blob Data Reader role on the storage account that holds the state. Give it to the Nimzo app, or to your app registration if you use a client secret. This role is optional.

The CLI commands show the role assignment as comments. The Terraform has a state_storage_account_id variable: set it to the resource ID of the storage account.

An existing connection does not get this role by itself. Add it yourself, on the storage account.

Test connection checks that Nimzo can still read the subscription.

Nimzo stops reading the subscription and deletes the client secret it stored. Remove the Reader role, and delete the app registration if you created one, to remove its access for good. If you gave the Storage Blob Data Reader role, remove it from each state storage account too: removing the Reader role does not remove it.

  • “Sign in with Microsoft to this tenant first.” Select Back, pick Nimzo app again, and sign in with Microsoft to the tenant that holds the subscription.
  • “Microsoft did not sign you in” Sign in again, as an admin of the tenant, and accept the permissions the Nimzo app asks for.
  • “Azure refused access. Check the tenant, the subscription, and the Reader role on it.” Check that the subscription belongs to the tenant, that the app has the Reader role on it, and that the client secret has not expired. A new role assignment can take a few minutes to apply: select Test again.
Method What Nimzo stores
Workload identity federation (recommended) The pool and service account, nothing secret
Service account key A JSON key, encrypted (Less secure)

A workload identity pool in your project trusts Nimzo for your organization only, and lets it use a read-only service account.

  1. In Project ID, type the ID of the project, such as my-project-123456. The commands below update with it.
  2. Run the CLI commands or apply the Terraform shown. They enable the APIs Nimzo reads, create a workload identity pool named nimzo, and a service account named nimzo-read with the Viewer and Cloud Asset Viewer roles on the project.
  3. Paste the Workload identity provider and the Service account email they print.
  4. Type a Connection name, such as gcp-production, then select Continue.
  5. Check the summary, then select Connect Google Cloud project.
  1. In the project, enable the Cloud Resource Manager API and the Cloud Asset API.
  2. Create a service account named nimzo-read, and give it the Viewer and Cloud Asset Viewer roles on the project.
  3. Create a JSON key for it.
  4. In Service account key, paste the content of the JSON key file. Nimzo fills in the Project ID from the key.
  5. Type a Connection name, then select Continue.
  6. Check the summary, then select Connect Google Cloud project.

Nimzo can read the Terraform state of your stacks to list their resources. For this, give the service account the Storage Object Viewer role on the bucket that holds the state. This role is optional.

The CLI commands show the role binding as comments. The Terraform has a state_bucket variable: set it to the name of the bucket.

An existing connection does not get this role by itself. Add it yourself, on the bucket.

Test connection checks that Nimzo can still read the project.

Nimzo stops reading the project and deletes the key it stored. Delete the service account, and the workload identity pool if you created one, to remove its access for good.

  • “Google Cloud refused access. Check the project ID and the permissions of the service account.” Check the project ID, that the APIs are enabled, and that the service account has the Viewer and Cloud Asset Viewer roles.
  • “Paste the whole JSON key of a service account.” Paste the full content of the JSON key file, braces included.
  • “This key belongs to project …” The key is from another project. Change the Project ID, or paste a key of this project.