@@ -18,7 +18,6 @@ func ResourceNatsCredentials() *schema.Resource {
18
18
return & schema.Resource {
19
19
CreateContext : ResourceMNQNatsCredentialsCreate ,
20
20
ReadContext : ResourceMNQNatsCredentialsRead ,
21
- UpdateContext : ResourceMNQNatsCredentialsUpdate ,
22
21
DeleteContext : ResourceMNQNatsCredentialsDelete ,
23
22
Importer : & schema.ResourceImporter {
24
23
StateContext : schema .ImportStatePassthroughContext ,
@@ -28,13 +27,15 @@ func ResourceNatsCredentials() *schema.Resource {
28
27
"account_id" : {
29
28
Type : schema .TypeString ,
30
29
Required : true ,
30
+ ForceNew : true ,
31
31
Description : "ID of the nats account" ,
32
32
DiffSuppressFunc : dsf .Locality ,
33
33
},
34
34
"name" : {
35
35
Type : schema .TypeString ,
36
36
Computed : true ,
37
37
Optional : true ,
38
+ ForceNew : true ,
38
39
Description : "The nats credentials name" ,
39
40
},
40
41
"file" : {
@@ -94,28 +95,6 @@ func ResourceMNQNatsCredentialsRead(ctx context.Context, d *schema.ResourceData,
94
95
return nil
95
96
}
96
97
97
- func ResourceMNQNatsCredentialsUpdate (ctx context.Context , d * schema.ResourceData , m interface {}) diag.Diagnostics {
98
- api , region , id , err := NewNatsAPIWithRegionAndID (m , d .Id ())
99
- if err != nil {
100
- return diag .FromErr (err )
101
- }
102
-
103
- req := & mnq.NatsAPIUpdateNatsAccountRequest {
104
- Region : region ,
105
- NatsAccountID : id ,
106
- }
107
-
108
- if d .HasChange ("name" ) {
109
- req .Name = types .ExpandUpdatedStringPtr (d .Get ("name" ))
110
- }
111
-
112
- if _ , err := api .UpdateNatsAccount (req , scw .WithContext (ctx )); err != nil {
113
- return diag .FromErr (err )
114
- }
115
-
116
- return ResourceMNQNatsAccountRead (ctx , d , m )
117
- }
118
-
119
98
func ResourceMNQNatsCredentialsDelete (ctx context.Context , d * schema.ResourceData , m interface {}) diag.Diagnostics {
120
99
api , region , id , err := NewNatsAPIWithRegionAndID (m , d .Id ())
121
100
if err != nil {
0 commit comments