Skip to content

Commit 97a707c

Browse files
Merge pull request #4 from netfoundry/ott_enrollment_identity
Update terraform provider ziti identity resource to ott type enrollment
2 parents 4372461 + 23c213c commit 97a707c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/resources/identity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: |-
77

88
# ziti_identity (Resource)
99

10-
Ziti Identity Resource
10+
Ziti Identity Resource, ott type enrollment
1111

1212
## Example Usage
1313

internal/provider/identity_resource.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ type identityResourceModel struct {
8484
// Schema defines the schema for the resource.
8585
func (r *identityResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
8686
resp.Schema = schema.Schema{
87-
MarkdownDescription: "Ziti Identity Resource",
87+
MarkdownDescription: "Ziti Identity Resource, ott type enrollment",
8888
Attributes: map[string]schema.Attribute{
8989
"id": schema.StringAttribute{
9090
Computed: true,
@@ -202,6 +202,9 @@ func (r *identityResource) Create(ctx context.Context, req resource.CreateReques
202202

203203
appData := TagsFromAttributes(eplan.AppData.Elements())
204204
tags := TagsFromAttributes(eplan.Tags.Elements())
205+
enrollment := &rest_model.IdentityCreateEnrollment{
206+
Ott: true,
207+
}
205208
name := eplan.Name.ValueString()
206209
authPolicyId := eplan.AuthPolicyID.ValueString()
207210
defaultHostingCost := rest_model.TerminatorCost(eplan.DefaultHostingCost.ValueInt64())
@@ -236,6 +239,7 @@ func (r *identityResource) Create(ctx context.Context, req resource.CreateReques
236239
ServiceHostingCosts: serviceHostingCosts,
237240
ServiceHostingPrecedences: serviceHostingPrecedences,
238241
Tags: tags,
242+
Enrollment: enrollment,
239243
Type: &type_,
240244
}
241245

0 commit comments

Comments
 (0)