This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
protoc-gen-terraform-loginrule.yaml
65 lines (56 loc) · 2.32 KB
/
protoc-gen-terraform-loginrule.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
target_package_name: "v1"
default_package_name: "github.com/gravitational/teleport/api/gen/proto/go/teleport/loginrule/v1"
duration_custom_type: Duration
use_state_for_unknown_by_default: true
# Top-level type names to export
types:
- "LoginRule"
# These import paths were not being automatically picked up by
# protoc-gen-terraform without these overrides
import_path_overrides:
"types": "github.com/gravitational/teleport/api/types"
"wrappers": "github.com/gravitational/teleport/api/types/wrappers"
# id field is required for integration tests. It is not used by provider.
# We have to add it manually (might be removed in the future versions).
injected_fields:
LoginRule:
-
name: id
type: github.com/hashicorp/terraform-plugin-framework/types.StringType
computed: true
plan_modifiers:
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.UseStateForUnknown()"
# These fields will be excluded
exclude_fields:
# Metadata (we id resources by name on our side)
- "Metadata.ID"
# These fields will be marked as Computed: true
computed_fields:
# Metadata
- "Metadata.Namespace"
# These fields will be marked as Required: true
required_fields:
# LoginRule
- "Metadata.Name"
- "LoginRule.version"
- "LoginRule.priority"
plan_modifiers:
# Force to recreate resource if it's name changes
Metadata.Name:
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
validators:
Metadata.Expires:
- github_com_gravitational_teleport_plugins_terraform_tfschema.MustTimeBeInFuture()
LoginRule:
- github_com_gravitational_teleport_plugins_terraform_tfschema.UseAnyOfValidator("traits_map", "traits_expression")
LoginRule.TraitsExpression:
- github_com_gravitational_teleport_plugins_terraform_tfschema.UseAnyOfValidator("traits_map", "traits_expression")
TraitsExpression:
- github_com_gravitational_teleport_plugins_terraform_tfschema.UseAnyOfValidator("traits_map", "traits_expression")
time_type:
type: "github.com/gravitational/teleport-plugins/terraform/tfschema.TimeType"
value_type: "github.com/gravitational/teleport-plugins/terraform/tfschema.TimeValue"
cast_to_type: "time.Time"
cast_from_type: "time.Time"
type_constructor: "github.com/gravitational/teleport-plugins/terraform/tfschema.UseRFC3339Time()"