@@ -35,16 +35,12 @@ func resourceApplicationPool() *schema.Resource {
3535func resourceApplicationPoolCreate (ctx context.Context , d * schema.ResourceData , m interface {}) diag.Diagnostics {
3636 client := m .(* iis.Client )
3737 name := d .Get (NameKey ).(string )
38- tflog .Debug (ctx , "Creating application pool" , map [string ]interface {}{
39- "name" : name ,
40- })
38+ tflog .Debug (ctx , "Creating application pool: " + toJSON (name ))
4139 pool , err := client .CreateAppPool (ctx , name )
4240 if err != nil {
4341 return diag .FromErr (err )
4442 }
45- tflog .Debug (ctx , "Created application pool" , map [string ]interface {}{
46- "pool" : pool ,
47- })
43+ tflog .Debug (ctx , "Created application pool: " + toJSON (pool ))
4844 d .SetId (pool .ID )
4945 return nil
5046}
@@ -57,9 +53,7 @@ func resourceApplicationPoolRead(ctx context.Context, d *schema.ResourceData, m
5753 d .SetId ("" )
5854 return diag .FromErr (err )
5955 }
60- tflog .Debug (ctx , "Read application pool" , map [string ]interface {}{
61- "appPool" : appPool ,
62- })
56+ tflog .Debug (ctx , "Read application pool: " + toJSON (appPool ))
6357
6458 if err = d .Set (NameKey , appPool .Name ); err != nil {
6559 return diag .FromErr (err )
@@ -74,17 +68,12 @@ func resourceApplicationPoolUpdate(ctx context.Context, d *schema.ResourceData,
7468 client := m .(* iis.Client )
7569 if d .HasChange (NameKey ) {
7670 name := d .Get (NameKey ).(string )
77- tflog .Debug (ctx , "Updating application pool" , map [string ]interface {}{
78- "id" : d .Id (),
79- "name" : name ,
80- })
71+ tflog .Debug (ctx , "Updating application pool: " + toJSON (name ))
8172 applicationPool , err := client .UpdateAppPool (ctx , d .Id (), name )
8273 if err != nil {
8374 return diag .FromErr (err )
8475 }
85- tflog .Debug (ctx , "Updated application pool" , map [string ]interface {}{
86- "applicationPool" : applicationPool ,
87- })
76+ tflog .Debug (ctx , "Updated application pool: " + toJSON (applicationPool ))
8877 d .SetId (applicationPool .ID )
8978 }
9079 return nil
@@ -93,15 +82,11 @@ func resourceApplicationPoolUpdate(ctx context.Context, d *schema.ResourceData,
9382func resourceApplicationPoolDelete (ctx context.Context , d * schema.ResourceData , m interface {}) diag.Diagnostics {
9483 client := m .(* iis.Client )
9584 id := d .Id ()
96- tflog .Debug (ctx , "Deleting application pool" , map [string ]interface {}{
97- "id" : id ,
98- })
85+ tflog .Debug (ctx , "Deleting application pool: " + toJSON (id ))
9986 err := client .DeleteAppPool (ctx , id )
10087 if err != nil {
10188 return diag .FromErr (err )
10289 }
103- tflog .Debug (ctx , "Deleted application pool" , map [string ]interface {}{
104- "id" : id ,
105- })
90+ tflog .Debug (ctx , "Deleted application pool: " + toJSON (id ))
10691 return nil
10792}
0 commit comments