This commit is contained in:
asteam
2025-07-01 13:44:09 +03:00
parent 5382579a5f
commit ddbb12996d
1041 changed files with 2842 additions and 96448 deletions

View File

@@ -2,6 +2,7 @@ package schemas
import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"
@@ -14,21 +15,19 @@ func MakeSchemaResourceAccount() map[string]schema.Attribute {
Required: true,
Description: "name of the account",
},
"username": schema.StringAttribute{
Required: true,
Description: "username of owner the account",
},
// optional attributes
"emailaddress": schema.StringAttribute{
Optional: true,
Description: "email",
},
"send_access_emails": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(false),
Description: "if true send emails when a user is granted access to resources",
},
"users": schema.ListNestedAttribute{
"desc": schema.StringAttribute{
Optional: true,
Description: "description of the account",
},
"users": schema.SetNestedAttribute{
Optional: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
@@ -43,16 +42,25 @@ func MakeSchemaResourceAccount() map[string]schema.Attribute {
},
"restore": schema.BoolAttribute{
Optional: true,
Computed: true,
Description: "restore a deleted account",
Default: booldefault.StaticBool(true),
},
"permanently": schema.BoolAttribute{
Optional: true,
Computed: true,
Description: "whether to completely delete the account",
// default is false
Default: booldefault.StaticBool(true),
},
"enable": schema.BoolAttribute{
Optional: true,
Computed: true,
Description: "enable/disable account",
Default: booldefault.StaticBool(true),
},
"reason": schema.StringAttribute{
Optional: true,
Description: "reason to disable",
},
"resource_limits": schema.SingleNestedAttribute{
Optional: true,