diff --git a/docs/data-sources/armada_armada.md b/docs/data-sources/armada_armada.md index 0b5a743..4f86ed7 100644 --- a/docs/data-sources/armada_armada.md +++ b/docs/data-sources/armada_armada.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Armada. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armada. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/armada_armada_v1.md b/docs/data-sources/armada_armada_v1.md index c89c8fd..7b68039 100644 --- a/docs/data-sources/armada_armada_v1.md +++ b/docs/data-sources/armada_armada_v1.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Armada. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armada. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/armada_armadaset.md b/docs/data-sources/armada_armadaset.md index c897747..8b70090 100644 --- a/docs/data-sources/armada_armadaset.md +++ b/docs/data-sources/armada_armadaset.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing ArmadaSet. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armadas in this set. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/armada_armadaset_v1.md b/docs/data-sources/armada_armadaset_v1.md index 3c395a7..53f5f2f 100644 --- a/docs/data-sources/armada_armadaset_v1.md +++ b/docs/data-sources/armada_armadaset_v1.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing ArmadaSet. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armadas in this set. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/container_branch.md b/docs/data-sources/container_branch.md index abe6a9c..5eb2be4 100644 --- a/docs/data-sources/container_branch.md +++ b/docs/data-sources/container_branch.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Branch. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired branch. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/container_branch_v1.md b/docs/data-sources/container_branch_v1.md index 7886680..378293d 100644 --- a/docs/data-sources/container_branch_v1.md +++ b/docs/data-sources/container_branch_v1.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Branch. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired branch. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/core_environment.md b/docs/data-sources/core_environment.md index a5c117c..e86f770 100644 --- a/docs/data-sources/core_environment.md +++ b/docs/data-sources/core_environment.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Environment. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec configures the environment. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/core_environment_v1.md b/docs/data-sources/core_environment_v1.md index 4cc2062..6d15f7e 100644 --- a/docs/data-sources/core_environment_v1.md +++ b/docs/data-sources/core_environment_v1.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Environment. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec configures the environment. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/core_region.md b/docs/data-sources/core_region.md index 2fc79a0..f2c4e73 100644 --- a/docs/data-sources/core_region.md +++ b/docs/data-sources/core_region.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Region. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired region configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/core_region_v1.md b/docs/data-sources/core_region_v1.md index 73ec2d5..a09683e 100644 --- a/docs/data-sources/core_region_v1.md +++ b/docs/data-sources/core_region_v1.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Region. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired region configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/core_site.md b/docs/data-sources/core_site.md index e66b5a7..283e508 100644 --- a/docs/data-sources/core_site.md +++ b/docs/data-sources/core_site.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Site. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired site configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/data-sources/core_site_v1.md b/docs/data-sources/core_site_v1.md index 0f8236b..cc425c5 100644 --- a/docs/data-sources/core_site_v1.md +++ b/docs/data-sources/core_site_v1.md @@ -17,6 +17,7 @@ Use this data source to access information about an existing Site. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired site configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/index.md b/docs/index.md index 37f175e..19ce625 100644 --- a/docs/index.md +++ b/docs/index.md @@ -23,7 +23,11 @@ terraform { } provider "ec" { - host = "" + host = "" + instances { + name = "my-other-instance" + host = "" + } } resource "ec_core_site" "test" { @@ -41,6 +45,23 @@ resource "ec_core_site" "test" { } } } + +resource "ec_core_site" "test2" { + instance = "my-other-instance" + metadata { + name = "test" + } + + spec { + description = "My other test" + credentials { + endpoint = "" + certificate = "" + namespace = "" + token = "" + } + } +} ``` @@ -50,7 +71,24 @@ resource "ec_core_site" "test" { - `client_id` (String) The oAuth2 client id to authenticate against. - `client_secret` (String) The oAuth2 client secret to authenticate against. -- `host` (String) The hostname (in form of URI) of Armada API. +- `host` (String) The hostname (in form of URI) of the Enterprise Console API. +- `instances` (Block List) Named Enterprise Console instances. (see [below for nested schema](#nestedblock--instances)) +- `password` (String) The password to authenticate with. +- `token_endpoint` (String) The URI to the token authentication endpoint. +- `username` (String) The user to authenticate with. + + +### Nested Schema for `instances` + +Required: + +- `client_id` (String) The oAuth2 client id to authenticate against. +- `host` (String) The hostname (in form of URI) of the Enterprise Console API. +- `name` (String) The instance name. + +Optional: + +- `client_secret` (String) The oAuth2 client secret to authenticate against. - `password` (String) The password to authenticate with. - `token_endpoint` (String) The URI to the token authentication endpoint. - `username` (String) The user to authenticate with. diff --git a/docs/resources/armada_armada.md b/docs/resources/armada_armada.md index d900752..83fbabd 100644 --- a/docs/resources/armada_armada.md +++ b/docs/resources/armada_armada.md @@ -17,6 +17,7 @@ An Armada distributes a specified number of Game Servers across a Region. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armada. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/armada_armada_v1.md b/docs/resources/armada_armada_v1.md index 9b06387..2cd3699 100644 --- a/docs/resources/armada_armada_v1.md +++ b/docs/resources/armada_armada_v1.md @@ -17,6 +17,7 @@ An Armada distributes a specified number of Game Servers across a Region. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armada. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/armada_armadaset.md b/docs/resources/armada_armadaset.md index c82f94d..732119c 100644 --- a/docs/resources/armada_armadaset.md +++ b/docs/resources/armada_armadaset.md @@ -17,6 +17,7 @@ An ArmadaSet manages Armadas across multiple Regions, while sharing a common spe ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armadas in this set. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/armada_armadaset_v1.md b/docs/resources/armada_armadaset_v1.md index e79618d..03e51df 100644 --- a/docs/resources/armada_armadaset_v1.md +++ b/docs/resources/armada_armadaset_v1.md @@ -17,6 +17,7 @@ An ArmadaSet manages Armadas across multiple Regions, while sharing a common spe ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired armadas in this set. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/container_branch.md b/docs/resources/container_branch.md index a64be7e..fcbc3e4 100644 --- a/docs/resources/container_branch.md +++ b/docs/resources/container_branch.md @@ -30,6 +30,7 @@ resource "ec_container_branch" "test" { ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired branch. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/container_branch_v1.md b/docs/resources/container_branch_v1.md index 75e3c7e..6634e81 100644 --- a/docs/resources/container_branch_v1.md +++ b/docs/resources/container_branch_v1.md @@ -30,6 +30,7 @@ resource "ec_container_branch_v1" "test" { ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired branch. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/core_environment.md b/docs/resources/core_environment.md index c17e43e..dd2231a 100644 --- a/docs/resources/core_environment.md +++ b/docs/resources/core_environment.md @@ -17,6 +17,7 @@ An Environment provides a mechanism to isolate groups of resources. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec configures the environment. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/core_environment_v1.md b/docs/resources/core_environment_v1.md index 4816fb6..d249a82 100644 --- a/docs/resources/core_environment_v1.md +++ b/docs/resources/core_environment_v1.md @@ -17,6 +17,7 @@ An Environment provides a mechanism to isolate groups of resources. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec configures the environment. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/core_region.md b/docs/resources/core_region.md index 26dcfeb..aa93ec7 100644 --- a/docs/resources/core_region.md +++ b/docs/resources/core_region.md @@ -17,6 +17,7 @@ A Region determines how Armadas are distributed across Sites. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired region configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/core_region_v1.md b/docs/resources/core_region_v1.md index 2ca7c3c..adc1261 100644 --- a/docs/resources/core_region_v1.md +++ b/docs/resources/core_region_v1.md @@ -17,6 +17,7 @@ A Region determines how Armadas are distributed across Sites. ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired region configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/core_site.md b/docs/resources/core_site.md index 8b436d1..1503e67 100644 --- a/docs/resources/core_site.md +++ b/docs/resources/core_site.md @@ -35,6 +35,7 @@ resource "ec_core_site" "test" { ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired site configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/docs/resources/core_site_v1.md b/docs/resources/core_site_v1.md index 2d628b5..caea674 100644 --- a/docs/resources/core_site_v1.md +++ b/docs/resources/core_site_v1.md @@ -35,6 +35,7 @@ resource "ec_core_site" "test" { ### Optional +- `instance` (String) Name is an instance name configured in the provider. - `metadata` (Block List, Max: 1) Standard object's metadata. (see [below for nested schema](#nestedblock--metadata)) - `spec` (Block List, Max: 1) Spec defines the desired site configuration. (see [below for nested schema](#nestedblock--spec)) diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 72efdf6..e442435 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -9,7 +9,11 @@ terraform { } provider "ec" { - host = "" + host = "" + instances { + name = "my-other-instance" + host = "" + } } resource "ec_core_site" "test" { @@ -27,3 +31,20 @@ resource "ec_core_site" "test" { } } } + +resource "ec_core_site" "test2" { + instance = "my-other-instance" + metadata { + name = "test" + } + + spec { + description = "My other test" + credentials { + endpoint = "" + certificate = "" + namespace = "" + token = "" + } + } +}