Skip to content

Commit

Permalink
docs: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nrwiersma committed Oct 17, 2023
1 parent 14573b6 commit f096905
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 7 deletions.
32 changes: 31 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,37 @@ Use the Enterprise Console provider to interact with Nitrado Enterprise Console.

## Example Usage

{{tffile "/Users/nrwiersma/Go/src/github.com/nitrado/terraform-provider-ec/examples/provider/provider.tf"}}
```terraform
terraform {
required_providers {
ec = {
source = "nitrado/ec"
version = ">=1.0.0"
}
}
required_version = ">= 0.14"
}
provider "ec" {
host = "<your armada host url>"
}
resource "ec_armada_site" "test" {
metadata {
name = "test"
}
spec {
description = "My test"
credentials {
endpoint = "<your endpoint>"
certificate = "<your cert>"
namespace = "<your ns>"
token = "<your token>"
}
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
20 changes: 19 additions & 1 deletion docs/resources/armada_site.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@ description: |-




## Example Usage

```terraform
resource "ec_armada_site" "test" {
metadata {
name = "test"
}
spec {
description = "My test"
credentials {
endpoint = "<your endpoint>"
certificate = "<your cert>"
namespace = "<your ns>"
token = "<your token>"
}
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
20 changes: 19 additions & 1 deletion docs/resources/armada_site_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@ description: |-




## Example Usage

```terraform
resource "ec_armada_site_v1" "test" {
metadata {
name = "test"
}
spec {
description = "My test"
credentials {
endpoint = "<your endpoint>"
certificate = "<your cert>"
namespace = "<your ns>"
token = "<your token>"
}
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
1 change: 0 additions & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ resource "ec_armada_site" "test" {
}
}
}

15 changes: 15 additions & 0 deletions examples/resources/ec_armada_site/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "ec_armada_site" "test" {
metadata {
name = "test"
}

spec {
description = "My test"
credentials {
endpoint = "<your endpoint>"
certificate = "<your cert>"
namespace = "<your ns>"
token = "<your token>"
}
}
}
15 changes: 15 additions & 0 deletions examples/resources/ec_armada_site_v1/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "ec_armada_site_v1" "test" {
metadata {
name = "test"
}

spec {
description = "My test"
credentials {
endpoint = "<your endpoint>"
certificate = "<your cert>"
namespace = "<your ns>"
token = "<your token>"
}
}
}
4 changes: 1 addition & 3 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ description: |-

Use the Enterprise Console provider to interact with Nitrado Enterprise Console.

{{ if .HasExample -}}
## Example Usage

{{ printf "{{tffile %q}}" .ExampleFile }}
{{- end }}
{{tffile "examples/provider/provider.tf"}}

{{ .SchemaMarkdown | trimspace }}

0 comments on commit f096905

Please sign in to comment.