@@ -492,7 +492,7 @@ func (r *TemplateResource) Create(ctx context.Context, req resource.CreateReques
492492return
493493}
494494if idx == 0 {
495- tflog .Trace (ctx ,"creating template" )
495+ tflog .Info (ctx ,"creating template" )
496496createReq := data .toCreateRequest (ctx ,resp ,versionResp .ID )
497497if resp .Diagnostics .HasError () {
498498return
@@ -502,7 +502,7 @@ func (r *TemplateResource) Create(ctx context.Context, req resource.CreateReques
502502resp .Diagnostics .AddError ("Client Error" ,fmt .Sprintf ("Failed to create template: %s" ,err ))
503503return
504504}
505- tflog .Trace (ctx ,"successfully created template" ,map [string ]any {
505+ tflog .Info (ctx ,"successfully created template" ,map [string ]any {
506506"id" :templateResp .ID ,
507507})
508508
@@ -514,7 +514,7 @@ func (r *TemplateResource) Create(ctx context.Context, req resource.CreateReques
514514}
515515
516516if ! data .ACL .IsNull () {
517- tflog .Trace (ctx ,"updating template ACL" )
517+ tflog .Info (ctx ,"updating template ACL" )
518518var acl ACL
519519resp .Diagnostics .Append (
520520data .ACL .As (ctx ,& acl , basetypes.ObjectAsOptions {})... ,
@@ -527,7 +527,7 @@ func (r *TemplateResource) Create(ctx context.Context, req resource.CreateReques
527527resp .Diagnostics .AddError ("Client Error" ,fmt .Sprintf ("Failed to create template ACL: %s" ,err ))
528528return
529529}
530- tflog .Trace (ctx ,"successfully updated template ACL" )
530+ tflog .Info (ctx ,"successfully updated template ACL" )
531531}
532532}
533533if version .Active .ValueBool () {
@@ -578,7 +578,7 @@ func (r *TemplateResource) Read(ctx context.Context, req resource.ReadRequest, r
578578}
579579
580580if ! data .ACL .IsNull () {
581- tflog .Trace (ctx ,"reading template ACL" )
581+ tflog .Info (ctx ,"reading template ACL" )
582582acl ,err := client .TemplateACL (ctx ,templateID )
583583if err != nil {
584584resp .Diagnostics .AddError ("Client Error" ,fmt .Sprintf ("Failed to get template ACL: %s" ,err ))
@@ -591,7 +591,7 @@ func (r *TemplateResource) Read(ctx context.Context, req resource.ReadRequest, r
591591return
592592}
593593data .ACL = aclObj
594- tflog .Trace (ctx ,"read template ACL" )
594+ tflog .Info (ctx ,"read template ACL" )
595595}
596596
597597for idx ,version := range data .Versions {
@@ -653,7 +653,7 @@ func (r *TemplateResource) Update(ctx context.Context, req resource.UpdateReques
653653templateMetadataChanged := ! newState .EqualTemplateMetadata (& curState )
654654// This is required, as the API will reject no-diff updates.
655655if templateMetadataChanged {
656- tflog .Trace (ctx ,"change in template metadata detected, updating." )
656+ tflog .Info (ctx ,"change in template metadata detected, updating." )
657657updateReq := newState .toUpdateRequest (ctx ,resp )
658658if resp .Diagnostics .HasError () {
659659return
@@ -664,7 +664,7 @@ func (r *TemplateResource) Update(ctx context.Context, req resource.UpdateReques
664664return
665665}
666666
667- tflog .Trace (ctx ,"successfully updated template metadata" )
667+ tflog .Info (ctx ,"successfully updated template metadata" )
668668}
669669
670670// Since the everyone group always gets deleted by `DisableEveryoneGroupAccess`, we need to run this even if there
@@ -680,12 +680,12 @@ func (r *TemplateResource) Update(ctx context.Context, req resource.UpdateReques
680680resp .Diagnostics .AddError ("Client Error" ,fmt .Sprintf ("Failed to update template ACL: %s" ,err ))
681681return
682682}
683- tflog .Trace (ctx ,"successfully updated template ACL" )
683+ tflog .Info (ctx ,"successfully updated template ACL" )
684684}
685685
686686for idx := range newState .Versions {
687687if newState .Versions [idx ].ID .IsUnknown () {
688- tflog .Trace (ctx ,"discovered a new or modified template version" )
688+ tflog .Info (ctx ,"discovered a new or modified template version" )
689689uploadResp ,err := newVersion (ctx ,client ,newVersionRequest {
690690Version :& newState .Versions [idx ],
691691OrganizationID :orgID ,
@@ -761,7 +761,7 @@ func (r *TemplateResource) Delete(ctx context.Context, req resource.DeleteReques
761761
762762templateID := data .ID .ValueUUID ()
763763
764- tflog .Trace (ctx ,"deleting template" )
764+ tflog .Info (ctx ,"deleting template" )
765765err := client .DeleteTemplate (ctx ,templateID )
766766if err != nil {
767767resp .Diagnostics .AddError ("Client Error" ,fmt .Sprintf ("Failed to delete template: %s" ,err ))
@@ -927,7 +927,7 @@ func waitForJob(ctx context.Context, client *codersdk.Client, version *codersdk.
927927if ! ok {
928928break
929929}
930- tflog .Trace (ctx ,logs .Output ,map [string ]interface {}{
930+ tflog .Info (ctx ,logs .Output ,map [string ]interface {}{
931931"job_id" :logs .ID ,
932932"job_stage" :logs .Stage ,
933933"log_source" :logs .Source ,
@@ -959,13 +959,13 @@ type newVersionRequest struct {
959959
960960func newVersion (ctx context.Context ,client * codersdk.Client ,req newVersionRequest ) (* codersdk.TemplateVersion ,error ) {
961961directory := req .Version .Directory .ValueString ()
962- tflog .Trace (ctx ,"uploading directory" )
962+ tflog .Info (ctx ,"uploading directory" )
963963uploadResp ,err := uploadDirectory (ctx ,client ,slog .Make (newTFLogSink (ctx )),directory )
964964if err != nil {
965965return nil ,fmt .Errorf ("failed to upload directory: %s" ,err )
966966}
967- tflog .Trace (ctx ,"successfully uploaded directory" )
968- tflog .Trace (ctx ,"discovering and parsing vars files" )
967+ tflog .Info (ctx ,"successfully uploaded directory" )
968+ tflog .Info (ctx ,"discovering and parsing vars files" )
969969varFiles ,err := codersdk .DiscoverVarsFiles (directory )
970970if err != nil {
971971return nil ,fmt .Errorf ("failed to discover vars files: %s" ,err )
@@ -974,7 +974,7 @@ func newVersion(ctx context.Context, client *codersdk.Client, req newVersionRequ
974974if err != nil {
975975return nil ,fmt .Errorf ("failed to parse user variable values: %s" ,err )
976976}
977- tflog .Trace (ctx ,"discovered and parsed vars files" ,map [string ]any {
977+ tflog .Info (ctx ,"discovered and parsed vars files" ,map [string ]any {
978978"vars" :vars ,
979979})
980980for _ ,variable := range req .Version .TerraformVariables {
@@ -994,22 +994,22 @@ func newVersion(ctx context.Context, client *codersdk.Client, req newVersionRequ
994994if req .TemplateID != nil {
995995tmplVerReq .TemplateID = * req .TemplateID
996996}
997- tflog .Trace (ctx ,"creating template version" )
997+ tflog .Info (ctx ,"creating template version" )
998998versionResp ,err := client .CreateTemplateVersion (ctx ,req .OrganizationID ,tmplVerReq )
999999if err != nil {
10001000return nil ,fmt .Errorf ("failed to create template version: %s" ,err )
10011001}
1002- tflog .Trace (ctx ,"waiting for template version import job." )
1002+ tflog .Info (ctx ,"waiting for template version import job." )
10031003err = waitForJob (ctx ,client ,& versionResp )
10041004if err != nil {
10051005return nil ,fmt .Errorf ("failed to wait for job: %s" ,err )
10061006}
1007- tflog .Trace (ctx ,"successfully created template version" )
1007+ tflog .Info (ctx ,"successfully created template version" )
10081008return & versionResp ,nil
10091009}
10101010
10111011func markActive (ctx context.Context ,client * codersdk.Client ,templateID uuid.UUID ,versionID uuid.UUID )error {
1012- tflog .Trace (ctx ,"marking template version as active" ,map [string ]any {
1012+ tflog .Info (ctx ,"marking template version as active" ,map [string ]any {
10131013"version_id" :versionID .String (),
10141014"template_id" :templateID .String (),
10151015})
@@ -1019,7 +1019,7 @@ func markActive(ctx context.Context, client *codersdk.Client, templateID uuid.UU
10191019if err != nil {
10201020return fmt .Errorf ("Failed to update active template version: %s" ,err )
10211021}
1022- tflog .Trace (ctx ,"marked template version as active" )
1022+ tflog .Info (ctx ,"marked template version as active" )
10231023return nil
10241024}
10251025