Resource Types

Humanitec makes it very easy for developers to declare a dependancy on a piece of technology (resource) without having to worry about how to provision or manage it.

Developers specify the type of the resource they want to use. Each resource type has an associated set of variable substitutions that can be used by the developer to configure their code to use the resource. Humanitec will provision the resource and resolve the variable substitutions at deployment time.

The following list provides an overview over the most used resources. Please reach out to us if you require any other specific resource type for your application.

postgres

Description

A PostgreSQL database which can optionally include required extensions.

Parameters

Parameter Description
extensions [Optional] A map of Postgres extension names where the values are potentially empty objects with optional keys schema defining the schema the extension’s objects should be loaded in and version specifying the version of the extension to use. See https://www.postgresql.org/docs/current/sql-createextension.html

Example

{
  "type": "postgres",
  "extensions": {
    "uuid-ossp": {}
  }
}

Variable Substitutions

Parameter Description
host The IP Address or DNS name of the host the instance is available on.
port The TCP port the database server is listening on.
name The name of the database to connect to.
username The username to use to connect to the database.
password The password to use to connect to the database.

s3

Description

An S3 bucket.

Parameters

None

Example

{
  "type": "s3"
}

Variable Substitutions

Parameter Description
bucket The globally unique name the bucket can be accessed via.
region Specifies the Region where the bucket was created.
aws_access_key_id The AWS Access Key ID for the account to access the S3 bucket under.
aws_secret_access_key The secret key associated with aws_access_key_id.

redis

Description

An redis compatible instance.

Parameters

None

Example

{
  "type": "redis"
}

Variable Substitutions

Parameter Description
host The IP Address or DNS name of the host the instance is available on.
port The TCP port the redis instance is listening on.
username The username to use to connect to the redis instance.
password The password to use to connect to the redis instance.

dns

Description

A DNS name for a module.

Note: This cannot be used as an external resource directly. It is used internally by Humanitec to provide Ingress to modules.

Parameters

Parameter Description
ip_address [Optional] The IPv4 address that the DNS name should resolve to.
ipv6_address [Optional] The IPv6 address that the DNS name should resolve to.
name [Optional] A valid fully qualified domain name that the DNS name should resolve to.
aws_hosted_zone [Optional] For DNS names being managed by Route53, the hosted zone that the DNS name should be in.

Note: to be valid, the definition must contain at least one of ip_address, ipv6_address or name.

Example

{
  "type": "dns",
  "ip_address": "1.2.3.4"
}

Variable Substitutions

Parameter Description
host The DNS name to use.
tls_cn The canonical name that the TLS certificate refers to. (Might not be the same as host.)
tls The TLS Key and Certificate in the Kubernetes TLS Secret format: tls.crt and tls.key properties containing what would ordinarily be in the .crt and .key files.