Skip to content

Commit e715ac9

Browse files
Sync monorepo state at "update ucconfig for data types" (#83)
Syncing from userclouds/userclouds@7e81b41c6781f9fead30ffba8e68803cc29d14f9
1 parent d51182a commit e715ac9

File tree

8 files changed

+369
-72
lines changed

8 files changed

+369
-72
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "userclouds_userstore_column_data_type Resource - terraform-provider-userclouds"
4+
subcategory: ""
5+
description: |-
6+
Manages a User Store column data type. For more details, refer to the User Store documentation https://docs.userclouds.com/docs/introduction.
7+
---
8+
9+
# userclouds_userstore_column_data_type (Resource)
10+
11+
Manages a User Store column data type. For more details, refer to the [User Store documentation](https://docs.userclouds.com/docs/introduction).
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `name` (String)
21+
22+
### Optional
23+
24+
- `composite_attributes` (Attributes) (see [below for nested schema](#nestedatt--composite_attributes))
25+
- `description` (String)
26+
- `is_composite_field_type` (Boolean) Whether the data type can be used for a composite field.
27+
- `is_native` (Boolean) Whether this is a native non-editable data type.
28+
29+
### Read-Only
30+
31+
- `id` (String) The ID of this resource.
32+
33+
<a id="nestedatt--composite_attributes"></a>
34+
### Nested Schema for `composite_attributes`
35+
36+
Optional:
37+
38+
- `fields` (Attributes List) The set of fields associated with a composite data type. (see [below for nested schema](#nestedatt--composite_attributes--fields))
39+
- `include_id` (Boolean) Whether the composite data type must include an id field.
40+
41+
<a id="nestedatt--composite_attributes--fields"></a>
42+
### Nested Schema for `composite_attributes.fields`
43+
44+
Required:
45+
46+
- `name` (String) Each part of name must be capitalized or all-caps, separated by underscores. Names may contain alphanumeric characters, and the first part must start with a letter, while other parts may start with a number. (ex. ID_Field_1)
47+
48+
Optional:
49+
50+
- `camel_case_name` (String) Read-only camel-case version of field name, with underscores stripped out. (ex. IDField1)
51+
- `data_type` (String)
52+
- `ignore_for_uniqueness` (Boolean) If true, field value will be ignored when comparing two composite values for a uniqueness check.
53+
- `required` (Boolean) Whether a value must be specified for the field.
54+
- `struct_name` (String) Read-only snake-case version of field name, with all letters lowercase. (ex. id_field_1)

genprovider/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
}
1313
},
1414
"resources": [
15+
{
16+
"type_name_suffix": "userstore_column_data_type",
17+
"description": "Manages a User Store column data type. For more details, refer to the User Store documentation: https://docs.userclouds.com/docs/introduction",
18+
"markdown_description": "Manages a User Store column data type. For more details, refer to the [User Store documentation](https://docs.userclouds.com/docs/introduction).",
19+
"openapi_schema": "UserstoreColumnDataType",
20+
"rest_collection_path": "/userstore/config/datatypes",
21+
"rest_resource_path": "/userstore/config/datatypes/{id}"
22+
},
1523
{
1624
"type_name_suffix": "userstore_column",
1725
"description": "Manages a User Store column. For more details, refer to the User Store documentation: https://docs.userclouds.com/docs/introduction",

genprovider/internal/apitypes/userstore_resource_id.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (t *UserstoreResourceID) TFSchemaAttributeText(extraFields map[string]strin
3939
Validators: []validator.String{
4040
stringvalidator.RegexMatches(
4141
regexp.MustCompile("` + uuidRegex + `"),
42-
"invalid UUIDv4 format",
42+
"invalid UUID format",
4343
),
4444
},
4545
` + fieldsToString(fields) + `

genprovider/internal/apitypes/uuid.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"golang.org/x/exp/maps"
66
)
77

8-
const uuidRegex = `(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$`
8+
const uuidRegex = `(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$`
99

10-
// UUID represents a UUIDv4 string.
10+
// UUID represents a UUID string.
1111
type UUID struct {
1212
Schema *openapi3.Schema
1313
}
@@ -32,7 +32,7 @@ func (t *UUID) TFSchemaAttributeText(extraFields map[string]string) string {
3232
Validators: []validator.String{
3333
stringvalidator.RegexMatches(
3434
regexp.MustCompile("` + uuidRegex + `"),
35-
"invalid UUIDv4 format",
35+
"invalid UUID format",
3636
),
3737
},
3838
` + fieldsToString(fields) + `

internal/provider/provider_generated.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
)
1111

1212
var generatedResources = []func() resource.Resource{
13+
userstore.NewUserstoreColumnDataTypeResource,
1314
userstore.NewUserstoreColumnResource,
1415
userstore.NewUserstoreColumnSoftDeletedRetentionDurationResource,
1516
userstore.NewUserstoreAccessorResource,

internal/provider/tokenizer/schemas_generated.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ var PolicyAccessPolicyAttributes = map[string]schema.Attribute{
119119
"id": schema.StringAttribute{
120120
Validators: []validator.String{
121121
stringvalidator.RegexMatches(
122-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
123-
"invalid UUIDv4 format",
122+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
123+
"invalid UUID format",
124124
),
125125
},
126126
Computed: true,
@@ -444,8 +444,8 @@ var PolicyAccessPolicyComponentAttributes = map[string]schema.Attribute{
444444
"policy": schema.StringAttribute{
445445
Validators: []validator.String{
446446
stringvalidator.RegexMatches(
447-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
448-
"invalid UUIDv4 format",
447+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
448+
"invalid UUID format",
449449
),
450450
},
451451
Computed: true,
@@ -456,8 +456,8 @@ var PolicyAccessPolicyComponentAttributes = map[string]schema.Attribute{
456456
"template": schema.StringAttribute{
457457
Validators: []validator.String{
458458
stringvalidator.RegexMatches(
459-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
460-
"invalid UUIDv4 format",
459+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
460+
"invalid UUID format",
461461
),
462462
},
463463
Computed: true,
@@ -639,8 +639,8 @@ var PolicyAccessPolicyTemplateAttributes = map[string]schema.Attribute{
639639
"id": schema.StringAttribute{
640640
Validators: []validator.String{
641641
stringvalidator.RegexMatches(
642-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
643-
"invalid UUIDv4 format",
642+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
643+
"invalid UUID format",
644644
),
645645
},
646646
Computed: true,
@@ -974,8 +974,8 @@ var PolicyTransformerAttributes = map[string]schema.Attribute{
974974
"id": schema.StringAttribute{
975975
Validators: []validator.String{
976976
stringvalidator.RegexMatches(
977-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
978-
"invalid UUIDv4 format",
977+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
978+
"invalid UUID format",
979979
),
980980
},
981981
Computed: true,
@@ -989,8 +989,8 @@ var PolicyTransformerAttributes = map[string]schema.Attribute{
989989
"input_data_type": schema.StringAttribute{
990990
Validators: []validator.String{
991991
stringvalidator.RegexMatches(
992-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
993-
"invalid UUIDv4 format",
992+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
993+
"invalid UUID format",
994994
),
995995
},
996996
Computed: true,
@@ -1021,8 +1021,8 @@ var PolicyTransformerAttributes = map[string]schema.Attribute{
10211021
"output_data_type": schema.StringAttribute{
10221022
Validators: []validator.String{
10231023
stringvalidator.RegexMatches(
1024-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
1025-
"invalid UUIDv4 format",
1024+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
1025+
"invalid UUID format",
10261026
),
10271027
},
10281028
Computed: true,
@@ -1670,8 +1670,8 @@ var TokenizerCreateTokenRequestAttributes = map[string]schema.Attribute{
16701670
"access_policy_rid": schema.StringAttribute{
16711671
Validators: []validator.String{
16721672
stringvalidator.RegexMatches(
1673-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
1674-
"invalid UUIDv4 format",
1673+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
1674+
"invalid UUID format",
16751675
),
16761676
},
16771677
Computed: true,
@@ -1688,8 +1688,8 @@ var TokenizerCreateTokenRequestAttributes = map[string]schema.Attribute{
16881688
"transformer_rid": schema.StringAttribute{
16891689
Validators: []validator.String{
16901690
stringvalidator.RegexMatches(
1691-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
1692-
"invalid UUIDv4 format",
1691+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
1692+
"invalid UUID format",
16931693
),
16941694
},
16951695
Computed: true,
@@ -2063,8 +2063,8 @@ var TokenizerInspectTokenResponseAttributes = map[string]schema.Attribute{
20632063
"id": schema.StringAttribute{
20642064
Validators: []validator.String{
20652065
stringvalidator.RegexMatches(
2066-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
2067-
"invalid UUIDv4 format",
2066+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
2067+
"invalid UUID format",
20682068
),
20692069
},
20702070
Computed: true,
@@ -2656,8 +2656,8 @@ var TokenizerLookupTokensRequestAttributes = map[string]schema.Attribute{
26562656
"access_policy_rid": schema.StringAttribute{
26572657
Validators: []validator.String{
26582658
stringvalidator.RegexMatches(
2659-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
2660-
"invalid UUIDv4 format",
2659+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
2660+
"invalid UUID format",
26612661
),
26622662
},
26632663
Computed: true,
@@ -2674,8 +2674,8 @@ var TokenizerLookupTokensRequestAttributes = map[string]schema.Attribute{
26742674
"transformer_rid": schema.StringAttribute{
26752675
Validators: []validator.String{
26762676
stringvalidator.RegexMatches(
2677-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
2678-
"invalid UUIDv4 format",
2677+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
2678+
"invalid UUID format",
26792679
),
26802680
},
26812681
Computed: true,
@@ -3596,8 +3596,8 @@ var UserstoreResourceIDAttributes = map[string]schema.Attribute{
35963596
"id": schema.StringAttribute{
35973597
Validators: []validator.String{
35983598
stringvalidator.RegexMatches(
3599-
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"),
3600-
"invalid UUIDv4 format",
3599+
regexp.MustCompile("(?i)^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$"),
3600+
"invalid UUID format",
36013601
),
36023602
},
36033603
Computed: true,

0 commit comments

Comments
 (0)