Skip to content

Commit 637213d

Browse files
authored
docs: add hint on how to create a project within sna (#722)
1 parent dadea7a commit 637213d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/resources/resourcemanager_project.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ resource "stackit_resourcemanager_project" "example" {
1818
name = "example-container"
1919
labels = {
2020
"Label 1" = "foo"
21+
// "networkArea" = stackit_network_area.foo.network_area_id
2122
}
2223
owner_email = "john.doe@stackit.cloud"
2324
}
@@ -34,10 +35,10 @@ resource "stackit_resourcemanager_project" "example" {
3435

3536
### Optional
3637

37-
- `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}
38+
- `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=<networkAreaID>` is required.
3839

3940
### Read-Only
4041

4142
- `container_id` (String) Project container ID. Globally unique, user-friendly identifier.
4243
- `id` (String) Terraform's internal resource ID. It is structured as "`container_id`".
43-
- `project_id` (String) Project UUID identifier. This is the ID that can be used in most of the other resources to identify the project.
44+
- `project_id` (String) Project UUID identifier. This is the ID that can be used in most of the other resources to identify the project.

examples/resources/stackit_resourcemanager_project/resource.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ resource "stackit_resourcemanager_project" "example" {
33
name = "example-container"
44
labels = {
55
"Label 1" = "foo"
6+
// "networkArea" = stackit_network_area.foo.network_area_id
67
}
78
owner_email = "john.doe@stackit.cloud"
89
}

stackit/internal/services/resourcemanager/project/resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (r *projectResource) Schema(_ context.Context, _ resource.SchemaRequest, re
152152
"container_id": "Project container ID. Globally unique, user-friendly identifier.",
153153
"parent_container_id": "Parent resource identifier. Both container ID (user-friendly) and UUID are supported",
154154
"name": "Project name.",
155-
"labels": "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}",
155+
"labels": "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=<networkAreaID>` is required.",
156156
"owner_email": "Email address of the owner of the project. This value is only considered during creation. Changing it afterwards will have no effect.",
157157
"members": "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.",
158158
"members.role": fmt.Sprintf("The role of the member in the project. Possible values include, but are not limited to: `owner`, `editor`, `reader`. Legacy roles (%s) are not supported.", strings.Join(utils.QuoteValues(utils.LegacyProjectRoles), ", ")),

0 commit comments

Comments
 (0)