Skip to content
Docs

    API Keys

    resource nirvana_api_key

    required Expand Collapse
    expires_at: Time

    When the API Key expires and is no longer valid.

    name: String

    API Key name.

    project_ids: List[String]

    Project IDs this API key is scoped to. At least one is required.

    permissions: List[Attributes]

    Scoped permissions for this API key. At least one is required.

    permission: String

    Permission level: “read” or “edit”.

    resource_type: String

    Resource type this permission applies to.

    optional Expand Collapse
    starts_at?: Time

    When the API Key starts to be valid.

    tags?: List[String]

    Tags to attach to the API Key.

    source_ip_rule?: Attributes

    IP filter rules.

    allowed?: List[String]

    List of IPv4 CIDR addresses to allow.

    blocked?: List[String]

    List of IPv4 CIDR addresses to deny.

    computed Expand Collapse
    id: String

    API Key ID.

    created_at: Time

    When the API Key was created.

    key: String

    API Key. Only returned on creation.

    managed: Bool

    Whether this API key is system-managed.

    status: String

    Status of the API Key.

    updated_at: Time

    When the API Key was updated.

    nirvana_api_key

    resource "nirvana_api_key" "example_api_key" {
      expires_at = "2025-12-31T23:59:59Z"
      name = "My API Key"
      permissions = [{
        permission = "edit"
        resource_type = "vm"
      }]
      project_ids = ["123e4567-e89b-12d3-a456-426614174000", "123e4567-e89b-12d3-a456-426614174001"]
      source_ip_rule = {
        allowed = ["192.168.1.0/24", "10.0.0.0/8"]
        blocked = ["192.168.1.100/32"]
      }
      starts_at = "2025-01-01T00:00:00Z"
      tags = ["production", "ethereum"]
    }
    

    data nirvana_api_key

    required Expand Collapse
    api_key_id: String
    computed Expand Collapse
    id: String
    created_at: Time

    When the API Key was created.

    expires_at: Time

    When the API Key expires and is no longer valid.

    key: String

    API Key. Only returned on creation.

    managed: Bool

    Whether this API key is system-managed.

    name: String

    API Key name.

    starts_at: Time

    When the API Key starts to be valid.

    status: String

    Status of the API Key.

    updated_at: Time

    When the API Key was updated.

    project_ids: List[String]

    Project IDs this API key is scoped to.

    tags: List[String]

    Tags to attach to the API Key.

    permissions: List[Attributes]

    Scoped permissions for this API key.

    permission: String

    Permission level: “read” or “edit”.

    resource_type: String

    Resource type this permission applies to.

    source_ip_rule: Attributes

    IP filter rules.

    allowed: List[String]

    List of IPv4 CIDR addresses to allow.

    blocked: List[String]

    List of IPv4 CIDR addresses to deny.

    nirvana_api_key

    data "nirvana_api_key" "example_api_key" {
      api_key_id = "api_key_id"
    }
    

    data nirvana_api_keys

    optional Expand Collapse
    max_items?: Int64

    Max items to fetch, default: 1000

    computed Expand Collapse
    items: List[Attributes]

    The items returned by the data source

    id: String

    API Key ID.

    created_at: Time

    When the API Key was created.

    expires_at: Time

    When the API Key expires and is no longer valid.

    managed: Bool

    Whether this API key is system-managed.

    name: String

    API Key name.

    permissions: List[Attributes]

    Scoped permissions for this API key.

    permission: String

    Permission level: “read” or “edit”.

    resource_type: String

    Resource type this permission applies to.

    project_ids: List[String]

    Project IDs this API key is scoped to.

    source_ip_rule: Attributes

    IP filter rules.

    allowed: List[String]

    List of IPv4 CIDR addresses to allow.

    blocked: List[String]

    List of IPv4 CIDR addresses to deny.

    status: String

    Status of the API Key.

    tags: List[String]

    Tags to attach to the API Key.

    updated_at: Time

    When the API Key was updated.

    key: String

    API Key. Only returned on creation.

    starts_at: Time

    When the API Key starts to be valid.

    nirvana_api_keys

    data "nirvana_api_keys" "example_api_keys" {
    
    }