This commit is contained in:
asteam
2024-08-23 16:55:50 +03:00
parent 6f40af6a5f
commit 003e4d656e
524 changed files with 43376 additions and 432 deletions

View File

@@ -0,0 +1,55 @@
package schemas
import (
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
)
func MakeSchemaDataSourceAudit() map[string]schema.Attribute {
return map[string]schema.Attribute{
"audit_guid": schema.StringAttribute{
Required: true,
},
"apitask": schema.StringAttribute{
Computed: true,
},
"args": schema.StringAttribute{
Computed: true,
},
"call": schema.StringAttribute{
Computed: true,
},
"guid": schema.StringAttribute{
Computed: true,
},
"kwargs": schema.StringAttribute{
Computed: true,
},
"remote_addr": schema.StringAttribute{
Computed: true,
},
"responsetime": schema.Float64Attribute{
Computed: true,
},
"result": schema.StringAttribute{
Computed: true,
},
"status_code": schema.Int64Attribute{
Computed: true,
},
"tags": schema.StringAttribute{
Computed: true,
},
"timestamp": schema.Float64Attribute{
Computed: true,
},
"timestamp_end": schema.Float64Attribute{
Computed: true,
},
"user": schema.StringAttribute{
Computed: true,
},
"id": schema.StringAttribute{
Computed: true,
},
}
}

View File

@@ -0,0 +1,47 @@
package schemas
import (
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
)
func MakeSchemaDataSourceAuditLinkedJobs() map[string]schema.Attribute {
return map[string]schema.Attribute{
"audit_guid": schema.StringAttribute{
Required: true,
},
"id": schema.StringAttribute{
Computed: true,
},
"items": schema.ListNestedAttribute{
Computed: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"cmd": schema.StringAttribute{
Computed: true,
},
"guid": schema.StringAttribute{
Computed: true,
},
"nid": schema.Int64Attribute{
Computed: true,
},
"state": schema.StringAttribute{
Computed: true,
},
"time_create": schema.Int64Attribute{
Computed: true,
},
"time_start": schema.Int64Attribute{
Computed: true,
},
"time_stop": schema.Int64Attribute{
Computed: true,
},
"timeout": schema.Int64Attribute{
Computed: true,
},
},
},
},
}
}

View File

@@ -0,0 +1,65 @@
package schemas
import (
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
)
func MakeSchemaDataSourceAuditList() map[string]schema.Attribute {
return map[string]schema.Attribute{
"timestamp_at": schema.Int64Attribute{
Optional: true,
},
"timestamp_to": schema.Int64Attribute{
Optional: true,
},
"user": schema.StringAttribute{
Optional: true,
},
"call": schema.StringAttribute{
Optional: true,
},
"min_status_code": schema.Int64Attribute{
Optional: true,
},
"max_status_code": schema.Int64Attribute{
Optional: true,
},
"sort_by": schema.StringAttribute{
Optional: true,
},
"page": schema.Int64Attribute{
Optional: true,
},
"size": schema.Int64Attribute{
Optional: true,
},
"items": schema.ListNestedAttribute{
Computed: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"call": schema.StringAttribute{
Computed: true,
},
"guid": schema.StringAttribute{
Computed: true,
},
"responsetime": schema.Float64Attribute{
Computed: true,
},
"status_code": schema.Int64Attribute{
Computed: true,
},
"timestamp": schema.Float64Attribute{
Computed: true,
},
"user": schema.StringAttribute{
Computed: true,
},
},
},
},
"entry_count": schema.Int64Attribute{
Computed: true,
},
}
}