Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data-sources/dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ output "by_slug" {

Read-Only:

- `id` (Number) The ID of this resource.
- `id` (Number)
- `name` (String)
- `nrn` (String)
- `slug` (String)
Expand Down
36 changes: 36 additions & 0 deletions docs/resources/dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,43 @@ description: |-

The dimension resource allows you to configure a Nullplatform Dimension

## Example Usage

```terraform
terraform {
required_providers {
nullplatform = {
source = "nullplatform/nullplatform"
}
}
}

provider "nullplatform" {
}

resource "nullplatform_dimension" "ordered_dimension" {
name = "RegionTest"
order = 2
nrn = "organization=1255165411:account=95118862:namespace=1991443329:application=213260358"
}

resource "nullplatform_dimension" "component_dimension" {
name = "DepartmentTest"
account = "kwik-e-mart-main"
namespace = "services-day-dic-2024"
order = 3
}

output "dimension_slug" {
description = "The generated slug for the dimension"
value = nullplatform_dimension.ordered_dimension.slug
}

output "dimension_status" {
description = "The current status of the dimension"
value = nullplatform_dimension.component_dimension.status
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
40 changes: 40 additions & 0 deletions docs/resources/dimension_value.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,47 @@ description: |-

The dimension_value resource allows you to configure a Nullplatform Dimension Value

## Example Usage

```terraform
terraform {
required_providers {
nullplatform = {
source = "nullplatform/nullplatform"
}
}
}

provider "nullplatform" {}

resource "nullplatform_dimension_value" "prod_env" {
dimension_id = 12345
name = "Production"
nrn = "organization=1234567890:account=987654321:namespace=1122334455:value=prod"
}

resource "nullplatform_dimension_value" "staging_env" {
dimension_id = 12345
name = "Staging"
organization = "1234567890"
account = "my-account"
namespace = "platform-config"
}

resource "nullplatform_dimension_value" "dev_env" {
dimension_id = data.nullplatform_dimension.env_dimension.id
name = "Development"
nrn = "${data.nullplatform_dimension.env_dimension.nrn}:value=dev"
}

output "prod_env_slug" {
value = nullplatform_dimension_value.prod_env.slug
}

output "prod_env_status" {
value = nullplatform_dimension_value.prod_env.status
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
149 changes: 0 additions & 149 deletions docs/resources/link_specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,155 +46,6 @@ resource "nullplatform_link_specification" "redis_link_spec" {
sub_category = "In-memory Database Integration"
}
}

# Resource: Action Specification
resource "nullplatform_action_specification" "create_redis_action" {
name = "Create Redis Instance"
type = "create" # Options: "custom", "create", "update", "delete"
service_specification_id = nullplatform_service_specification.redis_service_spec.id
retryable = false

parameters = jsonencode({
schema = {
type = "object"
properties = {
size = {
type = "string"
enum = ["small", "medium", "large"]
default = "small"
}
vpc_id = {
type = "string"
config = "aws.vpcId"
readOnly = true
}
}
required = ["size"]
additionalProperties = false
}
values = {
size = "medium"
}
})

results = jsonencode({
schema = {
type = "object"
properties = {
redis_arn = { type = "string" }
redis_endpoint = { type = "string", target = "endpoint" }
redis_port = { type = "number", target = "port" }
}
additionalProperties = false
}
values = {}
})
}

# Resource: Action Specification for Updating Redis
resource "nullplatform_action_specification" "update_redis_action" {
name = "Update Redis Instance"
type = "update"
service_specification_id = nullplatform_service_specification.redis_service_spec.id
retryable = true

parameters = jsonencode({
schema = {
type = "object"
properties = {
size = {
type = "string"
enum = ["small", "medium", "large"]
}
}
required = ["size"]
additionalProperties = false
}
values = {}
})

results = jsonencode({
schema = {
type = "object"
properties = {
redis_arn = { type = "string" }
redis_endpoint = { type = "string", target = "endpoint" }
redis_port = { type = "number", target = "port" }
}
additionalProperties = false
}
values = {}
})
}

# Resource: Action Specification for Deleting Redis
resource "nullplatform_action_specification" "delete_redis_action" {
name = "Delete Redis Instance"
type = "delete"
service_specification_id = nullplatform_service_specification.redis_service_spec.id
retryable = true

parameters = jsonencode({
schema = {
type = "object"
properties = {}
additionalProperties = false
}
values = {}
})

results = jsonencode({
schema = {
type = "object"
properties = {}
additionalProperties = false
}
values = {}
})
}

# Resource: Link between Redis Service and Application
resource "nullplatform_link" "redis_link" {
name = "Redis Application Link"
service_id = nullplatform_service_specification.redis_service_spec.id
specification_id = nullplatform_link_specification.redis_link_spec.id
entity_nrn = data.nullplatform_application.app.nrn
linkable_to = [data.nullplatform_application.app.nrn]

dimensions = jsonencode({
environment = "development"
country = "argentina"
})

attributes = jsonencode({
schema = {}
values = {}
})
}

# Output the Redis Service Specification details
output "redis_service_spec" {
description = "Details of the Redis Service Specification"
value = nullplatform_service_specification.redis_service_spec
}

# Output the Redis Link Specification details
output "redis_link_spec" {
description = "Details of the Redis Link Specification"
value = nullplatform_link_specification.redis_link_spec
}

# Output the Create Redis Action Specification details
output "create_redis_action_spec" {
description = "Details of the Create Redis Action Specification"
value = nullplatform_action_specification.create_redis_action
}

# Output the Redis Link details
output "redis_link" {
description = "Details of the Redis Link"
value = nullplatform_link.redis_link
}
```

<!-- schema generated by tfplugindocs -->
Expand Down
86 changes: 86 additions & 0 deletions docs/resources/technology_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nullplatform_technology_template Resource - nullplatform"
subcategory: ""
description: |-
The technology_template resource allows you to manage nullplatform Technology Templates
---

# nullplatform_technology_template (Resource)

The technology_template resource allows you to manage nullplatform Technology Templates

## Example Usage

```terraform
terraform {
required_providers {
nullplatform = {
source = "nullplatform/nullplatform"
}
}
}

provider "nullplatform" {}

# Example Technology Template - Golang 1.17.9
resource "nullplatform_technology_template" "golang_1_17" {
name = "Golang 1.17.9"
url = "https://github.com/nullplatform/technology-templates-golang"

provider_config = {
repository = "technology-templates-golang"
}

components {
type = "language"
id = "google"
version = "1.17"
metadata = jsonencode({
"version": "1.17.9"
})
}

tags = [
"golang",
"backend"
]

metadata = jsonencode({})
rules = jsonencode({})
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `components` (Block List, Min: 1) List of components that make up the template (see [below for nested schema](#nestedblock--components))
- `name` (String) Name of the technology template
- `provider_config` (Map of String) Provider configuration for the template
- `url` (String) URL of the template repository

### Optional

- `account` (String) Account ID the template belongs to. If not specified, it will be a global template
- `metadata` (String) JSON string containing template metadata
- `rules` (String) JSON string containing template rules
- `tags` (List of String) List of tags associated with the template

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--components"></a>
### Nested Schema for `components`

Required:

- `id` (String) Identifier of the component
- `type` (String) Type of the component (e.g., language, framework)
- `version` (String) Version of the component

Optional:

- `metadata` (String) JSON string containing component metadata
Loading