Skip to content

Commit

Permalink
add import instructions for project, branch and endpoint resources
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kisler <[email protected]>
  • Loading branch information
kislerdm committed Oct 4, 2024
1 parent fbbbf38 commit 1272f7a
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 9 deletions.
25 changes: 23 additions & 2 deletions docs/resources/branch.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "neon_branch Resource - terraform-provider-neon"
subcategory: ""
description: |-
Expand Down Expand Up @@ -64,3 +62,26 @@ Set whether the branch is protected.

- `id` (String) Branch ID.
- `logical_size` (Number) Branch logical size in MB.



## Import

The Neon Branch can be imported to the terraform state by its identifier.

Import using the [import block](https://developer.hashicorp.com/terraform/language/import):

For example:

```hcl
import {
to = neon_branch.this
id = "br-snowy-mountain-a5jkb18i"
}
```

Import using the command `terraform import`:

```commandline
terraform import neon_branch.this br-snowy-mountain-a5jkb18i
```
28 changes: 25 additions & 3 deletions docs/resources/endpoint.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "neon_endpoint Resource - terraform-provider-neon"
subcategory: ""
description: |-
Project Endpoint. See details: https://neon.tech/docs/manage/endpoints/
!> Note that "read_write" type is only supported yet, and a single "read_write" endpoint is permitted per branch. It means that no additional endpoints can be provisioned for branches with existing endpoints. It also means that no endpoints can be created for branches provisioned with this terraform provider because every branch has the default endpoint attached.

!> Note that "read_write" type is only supported yet, and a single "read_write" endpoint is permitted per branch. It means that no additional endpoints can be provisioned for branches with existing endpoints. It also means that no endpoints can be created for branches provisioned with this terraform provider because every branch has the default endpoint attached.
---

# neon_endpoint (Resource)
Expand Down Expand Up @@ -64,3 +63,26 @@ The maximum value is 604800 seconds (1 week)
- `host` (String) Endpoint URI.
- `id` (String) Endpoint ID.
- `proxy_host` (String)



## Import

The Neon Endpoint can be imported to the terraform state by its identifier.

Import using the [import block](https://developer.hashicorp.com/terraform/language/import):

For example:

```hcl
import {
to = neon_endpoint.this
id = "ep-black-mouse-a64dr7wp"
}
```

Import using the command `terraform import`:

```commandline
terraform import neon_endpoint.this ep-black-mouse-a64dr7wp
```
31 changes: 27 additions & 4 deletions docs/resources/project.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "neon_project Resource - terraform-provider-neon"
subcategory: ""
description: |-
Neon Project.
See details: https://neon.tech/docs/get-started-with-neon/setting-up-a-project/
API: https://api-docs.neon.tech/reference/createproject

See details: https://neon.tech/docs/get-started-with-neon/setting-up-a-project/
API: https://api-docs.neon.tech/reference/createproject
---

# neon_project (Resource)
Expand Down Expand Up @@ -187,3 +186,27 @@ Optional:
- `data_transfer_bytes` (Number) Total amount of data transferred from all of a project's branches using the proxy.
- `logical_size_bytes` (Number) Limit on the logical size of every project's branch.
- `written_data_bytes` (Number) Total amount of data written to all of a project's branches.




## Import

The Neon Project can be imported to the terraform state by its identifier.

Import using the [import block](https://developer.hashicorp.com/terraform/language/import):

For example:

```hcl
import {
to = neon_project.this
id = "shiny-cell-31746257"
}
```

Import using the command `terraform import`:

```commandline
terraform import neon_project.this shiny-cell-31746257
```
36 changes: 36 additions & 0 deletions templates/resources/branch.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
page_title: "{{ .Name }} {{ .Type }} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description }}
---

# {{ .Name }} ({{ .Type }})

{{ .Description }}

## Example Usage

{{ tffile "examples/resources/neon_branch/resource.tf" }}

{{.SchemaMarkdown}}

## Import

The Neon Branch can be imported to the terraform state by its identifier.

Import using the [import block](https://developer.hashicorp.com/terraform/language/import):

For example:

```hcl
import {
to = {{.Name}}.this
id = "br-snowy-mountain-a5jkb18i"
}
```

Import using the command `terraform import`:

```commandline
terraform import {{.Name}}.this br-snowy-mountain-a5jkb18i
```
36 changes: 36 additions & 0 deletions templates/resources/endpoint.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
page_title: "{{ .Name }} {{ .Type }} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description }}
---

# {{ .Name }} ({{ .Type }})

{{ .Description }}

## Example Usage

{{ tffile "examples/resources/neon_endpoint/resource.tf" }}

{{.SchemaMarkdown}}

## Import

The Neon Endpoint can be imported to the terraform state by its identifier.

Import using the [import block](https://developer.hashicorp.com/terraform/language/import):

For example:

```hcl
import {
to = {{.Name}}.this
id = "ep-black-mouse-a64dr7wp"
}
```

Import using the command `terraform import`:

```commandline
terraform import {{.Name}}.this ep-black-mouse-a64dr7wp
```
36 changes: 36 additions & 0 deletions templates/resources/project.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
page_title: "{{ .Name }} {{ .Type }} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description }}
---

# {{ .Name }} ({{ .Type }})

{{ .Description }}

## Example Usage

{{ tffile "examples/resources/neon_project/resource.tf" }}

{{.SchemaMarkdown}}

## Import

The Neon Project can be imported to the terraform state by its identifier.

Import using the [import block](https://developer.hashicorp.com/terraform/language/import):

For example:

```hcl
import {
to = {{.Name}}.this
id = "shiny-cell-31746257"
}
```

Import using the command `terraform import`:

```commandline
terraform import {{.Name}}.this shiny-cell-31746257
```

0 comments on commit 1272f7a

Please sign in to comment.