-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add opensearch * update helpers, add tests * update client * add examples * add project id validators + replace plan modifiers * Automated docs update --------- Co-authored-by: Dean Oren <deangili.oren@mail.schwarz> Co-authored-by: do87 <do87@users.noreply.github.com>
- Loading branch information
1 parent
794cb41
commit b8e64ab
Showing
32 changed files
with
742 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_opensearch_credential Data Source - stackit" | ||
subcategory: "" | ||
description: |- | ||
Manages Opensearch credentials | ||
-> Environment support | ||
Productionhttps://opensearch.api.eu01.stackit.cloud | ||
QAhttps://opensearch.api.eu01.qa.stackit.cloud | ||
Devhttps://opensearch.api.eu01.dev.stackit.cloud | ||
By default, production is used.To set a custom URL, set an environment variable STACKITREDISBASEURL | ||
--- | ||
|
||
# stackit_opensearch_credential (Data Source) | ||
|
||
Manages Opensearch credentials | ||
|
||
<br /> | ||
|
||
-> __Environment support__<br /><table style='border-collapse: separate; border-spacing: 0px; margin-top:-20px; margin-left: 24px; font-size: smaller;'> | ||
<tr><td style='width: 100px; background: #fbfcff; border: none;'>Production</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>QA</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.qa.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>Dev</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.dev.stackit.cloud</td></tr> | ||
</table><br /> | ||
<small style='margin-left: 24px; margin-top: -5px; display: inline-block;'><a href="https://registry.terraform.io/providers/SchwarzIT/stackit/latest/docs#environment">By default</a>, production is used.<br />To set a custom URL, set an environment variable <code>STACKIT_REDIS_BASEURL</code></small> | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} | ||
resource "stackit_opensearch_credential" "example" { | ||
project_id = "example" | ||
instance_id = stackit_opensearch_instance.example.id | ||
} | ||
data "stackit_opensearch_credential" "example" { | ||
id = stackit_opensearch_credential.example.id | ||
project_id = "example" | ||
instance_id = stackit_opensearch_instance.example.id | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) Specifies the resource ID | ||
- `instance_id` (String) Instance ID the credential belongs to | ||
- `project_id` (String) Project ID the credential belongs to | ||
|
||
### Read-Only | ||
|
||
- `database_name` (String) Database name | ||
- `host` (String) Credential host | ||
- `hosts` (List of String) Credential hosts | ||
- `password` (String, Sensitive) Credential password | ||
- `port` (Number) Credential port | ||
- `route_service_url` (String) Credential route_service_url | ||
- `syslog_drain_url` (String) Credential syslog_drain_url | ||
- `uri` (String) The instance URI | ||
- `username` (String) Credential username | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_opensearch_instance Data Source - stackit" | ||
subcategory: "" | ||
description: |- | ||
Data source for Opensearch instances | ||
-> Environment support | ||
Productionhttps://opensearch.api.eu01.stackit.cloud | ||
QAhttps://opensearch.api.eu01.qa.stackit.cloud | ||
Devhttps://opensearch.api.eu01.dev.stackit.cloud | ||
By default, production is used.To set a custom URL, set an environment variable STACKITREDISBASEURL | ||
--- | ||
|
||
# stackit_opensearch_instance (Data Source) | ||
|
||
Data source for Opensearch instances | ||
|
||
<br /> | ||
|
||
-> __Environment support__<br /><table style='border-collapse: separate; border-spacing: 0px; margin-top:-20px; margin-left: 24px; font-size: smaller;'> | ||
<tr><td style='width: 100px; background: #fbfcff; border: none;'>Production</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>QA</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.qa.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>Dev</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.dev.stackit.cloud</td></tr> | ||
</table><br /> | ||
<small style='margin-left: 24px; margin-top: -5px; display: inline-block;'><a href="https://registry.terraform.io/providers/SchwarzIT/stackit/latest/docs#environment">By default</a>, production is used.<br />To set a custom URL, set an environment variable <code>STACKIT_REDIS_BASEURL</code></small> | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} | ||
data "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Specifies the instance name. | ||
- `project_id` (String) The project ID. | ||
|
||
### Read-Only | ||
|
||
- `acl` (List of String) Access Control rules to whitelist IP addresses | ||
- `cf_guid` (String) Cloud Foundry GUID | ||
- `cf_organization_guid` (String) Cloud Foundry Organization GUID | ||
- `cf_space_guid` (String) Cloud Foundry Space GUID | ||
- `dashboard_url` (String) Dashboard URL | ||
- `id` (String) Specifies the resource ID | ||
- `plan` (String) The RabbitMQ Plan | ||
- `plan_id` (String) The selected plan ID | ||
- `version` (String) RabbitMQ version | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_opensearch_credential Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
Manages Opensearch credentials | ||
-> Environment support | ||
Productionhttps://opensearch.api.eu01.stackit.cloud | ||
QAhttps://opensearch.api.eu01.qa.stackit.cloud | ||
Devhttps://opensearch.api.eu01.dev.stackit.cloud | ||
By default, production is used.To set a custom URL, set an environment variable STACKITREDISBASEURL | ||
--- | ||
|
||
# stackit_opensearch_credential (Resource) | ||
|
||
Manages Opensearch credentials | ||
|
||
<br /> | ||
|
||
-> __Environment support__<br /><table style='border-collapse: separate; border-spacing: 0px; margin-top:-20px; margin-left: 24px; font-size: smaller;'> | ||
<tr><td style='width: 100px; background: #fbfcff; border: none;'>Production</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>QA</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.qa.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>Dev</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.dev.stackit.cloud</td></tr> | ||
</table><br /> | ||
<small style='margin-left: 24px; margin-top: -5px; display: inline-block;'><a href="https://registry.terraform.io/providers/SchwarzIT/stackit/latest/docs#environment">By default</a>, production is used.<br />To set a custom URL, set an environment variable <code>STACKIT_REDIS_BASEURL</code></small> | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `instance_id` (String) Instance ID the credential belongs to | ||
- `project_id` (String) Project ID the credential belongs to | ||
|
||
### Read-Only | ||
|
||
- `database_name` (String) Database name | ||
- `host` (String) Credential host | ||
- `hosts` (List of String) Credential hosts | ||
- `id` (String) Specifies the resource ID | ||
- `password` (String, Sensitive) Credential password | ||
- `port` (Number) Credential port | ||
- `raw_response` (String, Sensitive) The full API response (as JSON string) | ||
- `route_service_url` (String) Credential route_service_url | ||
- `syslog_drain_url` (String) Credential syslog_drain_url | ||
- `uri` (String) The instance URI | ||
- `username` (String) Credential username | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_opensearch_instance Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
Manages Opensearch instances | ||
-> Environment support | ||
Productionhttps://opensearch.api.eu01.stackit.cloud | ||
QAhttps://opensearch.api.eu01.qa.stackit.cloud | ||
Devhttps://opensearch.api.eu01.dev.stackit.cloud | ||
By default, production is used.To set a custom URL, set an environment variable STACKITREDISBASEURL | ||
--- | ||
|
||
# stackit_opensearch_instance (Resource) | ||
|
||
Manages Opensearch instances | ||
|
||
<br /> | ||
|
||
-> __Environment support__<br /><table style='border-collapse: separate; border-spacing: 0px; margin-top:-20px; margin-left: 24px; font-size: smaller;'> | ||
<tr><td style='width: 100px; background: #fbfcff; border: none;'>Production</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>QA</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.qa.stackit.cloud</td></tr> | ||
<tr><td style='background: #fbfcff; border: none;'>Dev</td><td style='background: #fbfcff; border: none;'>https://opensearch.api.eu01.dev.stackit.cloud</td></tr> | ||
</table><br /> | ||
<small style='margin-left: 24px; margin-top: -5px; display: inline-block;'><a href="https://registry.terraform.io/providers/SchwarzIT/stackit/latest/docs#environment">By default</a>, production is used.<br />To set a custom URL, set an environment variable <code>STACKIT_REDIS_BASEURL</code></small> | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Specifies the instance name. Changing this value requires the resource to be recreated. Changing this value requires the resource to be recreated. | ||
- `project_id` (String) The project ID. | ||
|
||
### Optional | ||
|
||
- `acl` (List of String) Access Control rules to whitelist IP addresses | ||
- `plan` (String) The Opensearch Plan. Default is `stackit-opensearch-1.4.10-single` | ||
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) | ||
- `version` (String) Opensearch version. Default is 2 | ||
|
||
### Read-Only | ||
|
||
- `cf_guid` (String) Cloud Foundry GUID | ||
- `cf_organization_guid` (String) Cloud Foundry Organization GUID | ||
- `cf_space_guid` (String) Cloud Foundry Space GUID | ||
- `dashboard_url` (String) Dashboard URL | ||
- `id` (String) Specifies the resource ID | ||
- `plan_id` (String) The selected plan ID | ||
|
||
<a id="nestedatt--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `create` (String) | ||
- `delete` (String) | ||
- `update` (String) | ||
|
||
|
15 changes: 15 additions & 0 deletions
15
examples/data-sources/stackit_opensearch_credential/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
resource "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} | ||
|
||
resource "stackit_opensearch_credential" "example" { | ||
project_id = "example" | ||
instance_id = stackit_opensearch_instance.example.id | ||
} | ||
|
||
data "stackit_opensearch_credential" "example" { | ||
id = stackit_opensearch_credential.example.id | ||
project_id = "example" | ||
instance_id = stackit_opensearch_instance.example.id | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/data-sources/stackit_opensearch_instance/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} | ||
|
||
data "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/resources/stackit_opensearch_credential/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} | ||
|
||
resource "stackit_opensearch_credential" "example" { | ||
project_id = "example" | ||
instance_id = stackit_opensearch_instance.example.id | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/resources/stackit_opensearch_instance/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "stackit_opensearch_instance" "example" { | ||
name = "example" | ||
project_id = "example" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.