diff --git a/codefresh/data_account_gitops_settings.go b/codefresh/data_account_gitops_settings.go index 2a26c89..3854b0a 100644 --- a/codefresh/data_account_gitops_settings.go +++ b/codefresh/data_account_gitops_settings.go @@ -12,6 +12,11 @@ func dataSourceAccountGitopsSettings() *schema.Resource { Description: "This data source retrieves gitops settings for the active account", Read: dataSourceAccountGitopsSettingsRead, Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Description: "Account Id", + Computed: true, + }, "name": { Type: schema.TypeString, Computed: true, @@ -59,7 +64,6 @@ func mapDataAccountGitopsSettingsToResource(account *cfclient.GitopsActiveAccoun return fmt.Errorf("cannot get gitops settings as account wasn't properly retrived") } d.SetId(account.ID) - d.Set("_id", account.ID) d.Set("name", account.AccountName) d.Set("admins", account.Admins) d.Set("git_provider", account.GitProvider) diff --git a/codefresh/resource_account_gitops_settings.go b/codefresh/resource_account_gitops_settings.go index a5613f5..6ac6460 100644 --- a/codefresh/resource_account_gitops_settings.go +++ b/codefresh/resource_account_gitops_settings.go @@ -23,6 +23,11 @@ func resourceAccountGitopsSettings() *schema.Resource { // Delete not implemenented as gitops settings cannot be removed, only updated Delete: resourceAccountGitopsSettingsDelete, Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Description: "Account Id", + Computed: true, + }, "name": { Type: schema.TypeString, Description: "Account name for active account", @@ -117,8 +122,8 @@ func mapAccountGitopsSettingsToResource(account *cfclient.GitopsActiveAccountInf if account == nil || account.ID == "" { return fmt.Errorf("cannot get gitops settings as account wasn't properly retrived") } + d.SetId(account.ID) - d.Set("_id", account.ID) d.Set("name", account.AccountName) d.Set("git_provider", account.GitProvider) d.Set("git_provider_api_url", account.GitApiUrl) diff --git a/docs/data-sources/account_gitops_settings.md b/docs/data-sources/account_gitops_settings.md index 1ee8aa6..f0b6c1f 100644 --- a/docs/data-sources/account_gitops_settings.md +++ b/docs/data-sources/account_gitops_settings.md @@ -20,7 +20,7 @@ This data source retrieves gitops settings for the active account - `admins` (List of String) - `git_provider` (String) - `git_provider_api_url` (String) -- `id` (String) The ID of this resource. +- `id` (String) Account Id - `name` (String) - `shared_config_repository` (String) diff --git a/docs/resources/account_gitops_settings.md b/docs/resources/account_gitops_settings.md index c2a8a29..b5663e5 100644 --- a/docs/resources/account_gitops_settings.md +++ b/docs/resources/account_gitops_settings.md @@ -38,7 +38,7 @@ resource "codefresh_account_gitops_settings" "gitops-settings" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Account Id - `name` (String) Account name for active account [!WARNING]