Skip to content

Commit 4a49df6

Browse files
Sync monorepo state at "Add IsAuditLogged flag to accessors" (#71)
Syncing from userclouds/userclouds@a57f08165e074395d7406d3e7f29c7639a454dfc
1 parent 2631a25 commit 4a49df6

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

docs/resources/userstore_accessor.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Manages a User Store accessor. For more details, refer to the [accessors documen
2727

2828
- `data_life_cycle_state` (String) Valid values: `live`, `postdelete`, `predelete`, `softdeleted`
2929
- `description` (String)
30+
- `is_audit_logged` (Boolean) Whether this accessor is audit logged each time it is executed.
3031
- `token_access_policy` (String)
3132

3233
### Read-Only

internal/provider/userstore/schemas_generated.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,7 @@ type UserstoreAccessorTFModel struct {
18921892
DataLifeCycleState types.String `tfsdk:"data_life_cycle_state"`
18931893
Description types.String `tfsdk:"description"`
18941894
ID types.String `tfsdk:"id"`
1895+
IsAuditLogged types.Bool `tfsdk:"is_audit_logged"`
18951896
Name types.String `tfsdk:"name"`
18961897
Purposes types.List `tfsdk:"purposes"`
18971898
SelectorConfig types.Object `tfsdk:"selector_config"`
@@ -1906,6 +1907,7 @@ type UserstoreAccessorJSONClientModel struct {
19061907
DataLifeCycleState *string `json:"data_life_cycle_state,omitempty"`
19071908
Description *string `json:"description,omitempty"`
19081909
ID *uuid.UUID `json:"id,omitempty"`
1910+
IsAuditLogged *bool `json:"is_audit_logged,omitempty"`
19091911
Name *string `json:"name,omitempty"`
19101912
Purposes *[]UserstoreResourceIDJSONClientModel `json:"purposes,omitempty"`
19111913
SelectorConfig *UserstoreUserSelectorConfigJSONClientModel `json:"selector_config,omitempty"`
@@ -1924,6 +1926,7 @@ var UserstoreAccessorAttrTypes = map[string]attr.Type{
19241926
"data_life_cycle_state": types.StringType,
19251927
"description": types.StringType,
19261928
"id": types.StringType,
1929+
"is_audit_logged": types.BoolType,
19271930
"name": types.StringType,
19281931
"purposes": types.ListType{
19291932
ElemType: types.StringType,
@@ -1986,6 +1989,12 @@ var UserstoreAccessorAttributes = map[string]schema.Attribute{
19861989
stringplanmodifier.UseStateForUnknown(),
19871990
},
19881991
},
1992+
"is_audit_logged": schema.BoolAttribute{
1993+
Computed: true,
1994+
Description: "Whether this accessor is audit logged each time it is executed.",
1995+
MarkdownDescription: "Whether this accessor is audit logged each time it is executed.",
1996+
Optional: true,
1997+
},
19891998
"name": schema.StringAttribute{
19901999
Description: "",
19912000
MarkdownDescription: "",
@@ -2116,6 +2125,16 @@ func UserstoreAccessorTFModelToJSONClient(in *UserstoreAccessorTFModel) (*Userst
21162125
if err != nil {
21172126
return nil, ucerr.Errorf("failed to convert \"id\" field: %+v", err)
21182127
}
2128+
out.IsAuditLogged, err = func(val *types.Bool) (*bool, error) {
2129+
if val.IsNull() || val.IsUnknown() {
2130+
return nil, nil
2131+
}
2132+
converted := val.ValueBool()
2133+
return &converted, nil
2134+
}(&in.IsAuditLogged)
2135+
if err != nil {
2136+
return nil, ucerr.Errorf("failed to convert \"is_audit_logged\" field: %+v", err)
2137+
}
21192138
out.Name, err = func(val *types.String) (*string, error) {
21202139
if val.IsNull() || val.IsUnknown() {
21212140
return nil, nil
@@ -2298,6 +2317,12 @@ func UserstoreAccessorJSONClientModelToTF(in *UserstoreAccessorJSONClientModel)
22982317
if err != nil {
22992318
return UserstoreAccessorTFModel{}, ucerr.Errorf("failed to convert \"id\" field: %+v", err)
23002319
}
2320+
out.IsAuditLogged, err = func(val *bool) (types.Bool, error) {
2321+
return types.BoolPointerValue(val), nil
2322+
}(in.IsAuditLogged)
2323+
if err != nil {
2324+
return UserstoreAccessorTFModel{}, ucerr.Errorf("failed to convert \"is_audit_logged\" field: %+v", err)
2325+
}
23012326
out.Name, err = func(val *string) (types.String, error) {
23022327
return types.StringPointerValue(val), nil
23032328
}(in.Name)

openapi/userstore.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,6 +2000,9 @@ components:
20002000
type: string
20012001
id:
20022002
$ref: '#/components/schemas/UuidUUID'
2003+
is_audit_logged:
2004+
description: Whether this accessor is audit logged each time it is executed.
2005+
type: boolean
20032006
is_system:
20042007
description: Whether this accessor is a system accessor. System accessors
20052008
cannot be deleted or modified. This property cannot be changed.

0 commit comments

Comments
 (0)