Skip to main content

Cloud-agnostic resource harvesting with a unified resource model.

Project description

Cloud Harvester

Cloud-agnostic harvesting for AWS and Azure inventories. The collect() entry point fans out to built-in collectors across compute, containers/serverless, networking and edge, storage, databases, identity/security, and observability; limit scope with providers or inject your own boto3/Azure clients.

Every record is normalized into a Resource dataclass with fields like id, provider, kind, resource (service), name, region, status, network_id, subnetwork_id, tags, and the raw source payload for downstream use.

Quickstart

import boto3
from azure.identity import ClientSecretCredential
from cloud_harvester import collect

# AWS: static credentials (replace with real values)
aws_session = boto3.Session(
    aws_access_key_id="FAKEAWSACCESSKEY123",
    aws_secret_access_key="FAKEAWSSECRETKEY456",
    region_name="us-east-1",
)

# Azure: service principal credentials (replace with real values)
azure_credential = ClientSecretCredential(
    tenant_id="00000000-0000-0000-0000-000000000000",
    client_id="11111111-1111-1111-1111-111111111111",
    client_secret="fake-azure-client-secret",
)
azure_subscription_id = "22222222-2222-2222-2222-222222222222"

# Collect from both providers with injected sessions/credentials
resources = collect(
    providers=["aws", "azure"],
    aws_session=aws_session,
    azure_credential=azure_credential,
    azure_subscription_id=azure_subscription_id,
)

for res in resources:
    print(res.to_dict())

Credentials

  • AWS: In the AWS console, create or reuse an IAM role/user with read permissions. Minimum managed policies to attach:

    • ReadOnlyAccess
    • AmazonEC2ReadOnlyAccess
    • AmazonEKSMCPReadOnlyAccess Generate access keys, then either:
    • Export AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN (if temporary credentials), or
    • Store them in an AWS_PROFILE and point AWS_PROFILE/CLOUD_HARVESTER_AWS_PROFILE at it. Optionally set AWS_REGION/CLOUD_HARVESTER_AWS_REGION to control default regions.
  • Azure: Create an App Registration (service principal) in Microsoft Entra ID and assign it the required RBAC roles on your subscription (Reader, Security Reader, Key Vault Reader). Capture:

    • tenant_id, client_id, client_secret from the service principal
    • subscription_id for the target subscription If Azure AD collectors are needed, add Microsoft Graph app permissions (e.g., Directory.Read.All) and have an admin grant consent.
      Either set AZURE_SUBSCRIPTION_ID / AZURE_TENANT_ID (or CLOUD_HARVESTER_*) or pass a ClientSecretCredential created from these values.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloud_harvester-0.1.3.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloud_harvester-0.1.3-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file cloud_harvester-0.1.3.tar.gz.

File metadata

  • Download URL: cloud_harvester-0.1.3.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for cloud_harvester-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f6d3ae793175a5e9a2693d7c82d1c01fc3f0b2b0b26c1943ccdba5fb03f1cd08
MD5 0a3f8e6c0a806ced46c373b19cbc9b00
BLAKE2b-256 80fd83c14e76d1c671ce6eb13ab59610494ac82894a42d12e99cfedd93899505

See more details on using hashes here.

File details

Details for the file cloud_harvester-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cloud_harvester-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 badd0cb104519d720a1396fe33b47bfb56991bf1f5588d4585c0f579630a4503
MD5 f4713aac5223c533af7bab0433645512
BLAKE2b-256 d4f7a9a9fb5515e5f6f0a3dfa2e9e2d098bb8972bec97aaced10bfa5618f6aa6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page