@@ -17,16 +17,16 @@ func resourceAccountGitopsSettings() *schema.Resource {
17
17
Create : resourceAccountGitopsSettingsUpdate ,
18
18
Update : resourceAccountGitopsSettingsUpdate ,
19
19
// Delete not implemenented as gitops settings cannot be removed, only updated
20
- Delete : resourceAccountGitopsSettingsDelete ,
20
+ Delete : resourceAccountGitopsSettingsDelete ,
21
21
Schema : map [string ]* schema.Schema {
22
22
"_id" : {
23
23
Type : schema .TypeString ,
24
- Description : "Account ID" ,
24
+ Description : "Account ID for active account " ,
25
25
Computed : true ,
26
26
},
27
27
"name" : {
28
28
Type : schema .TypeString ,
29
- Description : "Account name" ,
29
+ Description : "Account name for active account " ,
30
30
Computed : true ,
31
31
},
32
32
"git_provider" : {
@@ -43,18 +43,18 @@ func resourceAccountGitopsSettings() *schema.Resource {
43
43
// When an empty value for provider url is provided, check if the old one was set by getting the default and surpress diff in such case
44
44
DiffSuppressFunc : func (k , old , new string , d * schema.ResourceData ) bool {
45
45
if new == "" {
46
- defaultProviderUrl , err := gitops .GetDefaultAPIUrlForProvider (d .Get ("git_provider" ).(string ))
46
+ defaultProviderUrl , err := gitops .GetDefaultAPIUrlForProvider (d .Get ("git_provider" ).(string ))
47
47
48
- if err != nil {
49
- return false
50
- }
48
+ if err != nil {
49
+ return false
50
+ }
51
51
52
- if * defaultProviderUrl == old {
53
- return true
54
- }
52
+ if * defaultProviderUrl == old {
53
+ return true
54
+ }
55
55
}
56
56
return false
57
- },
57
+ },
58
58
},
59
59
"shared_config_repository" : {
60
60
Type : schema .TypeString ,
@@ -108,8 +108,8 @@ func resourceAccountGitopsSettingsUpdate(d *schema.ResourceData, meta interface{
108
108
return resourceAccountGitopsSettingsRead (d , meta )
109
109
}
110
110
111
+ // Settings cannot be deleted, only updated
111
112
func resourceAccountGitopsSettingsDelete (d * schema.ResourceData , meta interface {}) error {
112
-
113
113
return nil
114
114
}
115
115
0 commit comments