Resource Packs

Resource Packs are reference implementations showing how to connect various cloud resources to the Humanitec Platform Orchestrator.

They can be used to quickly make resources available for development, as a collection of examples to learn about the Resource system, and as a baseline for production resources.

Available Resource Packs

AWS

The AWS Resource Pack allows connecting AWS cloud resources to the Platform Orchestrator. The following resources are available:

  • DNS (using Route53)
  • MySQL (using RDS classic or RDS Aurora)
  • Redis (using ElastiCache)
  • Postgres (using RDS or RDS Aurora)
  • S3
  • SQS

In addition the Resource Pack provides examples on how to configure EKS Pod Identities to access AWS services.

Azure

The Azure Resource Pack allows connecting Azure cloud resources to the Platform Orchestrator. The following resources are available:

  • Azure Blob Storage
  • Azure Service Bus Queue
  • DNS (using Azure Cloud DNS)
  • MySQL (using Azure Database for MySQL)
  • Postgres (using Azure Database for Postgres)
  • Redis (using Azure Cache for Redis)

In addition the Resource Pack provides examples on how to use Microsoft Entra Workload ID with Azure Kubernetes Service (AKS) to authenticate and access Azure cloud resources.

GCP

The GCP Resource Pack allows connecting GCP cloud resources to the Platform Orchestrator. The following resources are available:

  • DNS (using GCP Cloud DNS)
  • GCP Pub/Sub
  • GCP Cloud Storage
  • MySQL (using GCP Cloud SQL)
  • Postgres (using GCP Cloud SQL)
  • Redis (using GCP Memorystore)

In addition the Resource Pack provides examples on how to configure GKE Workload identity federation to access Google Cloud services.

In-Cluster

The In-Cluster Resource Pack allows provisioning resources inside the Kubernetes Cluster together with the deployed application. The following resources are available:

  • MySQL
  • Postgres
  • Redis

Usage

Resource Packs generally consist of a set of Resource Definitions based on Terraform. You can integrate them into your own Terraform code as modules using the Humanitec Terraform Provider as shown in the example below.

The Resource Definitions are internally using the Terraform Driver to provision and connect the cloud resources to the Platform Orchestrator. The cloud resources themselves are defined as further Terraform Modules in the same repository.

Each Resource Pack resource is directly referenceable and can be used like this:

resource "humanitec_application" "example" {
  id   = "rp-example"
  name = "rp-example"
}

variable "access_key" {
  type        = string
  description = "AWS Access Key"
}

variable "secret_key" {
  type        = string
  description = "AWS Secret Key"
}

variable "region" {
  type        = string
  description = "AWS Region to create resources"
}

variable "resource_packs_aws_url" {
  description = "AWS Resource Pack git url"
  type        = string
  default     = "https://github.com/humanitec-architecture/resource-packs-aws.git"
}

variable "resource_packs_aws_rev" {
  description = "AWS Resource Pack git branch"
  type        = string

  # Please pin to a specific commit or tag to avoid unexpected changes when deploying your application
  default = "refs/heads/main"
}

module "s3_basic" {
  # Please pin to a specific commit or tag to avoid unexpected changes when deploying your application
  source                 = "github.com/humanitec-architecture/resource-packs-aws//humanitec-resource-defs/s3/basic?ref=main"
  resource_packs_aws_url = var.resource_packs_aws_url
  resource_packs_aws_rev = var.resource_packs_aws_rev

  access_key = var.access_key
  secret_key = var.secret_key
  region     = var.region

  prefix = "rp-example-"
}

resource "humanitec_resource_definition_criteria" "s3_basic" {
  resource_definition_id = module.s3_basic.id
  app_id                 = humanitec_application.example.id
  class                  = "basic"
}

You can find more additional examples inside the examples/ folder of each Resource Pack.

As the code of all Resource Packs is open source, you can easily fork and customize the various aspects of the resource.

In case your forked repository is publicly available you can simply modify the resource_packs_aws_url and resource_packs_aws_rev variable of the example above to point at your fork.

If you prefer to use a private fork, refer to the Terraform Driver documentation on how to configure access credentials.

Top