Request and use resources
For feature teams. This page explains managed-resources and consumed-resources. The first list is for resources that Joomiz creates for you. The second list is for resources that another team owns.
Managed resources
A managed resource is a resource that Joomiz creates and owns for your service, for example a database. The file says that the resource exists. When you apply, Joomiz asks the provisioner of the type to create it.
| Field | Required | Format | Meaning |
|---|---|---|---|
id | Yes | An id, unique in managed-resources of this environment | The name of the resource. |
type | Yes | A type of your platform | The kind of resource. |
spec | Yes | A map | The settings of the resource. The type decides which settings it needs. |
This is a PostgreSQL database:
# A database that Joomiz creates and owns for this service.
managed-resources:
- id: shop-db
type: postgres
spec:
flavor: cf-plan-small
version: "16"
storage-gb: 20
multi-az: false
| Setting | Format | Meaning |
|---|---|---|
flavor | Text | The size or plan of the database. |
version | Text, for example "16" | The PostgreSQL version. |
storage-gb | A number from 1 to 65536 | The storage, in gigabytes. |
multi-az | true or false | Whether the database spans more than one availability zone. |
Write version: "16" with quotes, so that the value is text. The complete file is the example quick-start-with-database.
This is an Azure Key Vault:
managed-resources:
- id: shop-vault
type: azure-key-vault
spec:
resource-group: container-shop-test-rg
location: westeurope
sku: premium
| Setting | Format | Meaning |
|---|---|---|
resource-group | Text | The Azure resource-group that holds the vault. |
location | Text, for example westeurope | The Azure region of the vault. |
sku | premium | The tier of the vault. |
A managed resource can report values after it is created. These values are its outputs. Point one value at another and Use outputs and secrets explain them.
Consumed resources
A consumed resource is a resource that another team owns and your service uses. You declare it so that the platform knows about the dependency.
| Field | Required | Format | Meaning |
|---|---|---|---|
id | Yes | An id, unique in consumed-resources of this environment | The name of the resource. |
type | Yes | A type of your platform | The kind of resource. |
spec | Yes | A map | The settings that identify the resource. |
This is a Kafka topic:
consumed-resources:
- id: shop-events
type: kafka-topic
spec:
topic: shop.test.events
The complete file with this topic is the example references.
This is a Splunk index:
consumed-resources:
- id: shop-logs
type: splunk-index
spec:
app: shop-observability
index: shop_test
The complete file with this index and the Key Vault is the example container-service.
| Type | Setting | Meaning |
|---|---|---|
kafka-topic | topic | The name of the topic, as the broker knows it. |
splunk-index | app | The Splunk app that the index belongs to. |
splunk-index | index | The name of the index. |
What a plan shows
A plan lists each resource under its category and type. The line managed-resource/azure-key-vault is for a managed resource. The line consumed-resource/splunk-index is for a consumed resource.
This plan comes from the example container-service. The order of the types in a plan can differ from one run to the next.
plan for joomiz.yaml in environment test (computed by https://joomiz.example.com/plan?environment=test)
consumed-resource/splunk-index: succeeded — Planned 1 change for consumed-resource/splunk-index.
shop-logs (created): succeeded — Would create 'shop-logs' (consumed-resource/splunk-index) in environment 'test'. Nothing was changed.
managed-resource/azure-key-vault: succeeded — Planned 1 change for managed-resource/azure-key-vault.
shop-vault (created): succeeded — Would create 'shop-vault' (managed-resource/azure-key-vault) in environment 'test'. Nothing was changed.
target/kubernetes-namespace: succeeded — Planned 1 change for target/kubernetes-namespace.
test-cluster (created): succeeded — Would create 'test-cluster' (target/kubernetes-namespace) in environment 'test'. Nothing was changed.
deployment/kubernetes-deployment: succeeded — Planned 1 change for deployment/kubernetes-deployment.
shop-test-deployment (created): succeeded — Would create 'shop-test-deployment' (deployment/kubernetes-deployment) in environment 'test'. Nothing was changed.
4 resource types, 4 resources
plan succeeded (revision ed38e100-5024-40c8-aa93-df2c741c8842, plan 385436a5-f376-4127-9a0d-3be45a50b419)
The words after (created) come from the provisioner of the type. A provisioner for a consumed resource can word its message in its own way.
Remove a resource
If you remove an entry from the file, the next plan lists a delete for it. The CLI prints this as (removed):
plan for joomiz.yaml in environment test (computed by https://joomiz.example.com/plan?environment=test)
consumed-resource/splunk-index: succeeded — Planned 1 change for consumed-resource/splunk-index.
shop-logs (removed): succeeded — Would remove 'shop-logs' (consumed-resource/splunk-index) in environment 'test'. Nothing was changed.
1 resource type, 1 resource
plan succeeded (revision b0859b84-edc4-4d9f-9be8-82d8ba6ac7bc, plan 2d079250-d5c2-415e-97b2-caf2baad96f7)
apply sends the delete to the provisioner of the type. The provisioner decides what the delete does to the real resource.
Remove every reference to the entry in the same change. A reference to an entry that is not in the file is an error. Point one value at another shows the message.
Next
See all the types that you can request in The types you can request.