From 28bee46013fddb50fbef28abdc24af6aad6fda00 Mon Sep 17 00:00:00 2001 From: Nicholas Wiersma Date: Tue, 17 Oct 2023 16:50:29 +0200 Subject: [PATCH] docs: add resource descriptions (#6) --- docs/data-sources/armada_armada.md | 4 ++-- docs/data-sources/armada_armada_v1.md | 4 ++-- docs/data-sources/armada_armadaset.md | 4 ++-- docs/data-sources/armada_armadaset_v1.md | 4 ++-- docs/data-sources/armada_branch.md | 4 ++-- docs/data-sources/armada_branch_v1.md | 4 ++-- docs/data-sources/armada_region.md | 4 ++-- docs/data-sources/armada_region_v1.md | 4 ++-- docs/data-sources/armada_site.md | 4 ++-- docs/data-sources/armada_site_v1.md | 4 ++-- docs/index.md | 2 +- docs/resources/armada_armada.md | 4 ++-- docs/resources/armada_armada_v1.md | 4 ++-- docs/resources/armada_armadaset.md | 4 ++-- docs/resources/armada_armadaset_v1.md | 4 ++-- docs/resources/armada_branch.md | 15 ++++++++++++++- docs/resources/armada_branch_v1.md | 15 ++++++++++++++- docs/resources/armada_region.md | 4 ++-- docs/resources/armada_region_v1.md | 4 ++-- docs/resources/armada_site.md | 4 ++-- docs/resources/armada_site_v1.md | 4 ++-- ec/armada/data_source_armada_armada.go | 1 + ec/armada/data_source_armada_armadaset.go | 1 + ec/armada/data_source_armada_branch.go | 1 + ec/armada/data_source_armada_region.go | 1 + ec/armada/data_source_armada_site.go | 1 + ec/armada/resource_armada_armada.go | 1 + ec/armada/resource_armada_armadaset.go | 1 + ec/armada/resource_armada_branch.go | 1 + ec/armada/resource_armada_region.go | 1 + ec/armada/resource_armada_site.go | 1 + examples/resources/ec_armada_branch/resource.tf | 10 ++++++++++ .../resources/ec_armada_branch_v1/resource.tf | 10 ++++++++++ 33 files changed, 95 insertions(+), 39 deletions(-) create mode 100644 examples/resources/ec_armada_branch/resource.tf create mode 100644 examples/resources/ec_armada_branch_v1/resource.tf diff --git a/docs/data-sources/armada_armada.md b/docs/data-sources/armada_armada.md index e329e26..033ddda 100644 --- a/docs/data-sources/armada_armada.md +++ b/docs/data-sources/armada_armada.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armada Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Armada. --- # ec_armada_armada (Data Source) - +Use this data source to access information about an existing Armada. diff --git a/docs/data-sources/armada_armada_v1.md b/docs/data-sources/armada_armada_v1.md index c17843f..dbabc53 100644 --- a/docs/data-sources/armada_armada_v1.md +++ b/docs/data-sources/armada_armada_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armada_v1 Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Armada. --- # ec_armada_armada_v1 (Data Source) - +Use this data source to access information about an existing Armada. diff --git a/docs/data-sources/armada_armadaset.md b/docs/data-sources/armada_armadaset.md index ad242a4..a7f21fc 100644 --- a/docs/data-sources/armada_armadaset.md +++ b/docs/data-sources/armada_armadaset.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armadaset Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing ArmadaSet. --- # ec_armada_armadaset (Data Source) - +Use this data source to access information about an existing ArmadaSet. diff --git a/docs/data-sources/armada_armadaset_v1.md b/docs/data-sources/armada_armadaset_v1.md index de1ef60..83726d4 100644 --- a/docs/data-sources/armada_armadaset_v1.md +++ b/docs/data-sources/armada_armadaset_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armadaset_v1 Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing ArmadaSet. --- # ec_armada_armadaset_v1 (Data Source) - +Use this data source to access information about an existing ArmadaSet. diff --git a/docs/data-sources/armada_branch.md b/docs/data-sources/armada_branch.md index acbfad0..414d8a4 100644 --- a/docs/data-sources/armada_branch.md +++ b/docs/data-sources/armada_branch.md @@ -3,12 +3,12 @@ page_title: "ec_armada_branch Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Branch. --- # ec_armada_branch (Data Source) - +Use this data source to access information about an existing Branch. diff --git a/docs/data-sources/armada_branch_v1.md b/docs/data-sources/armada_branch_v1.md index fad6e48..9f80f8b 100644 --- a/docs/data-sources/armada_branch_v1.md +++ b/docs/data-sources/armada_branch_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_branch_v1 Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Branch. --- # ec_armada_branch_v1 (Data Source) - +Use this data source to access information about an existing Branch. diff --git a/docs/data-sources/armada_region.md b/docs/data-sources/armada_region.md index 7083452..dcbf19e 100644 --- a/docs/data-sources/armada_region.md +++ b/docs/data-sources/armada_region.md @@ -3,12 +3,12 @@ page_title: "ec_armada_region Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Region. --- # ec_armada_region (Data Source) - +Use this data source to access information about an existing Region. diff --git a/docs/data-sources/armada_region_v1.md b/docs/data-sources/armada_region_v1.md index 72243b8..64fbe0f 100644 --- a/docs/data-sources/armada_region_v1.md +++ b/docs/data-sources/armada_region_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_region_v1 Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Region. --- # ec_armada_region_v1 (Data Source) - +Use this data source to access information about an existing Region. diff --git a/docs/data-sources/armada_site.md b/docs/data-sources/armada_site.md index 348d058..82f0b3f 100644 --- a/docs/data-sources/armada_site.md +++ b/docs/data-sources/armada_site.md @@ -3,12 +3,12 @@ page_title: "ec_armada_site Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Site. --- # ec_armada_site (Data Source) - +Use this data source to access information about an existing Site. diff --git a/docs/data-sources/armada_site_v1.md b/docs/data-sources/armada_site_v1.md index dcb1c9d..44093bf 100644 --- a/docs/data-sources/armada_site_v1.md +++ b/docs/data-sources/armada_site_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_site_v1 Data Source - terraform-provider-ec" subcategory: "" description: |- - + Use this data source to access information about an existing Site. --- # ec_armada_site_v1 (Data Source) - +Use this data source to access information about an existing Site. diff --git a/docs/index.md b/docs/index.md index 736badf..d4fa22d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -53,4 +53,4 @@ resource "ec_armada_site" "test" { - `host` (String) The hostname (in form of URI) of Armada API. - `password` (String) The password to authenticate with. - `token_endpoint` (String) The URI to the token authentication endpoint. -- `username` (String) The user to authenticate with. \ No newline at end of file +- `username` (String) The user to authenticate with. diff --git a/docs/resources/armada_armada.md b/docs/resources/armada_armada.md index 03f2b26..53da9e8 100644 --- a/docs/resources/armada_armada.md +++ b/docs/resources/armada_armada.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armada Resource - terraform-provider-ec" subcategory: "" description: |- - + An Armada distributes a specified number of Game Servers across a Region. --- # ec_armada_armada (Resource) - +An Armada distributes a specified number of Game Servers across a Region. diff --git a/docs/resources/armada_armada_v1.md b/docs/resources/armada_armada_v1.md index 6648760..e60d9d0 100644 --- a/docs/resources/armada_armada_v1.md +++ b/docs/resources/armada_armada_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armada_v1 Resource - terraform-provider-ec" subcategory: "" description: |- - + An Armada distributes a specified number of Game Servers across a Region. --- # ec_armada_armada_v1 (Resource) - +An Armada distributes a specified number of Game Servers across a Region. diff --git a/docs/resources/armada_armadaset.md b/docs/resources/armada_armadaset.md index acdc039..48f2a00 100644 --- a/docs/resources/armada_armadaset.md +++ b/docs/resources/armada_armadaset.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armadaset Resource - terraform-provider-ec" subcategory: "" description: |- - + An ArmadaSet manages Armadas across multiple Regions, while sharing a common specification. --- # ec_armada_armadaset (Resource) - +An ArmadaSet manages Armadas across multiple Regions, while sharing a common specification. diff --git a/docs/resources/armada_armadaset_v1.md b/docs/resources/armada_armadaset_v1.md index 3830630..1b007e7 100644 --- a/docs/resources/armada_armadaset_v1.md +++ b/docs/resources/armada_armadaset_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_armadaset_v1 Resource - terraform-provider-ec" subcategory: "" description: |- - + An ArmadaSet manages Armadas across multiple Regions, while sharing a common specification. --- # ec_armada_armadaset_v1 (Resource) - +An ArmadaSet manages Armadas across multiple Regions, while sharing a common specification. diff --git a/docs/resources/armada_branch.md b/docs/resources/armada_branch.md index 4f18cc8..3831b03 100644 --- a/docs/resources/armada_branch.md +++ b/docs/resources/armada_branch.md @@ -3,14 +3,27 @@ page_title: "ec_armada_branch Resource - terraform-provider-ec" subcategory: "" description: |- - + A Branch groups container Images. --- # ec_armada_branch (Resource) +A Branch groups container Images. +## Example Usage +```terraform +resource "ec_armada_branch" "test" { + metadata { + name = "test" + } + spec { + description = "My branch" + display_name = "Test" + } +} +``` ## Schema diff --git a/docs/resources/armada_branch_v1.md b/docs/resources/armada_branch_v1.md index a1a31f5..83240f2 100644 --- a/docs/resources/armada_branch_v1.md +++ b/docs/resources/armada_branch_v1.md @@ -3,14 +3,27 @@ page_title: "ec_armada_branch_v1 Resource - terraform-provider-ec" subcategory: "" description: |- - + A Branch groups container Images. --- # ec_armada_branch_v1 (Resource) +A Branch groups container Images. +## Example Usage +```terraform +resource "ec_armada_branch_v1" "test" { + metadata { + name = "test" + } + spec { + description = "My branch" + display_name = "Test" + } +} +``` ## Schema diff --git a/docs/resources/armada_region.md b/docs/resources/armada_region.md index 025c0b3..7130b3f 100644 --- a/docs/resources/armada_region.md +++ b/docs/resources/armada_region.md @@ -3,12 +3,12 @@ page_title: "ec_armada_region Resource - terraform-provider-ec" subcategory: "" description: |- - + A Region determines how Armadas are distributed across Sites. --- # ec_armada_region (Resource) - +A Region determines how Armadas are distributed across Sites. diff --git a/docs/resources/armada_region_v1.md b/docs/resources/armada_region_v1.md index f2fbb83..40122f3 100644 --- a/docs/resources/armada_region_v1.md +++ b/docs/resources/armada_region_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_region_v1 Resource - terraform-provider-ec" subcategory: "" description: |- - + A Region determines how Armadas are distributed across Sites. --- # ec_armada_region_v1 (Resource) - +A Region determines how Armadas are distributed across Sites. diff --git a/docs/resources/armada_site.md b/docs/resources/armada_site.md index 977b930..046dbed 100644 --- a/docs/resources/armada_site.md +++ b/docs/resources/armada_site.md @@ -3,12 +3,12 @@ page_title: "ec_armada_site Resource - terraform-provider-ec" subcategory: "" description: |- - + A Site provides a connection to deployment capacity. --- # ec_armada_site (Resource) - +A Site provides a connection to deployment capacity. ## Example Usage diff --git a/docs/resources/armada_site_v1.md b/docs/resources/armada_site_v1.md index 042de53..730dd3f 100644 --- a/docs/resources/armada_site_v1.md +++ b/docs/resources/armada_site_v1.md @@ -3,12 +3,12 @@ page_title: "ec_armada_site_v1 Resource - terraform-provider-ec" subcategory: "" description: |- - + A Site provides a connection to deployment capacity. --- # ec_armada_site_v1 (Resource) - +A Site provides a connection to deployment capacity. ## Example Usage diff --git a/ec/armada/data_source_armada_armada.go b/ec/armada/data_source_armada_armada.go index 13b80c2..f3dbd01 100644 --- a/ec/armada/data_source_armada_armada.go +++ b/ec/armada/data_source_armada_armada.go @@ -10,6 +10,7 @@ import ( // DataSourceArmadaArmada returns the data source resource for an Armada. func DataSourceArmadaArmada() *schema.Resource { return &schema.Resource{ + Description: "Use this data source to access information about an existing Armada.", ReadContext: dataSourceArmadaArmadaRead, Schema: armadaSchema(), } diff --git a/ec/armada/data_source_armada_armadaset.go b/ec/armada/data_source_armada_armadaset.go index e1d9712..3f643a5 100644 --- a/ec/armada/data_source_armada_armadaset.go +++ b/ec/armada/data_source_armada_armadaset.go @@ -10,6 +10,7 @@ import ( // DataSourceArmadaArmadaSet returns the data source resource for an ArmadaSet. func DataSourceArmadaArmadaSet() *schema.Resource { return &schema.Resource{ + Description: "Use this data source to access information about an existing ArmadaSet.", ReadContext: dataSourceArmadaArmadaSetRead, Schema: armadaSetSchema(), } diff --git a/ec/armada/data_source_armada_branch.go b/ec/armada/data_source_armada_branch.go index 1ba10aa..abe9b1f 100644 --- a/ec/armada/data_source_armada_branch.go +++ b/ec/armada/data_source_armada_branch.go @@ -10,6 +10,7 @@ import ( // DataSourceArmadaBranch returns the data source resource for a Branch. func DataSourceArmadaBranch() *schema.Resource { return &schema.Resource{ + Description: "Use this data source to access information about an existing Branch.", ReadContext: dataSourceArmadaBranchRead, Schema: branchSchema(), } diff --git a/ec/armada/data_source_armada_region.go b/ec/armada/data_source_armada_region.go index 26964c3..a69620a 100644 --- a/ec/armada/data_source_armada_region.go +++ b/ec/armada/data_source_armada_region.go @@ -10,6 +10,7 @@ import ( // DataSourceArmadaRegion returns the data source resource for a Region. func DataSourceArmadaRegion() *schema.Resource { return &schema.Resource{ + Description: "Use this data source to access information about an existing Region.", ReadContext: dataSourceArmadaRegionRead, Schema: regionSchema(), } diff --git a/ec/armada/data_source_armada_site.go b/ec/armada/data_source_armada_site.go index ff2f0fb..51066a0 100644 --- a/ec/armada/data_source_armada_site.go +++ b/ec/armada/data_source_armada_site.go @@ -10,6 +10,7 @@ import ( // DataSourceArmadaSite returns the data source resource for a Site. func DataSourceArmadaSite() *schema.Resource { return &schema.Resource{ + Description: "Use this data source to access information about an existing Site.", ReadContext: dataSourceArmadaSiteRead, Schema: siteSchema(), } diff --git a/ec/armada/resource_armada_armada.go b/ec/armada/resource_armada_armada.go index 2213268..8b53fff 100644 --- a/ec/armada/resource_armada_armada.go +++ b/ec/armada/resource_armada_armada.go @@ -14,6 +14,7 @@ import ( // ResourceArmadaArmada returns the resource for an Armada. func ResourceArmadaArmada() *schema.Resource { return &schema.Resource{ + Description: "An Armada distributes a specified number of Game Servers across a Region.", ReadContext: resourceArmadaArmadaRead, CreateContext: resourceArmadaArmadaCreate, UpdateContext: resourceArmadaArmadaUpdate, diff --git a/ec/armada/resource_armada_armadaset.go b/ec/armada/resource_armada_armadaset.go index f65e74b..5d14a7c 100644 --- a/ec/armada/resource_armada_armadaset.go +++ b/ec/armada/resource_armada_armadaset.go @@ -14,6 +14,7 @@ import ( // ResourceArmadaArmadaSet returns the resource for an ArmadaSet. func ResourceArmadaArmadaSet() *schema.Resource { return &schema.Resource{ + Description: "An ArmadaSet manages Armadas across multiple Regions, while sharing a common specification.", ReadContext: resourceArmadaArmadaSetRead, CreateContext: resourceArmadaArmadaSetCreate, UpdateContext: resourceArmadaArmadaSetUpdate, diff --git a/ec/armada/resource_armada_branch.go b/ec/armada/resource_armada_branch.go index 1f3a38e..43630b0 100644 --- a/ec/armada/resource_armada_branch.go +++ b/ec/armada/resource_armada_branch.go @@ -14,6 +14,7 @@ import ( // ResourceArmadaBranch returns the resource for a Branch. func ResourceArmadaBranch() *schema.Resource { return &schema.Resource{ + Description: "A Branch groups container Images.", ReadContext: resourceArmadaBranchRead, CreateContext: resourceArmadaBranchCreate, UpdateContext: resourceArmadaBranchUpdate, diff --git a/ec/armada/resource_armada_region.go b/ec/armada/resource_armada_region.go index 2851a31..118fa18 100644 --- a/ec/armada/resource_armada_region.go +++ b/ec/armada/resource_armada_region.go @@ -14,6 +14,7 @@ import ( // ResourceArmadaRegion returns the resource for a Region. func ResourceArmadaRegion() *schema.Resource { return &schema.Resource{ + Description: "A Region determines how Armadas are distributed across Sites.", ReadContext: resourceArmadaRegionRead, CreateContext: resourceArmadaRegionCreate, UpdateContext: resourceArmadaRegionUpdate, diff --git a/ec/armada/resource_armada_site.go b/ec/armada/resource_armada_site.go index 8b3a6e1..8033997 100644 --- a/ec/armada/resource_armada_site.go +++ b/ec/armada/resource_armada_site.go @@ -14,6 +14,7 @@ import ( // ResourceArmadaSite returns the resource for a Site. func ResourceArmadaSite() *schema.Resource { return &schema.Resource{ + Description: "A Site provides a connection to deployment capacity.", ReadContext: resourceArmadaSiteRead, CreateContext: resourceArmadaSiteCreate, UpdateContext: resourceArmadaSiteUpdate, diff --git a/examples/resources/ec_armada_branch/resource.tf b/examples/resources/ec_armada_branch/resource.tf new file mode 100644 index 0000000..a2cdc21 --- /dev/null +++ b/examples/resources/ec_armada_branch/resource.tf @@ -0,0 +1,10 @@ +resource "ec_armada_branch" "test" { + metadata { + name = "test" + } + + spec { + description = "My branch" + display_name = "Test" + } +} diff --git a/examples/resources/ec_armada_branch_v1/resource.tf b/examples/resources/ec_armada_branch_v1/resource.tf new file mode 100644 index 0000000..ce916e2 --- /dev/null +++ b/examples/resources/ec_armada_branch_v1/resource.tf @@ -0,0 +1,10 @@ +resource "ec_armada_branch_v1" "test" { + metadata { + name = "test" + } + + spec { + description = "My branch" + display_name = "Test" + } +}