diff --git a/docs/resources/elasticsearch_instance.md b/docs/resources/elasticsearch_instance.md index 37576da1..9d9eae3d 100644 --- a/docs/resources/elasticsearch_instance.md +++ b/docs/resources/elasticsearch_instance.md @@ -30,10 +30,8 @@ Manages ElasticSearch instances ```terraform resource "stackit_elasticsearch_instance" "example" { - name = "some_name_2" + name = "example" project_id = var.project_id - version = "7" - plan = "stackit-elasticsearch-single-medium" } ``` diff --git a/docs/resources/logme_instance.md b/docs/resources/logme_instance.md index 5e66b3dc..37f40645 100644 --- a/docs/resources/logme_instance.md +++ b/docs/resources/logme_instance.md @@ -31,9 +31,7 @@ Manages LogMe instances ```terraform resource "stackit_logme_instance" "example" { name = "example" - project_id = "example" - version = "LogMe" - plan = "stackit-logme-single-small-non-ssl" + project_id = var.project_id } ``` @@ -48,9 +46,9 @@ resource "stackit_logme_instance" "example" { ### Optional - `acl` (List of String) Access Control rules to whitelist IP addresses -- `plan` (String) The LogMe Plan. Default is `stackit-logme-1.4.10-single` +- `plan` (String) The LogMe Plan. Default is `stackit-logme2-1.4.10-single` - `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) -- `version` (String) LogMe version. Default is LogMe +- `version` (String) LogMe version. Default is 2 ### Read-Only diff --git a/docs/resources/mariadb_instance.md b/docs/resources/mariadb_instance.md index 15818c87..3f25dac3 100644 --- a/docs/resources/mariadb_instance.md +++ b/docs/resources/mariadb_instance.md @@ -31,9 +31,7 @@ Manages MariaDB instances ```terraform resource "stackit_mariadb_instance" "example" { name = "example" - project_id = "example" - version = "10.4" - plan = "stackit-mariadb-single-small" + project_id = var.project_id } ``` diff --git a/docs/resources/mongodb_flex_instance.md b/docs/resources/mongodb_flex_instance.md index 18bdffc8..a2589f39 100644 --- a/docs/resources/mongodb_flex_instance.md +++ b/docs/resources/mongodb_flex_instance.md @@ -33,6 +33,11 @@ resource "stackit_mongodb_flex_instance" "example" { name = "example" project_id = "example" machine_type = "1.1" + acl = [ + "193.148.160.0/19", + "45.129.40.0/21", + "45.135.244.0/22" + ] } ``` diff --git a/docs/resources/opensearch_instance.md b/docs/resources/opensearch_instance.md index 23266be5..d301bb75 100644 --- a/docs/resources/opensearch_instance.md +++ b/docs/resources/opensearch_instance.md @@ -26,7 +26,14 @@ Manages Opensearch instances
By default, production is used.
To set a custom URL, set an environment variable STACKIT_REDIS_BASEURL
- +## Example Usage + +```terraform +resource "stackit_opensearch_instance" "example" { + name = "example" + project_id = var.project_id +} +``` ## Schema diff --git a/docs/resources/postgres_flex_instance.md b/docs/resources/postgres_flex_instance.md index b2b9df1f..1b39f7a1 100644 --- a/docs/resources/postgres_flex_instance.md +++ b/docs/resources/postgres_flex_instance.md @@ -33,6 +33,11 @@ resource "stackit_postgres_flex_instance" "example" { name = "example" project_id = "example" machine_type = "2.4" + acl = [ + "193.148.160.0/19", + "45.129.40.0/21", + "45.135.244.0/22" + ] } ``` diff --git a/docs/resources/postgres_instance.md b/docs/resources/postgres_instance.md index d052efea..2490d96a 100644 --- a/docs/resources/postgres_instance.md +++ b/docs/resources/postgres_instance.md @@ -31,9 +31,7 @@ Manages Postgres instances ```terraform resource "stackit_postgres_instance" "example" { name = "example" - project_id = "example" - version = "11" - plan = "stackit-postgresql-single-small" + project_id = var.project_id } ``` diff --git a/docs/resources/rabbitmq_instance.md b/docs/resources/rabbitmq_instance.md index 844a75a3..b0555c1c 100644 --- a/docs/resources/rabbitmq_instance.md +++ b/docs/resources/rabbitmq_instance.md @@ -31,9 +31,7 @@ Manages RabbitMQ instances ```terraform resource "stackit_rabbitmq_instance" "example" { name = "example" - project_id = "example" - version = "3.7" - plan = "stackit-rabbitmq-single-small" + project_id = var.project_id } ``` diff --git a/docs/resources/redis_instance.md b/docs/resources/redis_instance.md index 5c34f06f..d62a8c6f 100644 --- a/docs/resources/redis_instance.md +++ b/docs/resources/redis_instance.md @@ -31,9 +31,7 @@ Manages Redis instances ```terraform resource "stackit_redis_instance" "example" { name = "example" - project_id = "example" - version = "6" - plan = "stackit-redis-single-small" + project_id = var.project_id } ``` diff --git a/examples/resources/stackit_elasticsearch_instance/resource.tf b/examples/resources/stackit_elasticsearch_instance/resource.tf index 8f1e60f8..8b864bef 100644 --- a/examples/resources/stackit_elasticsearch_instance/resource.tf +++ b/examples/resources/stackit_elasticsearch_instance/resource.tf @@ -1,6 +1,4 @@ resource "stackit_elasticsearch_instance" "example" { - name = "some_name_2" + name = "example" project_id = var.project_id - version = "7" - plan = "stackit-elasticsearch-single-medium" } diff --git a/examples/resources/stackit_logme_instance/resource.tf b/examples/resources/stackit_logme_instance/resource.tf index dacdebe2..8ca3bc41 100644 --- a/examples/resources/stackit_logme_instance/resource.tf +++ b/examples/resources/stackit_logme_instance/resource.tf @@ -1,6 +1,4 @@ resource "stackit_logme_instance" "example" { name = "example" - project_id = "example" - version = "LogMe" - plan = "stackit-logme-single-small-non-ssl" + project_id = var.project_id } diff --git a/examples/resources/stackit_mariadb_instance/resource.tf b/examples/resources/stackit_mariadb_instance/resource.tf index 12c356f2..cbd389ce 100644 --- a/examples/resources/stackit_mariadb_instance/resource.tf +++ b/examples/resources/stackit_mariadb_instance/resource.tf @@ -1,6 +1,4 @@ resource "stackit_mariadb_instance" "example" { name = "example" - project_id = "example" - version = "10.4" - plan = "stackit-mariadb-single-small" + project_id = var.project_id } diff --git a/examples/resources/stackit_mongodb_flex_instance/resource.tf b/examples/resources/stackit_mongodb_flex_instance/resource.tf index dfc61d2c..6d36b5c7 100644 --- a/examples/resources/stackit_mongodb_flex_instance/resource.tf +++ b/examples/resources/stackit_mongodb_flex_instance/resource.tf @@ -2,4 +2,9 @@ resource "stackit_mongodb_flex_instance" "example" { name = "example" project_id = "example" machine_type = "1.1" + acl = [ + "193.148.160.0/19", + "45.129.40.0/21", + "45.135.244.0/22" + ] } diff --git a/examples/resources/stackit_opensearch_instance/data-source.tf b/examples/resources/stackit_opensearch_instance/resource.tf similarity index 72% rename from examples/resources/stackit_opensearch_instance/data-source.tf rename to examples/resources/stackit_opensearch_instance/resource.tf index 98a4d446..062d52f2 100644 --- a/examples/resources/stackit_opensearch_instance/data-source.tf +++ b/examples/resources/stackit_opensearch_instance/resource.tf @@ -1,4 +1,4 @@ resource "stackit_opensearch_instance" "example" { name = "example" - project_id = "example" + project_id = var.project_id } diff --git a/examples/resources/stackit_postgres_flex_instance/resource.tf b/examples/resources/stackit_postgres_flex_instance/resource.tf index c31277f5..21103820 100644 --- a/examples/resources/stackit_postgres_flex_instance/resource.tf +++ b/examples/resources/stackit_postgres_flex_instance/resource.tf @@ -2,4 +2,9 @@ resource "stackit_postgres_flex_instance" "example" { name = "example" project_id = "example" machine_type = "2.4" + acl = [ + "193.148.160.0/19", + "45.129.40.0/21", + "45.135.244.0/22" + ] } diff --git a/examples/resources/stackit_postgres_instance/resource.tf b/examples/resources/stackit_postgres_instance/resource.tf index a5acd6c5..0e448064 100644 --- a/examples/resources/stackit_postgres_instance/resource.tf +++ b/examples/resources/stackit_postgres_instance/resource.tf @@ -1,6 +1,4 @@ resource "stackit_postgres_instance" "example" { name = "example" - project_id = "example" - version = "11" - plan = "stackit-postgresql-single-small" + project_id = var.project_id } diff --git a/examples/resources/stackit_rabbitmq_instance/resource.tf b/examples/resources/stackit_rabbitmq_instance/resource.tf index d7bb0d2c..4644cde1 100644 --- a/examples/resources/stackit_rabbitmq_instance/resource.tf +++ b/examples/resources/stackit_rabbitmq_instance/resource.tf @@ -1,6 +1,4 @@ resource "stackit_rabbitmq_instance" "example" { name = "example" - project_id = "example" - version = "3.7" - plan = "stackit-rabbitmq-single-small" + project_id = var.project_id } diff --git a/examples/resources/stackit_redis_instance/resource.tf b/examples/resources/stackit_redis_instance/resource.tf index 2c86e721..9bd0873a 100644 --- a/examples/resources/stackit_redis_instance/resource.tf +++ b/examples/resources/stackit_redis_instance/resource.tf @@ -1,6 +1,4 @@ resource "stackit_redis_instance" "example" { name = "example" - project_id = "example" - version = "6" - plan = "stackit-redis-single-small" + project_id = var.project_id } diff --git a/stackit/internal/resources/data-services/instance/helpers.go b/stackit/internal/resources/data-services/instance/helpers.go index b8237f69..d9fc9d85 100644 --- a/stackit/internal/resources/data-services/instance/helpers.go +++ b/stackit/internal/resources/data-services/instance/helpers.go @@ -18,7 +18,7 @@ func (r Resource) getDefaultVersion() string { case ElasticSearch: return "7" case LogMe: - return "LogMe" + return "2" case MariaDB: return "10.6" case Opensearch: @@ -38,7 +38,7 @@ func (r Resource) getDefaultPlan() string { case ElasticSearch: return "stackit-elasticsearch-1.4.10-single" case LogMe: - return "stackit-logme-1.4.10-single" + return "stackit-logme2-1.4.10-single" case MariaDB: return "stackit-mariadb-1.4.10-single" case Opensearch: diff --git a/stackit/internal/resources/data-services/instance/resource_logme_test.go b/stackit/internal/resources/data-services/instance/resource_logme_test.go index c7a0167b..3a1e0217 100644 --- a/stackit/internal/resources/data-services/instance/resource_logme_test.go +++ b/stackit/internal/resources/data-services/instance/resource_logme_test.go @@ -23,11 +23,11 @@ func TestAcc_ResourceLogMeInstanceJob(t *testing.T) { } name := "odjtest-" + acctest.RandStringFromCharSet(7, acctest.CharSetAlpha) - plan1 := "stackit-logme-single-small-non-ssl" - planID1 := "839695A3-6943-4F55-8FB0-9469143178DE" - plan2 := "stackit-logme-single-medium-non-ssl" - planID2 := "84beabaf-605d-4f00-8a9b-272bd009ad76" - version := "LogMe" + plan1 := "stackit-logme2-1.4.10-single" + planID1 := "7a54492c-8a2e-4d3c-b6c2-a4f20cb65912" + plan2 := "stackit-logme2-2.8.50-single" + planID2 := "6147ee05-3a78-461a-b6e7-af65e65f1ce6" + version := "2" resource.ParallelTest(t, resource.TestCase{ ProtoV6ProviderFactories: map[string]func() (tfprotov6.ProviderServer, error){