diff --git a/Makefile b/Makefile
index 91d641b5..0e644f94 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ lint: lint-golangci-lint lint-tf
generate-docs:
@echo "Generating documentation with tfplugindocs"
@$(SCRIPTS_BASE)/tfplugindocs.sh
+ # workaround until STACKITTPR-165 will be resolved
+ @git apply $(SCRIPTS_BASE)/docs.patch
build:
@go build -o bin/terraform-provider-stackit
diff --git a/docs/data-sources/objectstorage_bucket.md b/docs/data-sources/objectstorage_bucket.md
index 25546f99..81b8479c 100644
--- a/docs/data-sources/objectstorage_bucket.md
+++ b/docs/data-sources/objectstorage_bucket.md
@@ -36,5 +36,3 @@ data "stackit_objectstorage_bucket" "example" {
- `id` (String) Terraform's internal data source identifier. It is structured as "`project_id`,`name`".
- `url_path_style` (String)
- `url_virtual_hosted_style` (String)
-
-
diff --git a/docs/data-sources/objectstorage_credential.md b/docs/data-sources/objectstorage_credential.md
index 3bc570a0..34447363 100644
--- a/docs/data-sources/objectstorage_credential.md
+++ b/docs/data-sources/objectstorage_credential.md
@@ -40,5 +40,3 @@ data "stackit_objectstorage_credentials_group" "example" {
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`credentials_group_id`,`credential_id`".
- `name` (String)
- `secret_access_key` (String, Sensitive)
-
-
diff --git a/docs/data-sources/objectstorage_credentials_group.md b/docs/data-sources/objectstorage_credentials_group.md
index c062606d..c49c0924 100644
--- a/docs/data-sources/objectstorage_credentials_group.md
+++ b/docs/data-sources/objectstorage_credentials_group.md
@@ -36,5 +36,3 @@ data "stackit_objectstorage_credentials_group" "example" {
- `id` (String) Terraform's internal data source identifier. It is structured as "`project_id`,`credentials_group_id`".
- `urn` (String) Credentials group uniform resource name (URN)
-
-
diff --git a/docs/data-sources/resourcemanager_project.md b/docs/data-sources/resourcemanager_project.md
index b1db34f9..9fdabecd 100644
--- a/docs/data-sources/resourcemanager_project.md
+++ b/docs/data-sources/resourcemanager_project.md
@@ -33,4 +33,4 @@ data "stackit_resourcemanager_project" "example" {
- `id` (String) Terraform's internal data source. ID. It is structured as "`container_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container. A label key must match the regex [A-ZÄÜÖa-zäüöß0-9_-]{1,64}. A label value must match the regex ^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}
- `name` (String) Project name.
-- `parent_container_id` (String) Parent resource identifier. Both container ID (user-friendly) and UUID are supported
\ No newline at end of file
+- `parent_container_id` (String) Parent resource identifier. Both container ID (user-friendly) and UUID are supported
diff --git a/docs/resources/affinity_group.md b/docs/resources/affinity_group.md
index 6650e416..944adb90 100644
--- a/docs/resources/affinity_group.md
+++ b/docs/resources/affinity_group.md
@@ -5,29 +5,35 @@ subcategory: ""
description: |-
Affinity Group schema. Must have a region specified in the provider configuration.
Usage with server
- ```terraform
- resource "stackitaffinitygroup" "affinity-group" {
+
+ resource "stackit_affinity_group" "affinity-group" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-key-pair"
policy = "soft-affinity"
}
- resource "stackitserver" "example-server" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+
+ resource "stackit_server" "example-server" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-server"
- bootvolume = {
+ boot_volume = {
size = 64
- sourcetype = "image"
- sourceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ source_type = "image"
+ source_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
- affinitygroup = stackitaffinitygroup.affinity-group.affinitygroupid
- availabilityzone = "eu01-1"
- machinetype = "g1.1"
+ affinity_group = stackit_affinity_group.affinity-group.affinity_group_id
+ availability_zone = "eu01-1"
+ machine_type = "g1.1"
}
- ```
+
+
Policies
- hard-affinity- All servers launched in this group will be hosted on the same compute node.hard-anti-affinity- All servers launched in this group will be
- hosted on different compute nodes.soft-affinity- All servers launched in this group will be hosted
- on the same compute node if possible, but if not possible they still will be scheduled instead of failure.soft-anti-affinity- All servers launched in this group will be hosted on different compute nodes if possible,
+
+ hard-affinity- All servers launched in this group will be hosted on the same compute node.
+ hard-anti-affinity- All servers launched in this group will be
+ hosted on different compute nodes.
+ soft-affinity- All servers launched in this group will be hosted
+ on the same compute node if possible, but if not possible they still will be scheduled instead of failure.
+ soft-anti-affinity- All servers launched in this group will be hosted on different compute nodes if possible,
but if not possible they still will be scheduled instead of failure.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
diff --git a/docs/resources/argus_credential.md b/docs/resources/argus_credential.md
index 16382806..2bd96bc9 100644
--- a/docs/resources/argus_credential.md
+++ b/docs/resources/argus_credential.md
@@ -7,23 +7,22 @@ description: |-
!> The stackit_argus_credential resource has been deprecated and will be removed after February 26th 2025. Please use stackit_observability_credential instead, which offers the exact same functionality.
Example move
Example to move the deprecated stackit_argus_credential resource to the new stackit_observability_credential resource:
- 1. Add a new stackit_observability_credential resource with the same values like your previous stackit_argus_credential resource.
- 1. Add a moved block which reference the stackit_argus_credential and stackit_observability_credential resource.
- 1. Remove your old stackit_argus_credential resource and run $ terraform apply.
- ```terraform
- resource "stackitarguscredential" "example" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
- instanceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ Add a new stackit_observability_credential resource with the same values like your previous stackit_argus_credential resource.Add a moved block which reference the stackit_argus_credential and stackit_observability_credential resource.Remove your old stackit_argus_credential resource and run $ terraform apply.
+
+ resource "stackit_argus_credential" "example" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
+
moved {
- from = stackitarguscredential.example
- to = stackitobservabilitycredential.example
+ from = stackit_argus_credential.example
+ to = stackit_observability_credential.example
}
- resource "stackitobservabilitycredential" "example" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
- instanceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+
+ resource "stackit_observability_credential" "example" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
- ```
---
# stackit_argus_credential (Resource)
diff --git a/docs/resources/argus_instance.md b/docs/resources/argus_instance.md
index 4e5f57b4..1e71ed44 100644
--- a/docs/resources/argus_instance.md
+++ b/docs/resources/argus_instance.md
@@ -7,33 +7,32 @@ description: |-
!> The stackit_argus_instance resource has been deprecated and will be removed after February 26th 2025. Please use stackit_observability_instance instead, which offers the exact same functionality.
Example move
Example to move the deprecated stackit_argus_instance resource to the newstackit_observability_instance resource:
- 1. Add a new stackit_observability_instance resource with the same values like your previous stackit_argus_instance resource.
- 1. Add a moved block which reference the stackit_argus_instance and stackit_observability_instance resource.
- 1. Remove your old stackit_argus_instance resource and run $ terraform apply.
- ```terraform
- resource "stackitargusinstance" "example" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ Add a new stackit_observability_instance resource with the same values like your previous stackit_argus_instance resource.Add a moved block which reference the stackit_argus_instance and stackit_observability_instance resource.Remove your old stackit_argus_instance resource and run $ terraform apply.
+
+ resource "stackit_argus_instance" "example" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
- planname = "Monitoring-Medium-EU01"
+ plan_name = "Monitoring-Medium-EU01"
acl = ["1.1.1.1/32", "2.2.2.2/32"]
- metricsretentiondays = 7
- metricsretentiondays5mdownsampling = 30
- metricsretentiondays1hdownsampling = 365
+ metrics_retention_days = 7
+ metrics_retention_days_5m_downsampling = 30
+ metrics_retention_days_1h_downsampling = 365
}
+
moved {
- from = stackitargusinstance.example
- to = stackitobservabilityinstance.example
+ from = stackit_argus_instance.example
+ to = stackit_observability_instance.example
}
- resource "stackitobservabilityinstance" "example" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+
+ resource "stackit_observability_instance" "example" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
- planname = "Monitoring-Medium-EU01"
+ plan_name = "Monitoring-Medium-EU01"
acl = ["1.1.1.1/32", "2.2.2.2/32"]
- metricsretentiondays = 7
- metricsretentiondays5mdownsampling = 30
- metricsretentiondays1hdownsampling = 365
+ metrics_retention_days = 7
+ metrics_retention_days_5m_downsampling = 30
+ metrics_retention_days_1h_downsampling = 365
}
- ```
---
# stackit_argus_instance (Resource)
diff --git a/docs/resources/argus_scrapeconfig.md b/docs/resources/argus_scrapeconfig.md
index eb1066f4..df96442a 100644
--- a/docs/resources/argus_scrapeconfig.md
+++ b/docs/resources/argus_scrapeconfig.md
@@ -7,17 +7,15 @@ description: |-
!> The stackit_argus_scrapeconfig resource has been deprecated and will be removed after February 26th 2025. Please use stackit_observability_scrapeconfig instead, which offers the exact same functionality.
Example move
Example to move the deprecated stackit_argus_scrapeconfig resource to the new stackit_observability_scrapeconfig resource:
- 1. Add a new stackit_observability_scrapeconfig resource with the same values like your previous stackit_argus_scrapeconfig resource.
- 1. Add a moved block which reference the stackit_argus_scrapeconfig and stackit_observability_scrapeconfig resource.
- 1. Remove your old stackit_argus_scrapeconfig resource and run $ terraform apply.
- ```terraform
- resource "stackitargusscrapeconfig" "example" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
- instanceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ Add a new stackit_observability_scrapeconfig resource with the same values like your previous stackit_argus_scrapeconfig resource.Add a moved block which reference the stackit_argus_scrapeconfig and stackit_observability_scrapeconfig resource.Remove your old stackit_argus_scrapeconfig resource and run $ terraform apply.
+
+ resource "stackit_argus_scrapeconfig" "example" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-job"
- metricspath = "/my-metrics"
+ metrics_path = "/my-metrics"
saml2 = {
- enableurl_parameters = true
+ enable_url_parameters = true
}
targets = [
{
@@ -28,17 +26,19 @@ description: |-
}
]
}
+
moved {
- from = stackitargusscrapeconfig.example
- to = stackitobservabilityscrapeconfig.example
+ from = stackit_argus_scrapeconfig.example
+ to = stackit_observability_scrapeconfig.example
}
- resource "stackitobservabilityscrapeconfig" "example" {
- projectid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
- instanceid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+
+ resource "stackit_observability_scrapeconfig" "example" {
+ project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-job"
- metricspath = "/my-metrics"
+ metrics_path = "/my-metrics"
saml2 = {
- enableurl_parameters = true
+ enable_url_parameters = true
}
targets = [
{
@@ -49,7 +49,6 @@ description: |-
}
]
}
- ```
---
# stackit_argus_scrapeconfig (Resource)
diff --git a/docs/resources/objectstorage_bucket.md b/docs/resources/objectstorage_bucket.md
index 02f34d7e..0ec6b087 100644
--- a/docs/resources/objectstorage_bucket.md
+++ b/docs/resources/objectstorage_bucket.md
@@ -36,5 +36,3 @@ resource "stackit_objectstorage_bucket" "example" {
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`name`".
- `url_path_style` (String)
- `url_virtual_hosted_style` (String)
-
-
diff --git a/docs/resources/objectstorage_credential.md b/docs/resources/objectstorage_credential.md
index 27a12c91..b702a62b 100644
--- a/docs/resources/objectstorage_credential.md
+++ b/docs/resources/objectstorage_credential.md
@@ -40,5 +40,3 @@ resource "stackit_objectstorage_credential" "example" {
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`credentials_group_id`,`credential_id`".
- `name` (String)
- `secret_access_key` (String, Sensitive)
-
-
diff --git a/docs/resources/objectstorage_credentials_group.md b/docs/resources/objectstorage_credentials_group.md
index c67990a6..170655f8 100644
--- a/docs/resources/objectstorage_credentials_group.md
+++ b/docs/resources/objectstorage_credentials_group.md
@@ -36,5 +36,3 @@ resource "stackit_objectstorage_credentials_group" "example" {
- `credentials_group_id` (String) The credentials group ID
- `id` (String) Terraform's internal data source identifier. It is structured as "`project_id`,`credentials_group_id`".
- `urn` (String) Credentials group uniform resource name (URN)
-
-
diff --git a/scripts/docs.patch b/scripts/docs.patch
new file mode 100644
index 00000000..314d505f
--- /dev/null
+++ b/scripts/docs.patch
@@ -0,0 +1,46 @@
+diff --git a/docs/data-sources/resourcemanager_project.md b/docs/data-sources/resourcemanager_project.md
+index 0ca28db..9fdabec 100644
+--- a/docs/data-sources/resourcemanager_project.md
++++ b/docs/data-sources/resourcemanager_project.md
+@@ -32,16 +32,5 @@ data "stackit_resourcemanager_project" "example" {
+
+ - `id` (String) Terraform's internal data source. ID. It is structured as "`container_id`".
+ - `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container. A label key must match the regex [A-ZÄÜÖa-zäüöß0-9_-]{1,64}. A label value must match the regex ^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}
+-- `members` (Attributes List, Deprecated) The members assigned to the project. At least one subject needs to be a user, and not a client or service account. This value is only considered during creation. Changing it afterwards will have no effect.
+-
+-!> The "members" field has been deprecated in favor of the "owner_email" field. Please use the "owner_email" field to assign the owner role to a user. (see [below for nested schema](#nestedatt--members))
+ - `name` (String) Project name.
+ - `parent_container_id` (String) Parent resource identifier. Both container ID (user-friendly) and UUID are supported
+-
+-
+-### Nested Schema for `members`
+-
+-Read-Only:
+-
+-- `role` (String) The role of the member in the project. Legacy roles (`project.admin`, `project.auditor`, `project.member`, `project.owner`) are not supported.
+-- `subject` (String) Unique identifier of the user, service account or client. This is usually the email address for users or service accounts, and the name in case of clients.
+diff --git a/docs/resources/resourcemanager_project.md b/docs/resources/resourcemanager_project.md
+index ac601e3..ea0a70b 100644
+--- a/docs/resources/resourcemanager_project.md
++++ b/docs/resources/resourcemanager_project.md
+@@ -36,20 +36,9 @@ resource "stackit_resourcemanager_project" "example" {
+ ### Optional
+
+ - `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container. A label key must match the regex [A-ZÄÜÖa-zäüöß0-9_-]{1,64}. A label value must match the regex ^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}. To add a project to a STACKIT Network Area, setting the label `networkArea=` is required.
+-- `members` (Attributes List, Deprecated) The members assigned to the project. At least one subject needs to be a user, and not a client or service account. This value is only considered during creation. Changing it afterwards will have no effect.
+-
+-!> The "members" field has been deprecated in favor of the "owner_email" field. Please use the "owner_email" field to assign the owner role to a user. (see [below for nested schema](#nestedatt--members))
+
+ ### Read-Only
+
+ - `container_id` (String) Project container ID. Globally unique, user-friendly identifier.
+ - `id` (String) Terraform's internal resource ID. It is structured as "`container_id`".
+ - `project_id` (String) Project UUID identifier. This is the ID that can be used in most of the other resources to identify the project.
+-
+-
+-### Nested Schema for `members`
+-
+-Required:
+-
+-- `role` (String) The role of the member in the project. Possible values include, but are not limited to: `owner`, `editor`, `reader`. Legacy roles (`project.admin`, `project.auditor`, `project.member`, `project.owner`) are not supported.
+-- `subject` (String) Unique identifier of the user, service account or client. This is usually the email address for users or service accounts, and the name in case of clients.
diff --git a/scripts/project.sh b/scripts/project.sh
index f2f404ba..cfb086e0 100755
--- a/scripts/project.sh
+++ b/scripts/project.sh
@@ -17,7 +17,7 @@ elif [ "$action" = "tools" ]; then
go mod download
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0
- go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.16.0
+ go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.21.0
else
echo "Invalid action: '$action', please use $0 help for help"
fi