---
sidebar_label: Import existing services
doc_id: a11435d8-c6a6-4e39-a9f2-4aecec995699
description: >-
  Guide for importing existing cloud resources into nullplatform's service
  catalog via UI, API, or IaC tools.
keywords:
  - service import
  - cloud resources
  - service catalog
  - nullplatform
  - infrastructure management
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Importing existing services

Many applications rely on existing cloud resources or dependencies before adopting a structured service framework. With
nullplatform, you can bring those resources into the service schema to build a 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, which makes it easier to register pre-existing cloud resources
without using 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:**

1. Go to **Platform settings > Services > + New service**
2. Select the existing **service specification** you want to use  
3. Fill in required attributes  
4. Define **visibility**: choose where the service should be visible (e.g., a namespace or specific applications)  
5. 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. This isn’t needed for
resources that already exist. To import an existing resource, use the [service creation API](/docs/api/service-create) with
these settings:

- Set the `imported` value to `true` within the `selectors` field  
- Set the status to `active`  
- Provide all required attributes defined in the service schema  

Here’s an example request:

<Tabs
defaultValue="import-service-cli"
values={[
{ label: 'CLI', value: 'import-service-cli' },
{ label: 'cURL', value: 'import-service-curl' },
]}>
<TabItem value="import-service-cli">

```bash
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"
  }
}
```

</TabItem>
<TabItem value="import-service-curl">

```bash
curl -L 'https://api.nullplatform.com/service' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-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"
  }
}
```

  </TabItem>
</Tabs> 

## Import using IaC tools

If you use infrastructure-as-code (IaC) tools like Terraform or OpenTofu, you can use
our [dedicated plugin](https://registry.terraform.io/providers/nullplatform/nullplatform/latest/docs)
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.
