From e4754d0ceed8b0c865f83a3015fa073f05817d3e Mon Sep 17 00:00:00 2001 From: Dov Alperin Date: Wed, 31 Aug 2022 12:51:27 -0400 Subject: [PATCH] Make services optional. Supersedes #76 --- internal/provider/machine_resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/provider/machine_resource.go b/internal/provider/machine_resource.go index 48ca686..edf100b 100644 --- a/internal/provider/machine_resource.go +++ b/internal/provider/machine_resource.go @@ -175,7 +175,7 @@ func (mr flyMachineResourceType) GetSchema(context.Context) (tfsdk.Schema, diag. }, "handlers": { MarkdownDescription: "How the edge should process requests", - Required: true, + Optional: true, Type: types.ListType{ElemType: types.StringType}, }, }), @@ -333,7 +333,7 @@ func (mr flyMachineResource) Create(ctx context.Context, req resource.CreateRequ if data.Services == nil { tfservices = nil } - tflog.Info(ctx, fmt.Sprintf("how many cpus? %d but requested %d", newMachine.Config.Guest.Cpus, data.Cpus.Value)); + tflog.Info(ctx, fmt.Sprintf("how many cpus? %d but requested %d", newMachine.Config.Guest.Cpus, data.Cpus.Value)) data = flyMachineResourceData{ Name: types.String{Value: newMachine.Name}, Region: types.String{Value: newMachine.Region},