Skip to content

Commit d01d635

Browse files
update description
1 parent bf48dc0 commit d01d635

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

codefresh/resource_account_gitops_settings.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ func resourceAccountGitopsSettings() *schema.Resource {
1717
Create: resourceAccountGitopsSettingsUpdate,
1818
Update: resourceAccountGitopsSettingsUpdate,
1919
// Delete not implemenented as gitops settings cannot be removed, only updated
20-
Delete: resourceAccountGitopsSettingsDelete,
20+
Delete: resourceAccountGitopsSettingsDelete,
2121
Schema: map[string]*schema.Schema{
2222
"_id": {
2323
Type: schema.TypeString,
24-
Description: "Account ID",
24+
Description: "Account ID for active account",
2525
Computed: true,
2626
},
2727
"name": {
2828
Type: schema.TypeString,
29-
Description: "Account name",
29+
Description: "Account name for active account",
3030
Computed: true,
3131
},
3232
"git_provider": {
@@ -43,18 +43,18 @@ func resourceAccountGitopsSettings() *schema.Resource {
4343
// 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
4444
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
4545
if new == "" {
46-
defaultProviderUrl, err := gitops.GetDefaultAPIUrlForProvider(d.Get("git_provider").(string))
46+
defaultProviderUrl, err := gitops.GetDefaultAPIUrlForProvider(d.Get("git_provider").(string))
4747

48-
if err != nil {
49-
return false
50-
}
48+
if err != nil {
49+
return false
50+
}
5151

52-
if *defaultProviderUrl == old {
53-
return true
54-
}
52+
if *defaultProviderUrl == old {
53+
return true
54+
}
5555
}
5656
return false
57-
},
57+
},
5858
},
5959
"shared_config_repository": {
6060
Type: schema.TypeString,
@@ -108,8 +108,8 @@ func resourceAccountGitopsSettingsUpdate(d *schema.ResourceData, meta interface{
108108
return resourceAccountGitopsSettingsRead(d, meta)
109109
}
110110

111+
// Settings cannot be deleted, only updated
111112
func resourceAccountGitopsSettingsDelete(d *schema.ResourceData, meta interface{}) error {
112-
113113
return nil
114114
}
115115

0 commit comments

Comments
 (0)