Importing existing services
Many applications rely on existing cloud resources or dependencies before adopting a structured service framework. With nullplatform, you can bring these resources into the service schema to build a service catalog that includes both pre-existing and newly created elements.
Building a service catalog:
- Helps identify which resources are used by which applications
- Makes it easier to monitor and manage resource usage
- Simplifies managing service parameters for applications
You can import services in three ways:
- Directly from the UI
- Programmatically using the API
- Using infrastructure-as-code (IaC) tools like Terraform
Import using the UI
You can import an existing service directly from the UI—making it easier to register pre-existing cloud resources without needing the CLI or API.
This flow is ideal when you already have a deployed service and want to track or expose it inside nullplatform without triggering any provisioning action. Instead of creating a new resource, you're simply defining where this service is visible across your organization.
How it works:
- Go to Platform settings > Services > + New service
- Select the existing service specification you want to use
- Fill in required attributes
- Define visibility: choose where the service should be visible (e.g., a namespace or specific applications)
- Click Create service
Once imported, the service will appear in the Development > Services view, and will be available for use by linked applications.
Import via API
When you create a service instance in nullplatform, it triggers a provisioning action. However, this is not needed for resources that already exist. To import an existing resource, use the service creation API with these settings:
- Set the
imported
value totrue
within theselectors
field - Set the status to
active
- Provide all required attributes defined in the service schema
Here's an example request
- CLI
- cURL
np service create \
--body '{
"name": "OpenWeather",
"status": "active",
"type": "dependency",
"linkable_to": [
"organization=1:account=2:namespace=3:application=4"
],
"dimensions": {
"environment": {
"required": true,
"values": ["dev", "stage"]
},
"country": {
"required": true
}
},
"entity_nrn": "organization=1:account=2:namespace=3:application=4",
"specification_id": "d33316ff-61e0-45d1-88d8-9e689e3859a4",
"attributes": {
"schema": {
"type": "object",
"required": [
"api_key"
],
"properties": {
"api_key": {
"type": "string",
"export": {
"secret": true
},
"readOnly": true
}
},
"additionalProperties": false
},
"values": {}
},
"selectors": {
"category": "SaaS",
"imported": true,
"provider": "OpenWeather",
"sub_category": "Weather"
}
}
curl -L 'https://api.nullplatform.com/service' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"name": "OpenWeather",
"status": "active",
"type": "dependency",
"linkable_to": [
"organization=1:account=2:namespace=3:application=4"
],
"dimensions": {
"environment": {
"required": true,
"values": ["dev", "stage"]
},
"country": {
"required": true
}
},
"entity_nrn": "organization=1:account=2:namespace=3:application=4",
"specification_id": "d33316ff-61e0-45d1-88d8-9e689e3859a4",
"attributes": {
"schema": {
"type": "object",
"required": [
"api_key"
],
"properties": {
"api_key": {
"type": "string",
"export": {
"secret": true
},
"readOnly": true
}
},
"additionalProperties": false
},
"values": {}
},
"selectors": {
"category": "SaaS",
"imported": true,
"provider": "OpenWeather",
"sub_category": "Weather"
}
}
Import using IaC tools
If you use infrastructure-as-code (IaC) tools like Terraform or OpenTofu, you can use our dedicated plugin to configure and import services. This integration helps you:
- Register existing resources as services
- Link services to nullplatform entities like applications or namespaces
This makes it easier to populate your service catalog from infrastructure you already manage in code.