Skip to content

Commit f10fb3b

Browse files
committed
fix: notification_configuration is a string
1 parent c3979f6 commit f10fb3b

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

awx/resource_notification_template.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ func resourceNotificationTemplate() *schema.Resource {
4848
Optional: true,
4949
},
5050
"notification_configuration": {
51-
Type: schema.TypeMap,
51+
Type: schema.TypeString,
5252
Optional: true,
53+
Default: "",
5354
},
5455
},
5556
}
@@ -65,7 +66,7 @@ func resourceNotificationTemplateCreate(ctx context.Context, d *schema.ResourceD
6566
"description": d.Get("description").(string),
6667
"organization": d.Get("organization_id").(string),
6768
"notification_type": d.Get("notification_type").(string),
68-
"notification_configuration": d.Get("notification_configuration").(map[string]interface{}),
69+
"notification_configuration": d.Get("notification_configuration").(string),
6970
}, map[string]string{})
7071
if err != nil {
7172
log.Printf("Fail to Create notification_template %v", err)
@@ -101,7 +102,7 @@ func resourceNotificationTemplateUpdate(ctx context.Context, d *schema.ResourceD
101102
"description": d.Get("description").(string),
102103
"organization": d.Get("organization_id").(string),
103104
"notification_type": d.Get("notification_type").(string),
104-
"notification_configuration": d.Get("notification_configuration").(map[string]interface{}),
105+
"notification_configuration": d.Get("notification_configuration").(string),
105106
}, map[string]string{})
106107
if err != nil {
107108
diags = append(diags, diag.Diagnostic{

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/denouche/terraform-provider-awx
33
go 1.14
44

55
require (
6-
github.com/denouche/goawx v0.6.4-0.20211224134320-e2dec0fa4bb4
6+
github.com/denouche/goawx v0.6.4-0.20211224145227-c9a3c4c0046d
77
github.com/gruntwork-io/terratest v0.31.2
88
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
99
github.com/stretchr/testify v1.7.0

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,8 @@ github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2
136136
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
137137
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
138138
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
139-
github.com/denouche/goawx v0.6.3 h1:ZAlySZXxO17QO1UmGTGtUar6UZeVN2hjBC+0sDQVYSw=
140-
github.com/denouche/goawx v0.6.3/go.mod h1:MppzSteoj2xgfiqiRWW/Bf1a8z2FrRyvah1z0J2vJTY=
141-
github.com/denouche/goawx v0.6.4-0.20211224134320-e2dec0fa4bb4 h1:3cCRm4ubes7RaTk5dClfv3THgHI7FRMFKLXXaO2iiH4=
142-
github.com/denouche/goawx v0.6.4-0.20211224134320-e2dec0fa4bb4/go.mod h1:MppzSteoj2xgfiqiRWW/Bf1a8z2FrRyvah1z0J2vJTY=
139+
github.com/denouche/goawx v0.6.4-0.20211224145227-c9a3c4c0046d h1:tzr9UKP3zbevxkg5pqN99PUpuycCEWVcphg+XHIGJFk=
140+
github.com/denouche/goawx v0.6.4-0.20211224145227-c9a3c4c0046d/go.mod h1:MppzSteoj2xgfiqiRWW/Bf1a8z2FrRyvah1z0J2vJTY=
143141
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
144142
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
145143
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=

0 commit comments

Comments
 (0)