feat(resourcemanager): add folder resource/datasource (#975)

* feat(resourcemanager): add folder resource/datasource

* feat(resourcemanager): add created_at and updated_at attributes to resourcemanager project/folder

---------

Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
This commit is contained in:
Mauritz Uphoff 2025-09-17 09:53:48 +02:00 committed by GitHub
parent 27e4ef0227
commit 813b8c0e81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1844 additions and 171 deletions

View file

@ -25,7 +25,8 @@ import (
// Ensure the implementation satisfies the expected interfaces.
var (
_ datasource.DataSource = &projectDataSource{}
_ datasource.DataSource = &projectDataSource{}
_ datasource.DataSourceWithConfigure = &projectDataSource{}
)
// NewProjectDataSource is a helper function to simplify the provider implementation.
@ -67,6 +68,8 @@ func (d *projectDataSource) Schema(_ context.Context, _ datasource.SchemaRequest
"parent_container_id": "Parent resource identifier. Both container ID (user-friendly) and UUID are supported",
"name": "Project name.",
"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}`,
"creation_time": "Date-time at which the project was created.",
"update_time": "Date-time at which the project was last modified.",
}
resp.Schema = schema.Schema{
@ -122,6 +125,14 @@ func (d *projectDataSource) Schema(_ context.Context, _ datasource.SchemaRequest
),
},
},
"creation_time": schema.StringAttribute{
Description: descriptions["creation_time"],
Computed: true,
},
"update_time": schema.StringAttribute{
Description: descriptions["update_time"],
Computed: true,
},
},
}
}