Skip to content

Commit

Permalink
fix: [CDS-82842]: GitOps documentation improvements (#755)
Browse files Browse the repository at this point in the history
* fix: [CDS-82842]: GitOps documentation improvements

* updating the agent yaml schema

* updating app projects and applications optional params

* removing unused fields in the gitops application resource

* updating the applications datasource

* updating the cluster resource

* updating cluters datasource

* updating the gnupg keys resource and datasource

* updating the gnupg keys resource and datasource

* updating repository resource

* updating the repo datasource

* updating the repo certs

* updating repo cert doc

* updating the gitops repo cred resource and datasource

* updating the repo cert resource with doc

* updaitng examples and docs

* review comments

---------

Co-authored-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
  • Loading branch information
manavjot-harness and mteodor committed Nov 27, 2023
1 parent 43b81c7 commit 1c4921d
Show file tree
Hide file tree
Showing 42 changed files with 621 additions and 898 deletions.
8 changes: 4 additions & 4 deletions docs/data-sources/platform_gitops_agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_agent Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Datasource for fetching a Harness Gitops Agents.
Datasource for fetching a Harness GitOps Agent.
---

# harness_platform_gitops_agent (Data Source)

Datasource for fetching a Harness Gitops Agents.
Datasource for fetching a Harness GitOps Agent.

## Example Usage

Expand Down Expand Up @@ -38,10 +38,10 @@ data "harness_platform_gitops_agent" "example" {

- `agent_token` (String) Agent token to be used for authentication of the agent with Harness.
- `description` (String) Description of the GitOps agent.
- `operator` (String) Operator to use for the Harness GitOps agent. Enum: "ARGO" "FLAMINGO"
- `id` (String) The ID of this resource.
- `metadata` (List of Object) Metadata of the agent. (see [below for nested schema](#nestedatt--metadata))
- `name` (String) Name of the GitOps agent.
- `operator` (String) The Operator to use for the Harness GitOps agent. Enum: "ARGO" "FLAMINGO"
- `tags` (Map of String) Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- `type` (String) Default: "AGENT_TYPE_UNSET"
Enum: "AGENT_TYPE_UNSET" "CONNECTED_ARGO_PROVIDER" "MANAGED_ARGO_PROVIDER"
Expand All @@ -52,5 +52,5 @@ Enum: "AGENT_TYPE_UNSET" "CONNECTED_ARGO_PROVIDER" "MANAGED_ARGO_PROVIDER"
Read-Only:

- `high_availability` (Boolean)
- `namespace` (String)
- `is_namespaced` (Boolean)
- `namespace` (String)
10 changes: 4 additions & 6 deletions docs/data-sources/platform_gitops_agent_deploy_yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_agent_deploy_yaml Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Datasource for fetching a Harness Gitops Agents.
Datasource for fetching a Harness Gitops Agent deployment manifest YAML.
---

# harness_platform_gitops_agent_deploy_yaml (Data Source)

Datasource for fetching a Harness Gitops Agents.
Datasource for fetching a Harness Gitops Agent deployment manifest YAML.

## Example Usage

Expand All @@ -29,7 +29,7 @@ data "harness_platform_gitops_agent_deploy_yaml" "example" {

- `account_id` (String) Account identifier of the GitOps agent.
- `identifier` (String) Identifier of the GitOps agent.
- `namespace` (String) The k8s namespace that the GitOps agent resides in.
- `namespace` (String) The kubernetes namespace where the agent is installed.

### Optional

Expand All @@ -39,6 +39,4 @@ data "harness_platform_gitops_agent_deploy_yaml" "example" {
### Read-Only

- `id` (String) The ID of this resource.
- `yaml` (String) Deployment YAML of the GitOps agent.


- `yaml` (String) The deployment manifest YAML of the GitOps agent.
16 changes: 13 additions & 3 deletions docs/data-sources/platform_gitops_app_project_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
page_title: "harness_platform_gitops_app_project_mapping Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Resource for managing Harness GitOps Application Project Mappings.
Resource for managing the Harness GitOps Application Project Mappings.
---

# harness_platform_gitops_app_project_mapping (Data Source)

Resource for managing Harness GitOps Application Project Mappings.
Resource for managing the Harness GitOps Application Project Mappings.

## Example Usage

```terraform
data "harness_platform_gitops_app_project_mapping" "example" {
identifier = "identifier"
account_id = "account_id"
org_id = "organization_id"
project_id = "project_id"
agent_id = "agent_id"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -25,5 +35,5 @@ Resource for managing Harness GitOps Application Project Mappings.

### Read-Only

- `argo_project_name` (String) ArgoCD Project Identifier which is to be mapped to the Harness project.
- `argo_project_name` (String) ArgoCD Project name which is to be mapped to the Harness project.
- `id` (String) The ID of this resource.
321 changes: 155 additions & 166 deletions docs/data-sources/platform_gitops_applications.md

Large diffs are not rendered by default.

54 changes: 1 addition & 53 deletions docs/data-sources/platform_gitops_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,19 @@ data "harness_platform_gitops_cluster" "example" {

- `org_id` (String) Organization identifier of the cluster.
- `project_id` (String) Project identifier of the GitOps cluster.
- `query` (Block List) Query for the GitOps cluster resources. (see [below for nested schema](#nestedblock--query))

### Read-Only

- `id` (String) The ID of this resource.
- `request` (List of Object) Cluster create or update request. (see [below for nested schema](#nestedatt--request))

<a id="nestedblock--query"></a>
### Nested Schema for `query`

Optional:

- `id` (Block List) Cluster server URL or the cluster name. (see [below for nested schema](#nestedblock--query--id))
- `name` (String) Name of the GitOps cluster.
- `server` (String) Server of the GitOps cluster.

<a id="nestedblock--query--id"></a>
### Nested Schema for `query.id`

Optional:

- `type` (String) Type of the specified GitOps cluster identifier ( 'server' - default, 'name' ).
- `value` (String) Cluster server URL or the cluster name.



<a id="nestedatt--request"></a>
### Nested Schema for `request`

Read-Only:

- `cluster` (List of Object) (see [below for nested schema](#nestedobjatt--request--cluster))
- `id` (List of Object) (see [below for nested schema](#nestedobjatt--request--id))
- `tags` (Set of String)
- `update_mask` (List of Object) (see [below for nested schema](#nestedobjatt--request--update_mask))
- `updated_fields` (List of String)
- `upsert` (Boolean)

Expand All @@ -95,25 +73,15 @@ Read-Only:

Read-Only:

- `aws_auth_config` (List of Object) (see [below for nested schema](#nestedobjatt--request--cluster--config--aws_auth_config))
- `aws_cluster_name` (String)
- `bearer_token` (String)
- `cluster_connection_type` (String)
- `exec_provider_config` (List of Object) (see [below for nested schema](#nestedobjatt--request--cluster--config--exec_provider_config))
- `password` (String)
- `role_a_r_n` (String)
- `aws_cluster_name` (String)
- `tls_client_config` (List of Object) (see [below for nested schema](#nestedobjatt--request--cluster--config--tls_client_config))
- `username` (String)

<a id="nestedobjatt--request--cluster--config--aws_auth_config"></a>
### Nested Schema for `request.cluster.config.username`

Read-Only:

- `cluster_name` (String)
- `role_a_r_n` (String)


<a id="nestedobjatt--request--cluster--config--exec_provider_config"></a>
### Nested Schema for `request.cluster.config.username`

Expand Down Expand Up @@ -187,23 +155,3 @@ Read-Only:

- `nanos` (Number)
- `seconds` (String)



<a id="nestedobjatt--request--id"></a>
### Nested Schema for `request.id`

Read-Only:

- `type` (String)
- `value` (String)


<a id="nestedobjatt--request--update_mask"></a>
### Nested Schema for `request.update_mask`

Read-Only:

- `paths` (List of List of String)


10 changes: 4 additions & 6 deletions docs/data-sources/platform_gitops_gnupg.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_gnupg Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Data source for retrieving a GPG public key in the server's configuration.
Data source for fetching a Harness GitOps GPG public key.
---

# harness_platform_gitops_gnupg (Data Source)

Data source for retrieving a GPG public key in the server's configuration.
Data source for fetching a Harness GitOps GPG public key.

## Example Usage

Expand All @@ -27,10 +27,10 @@ data "harness_platform_gitops_gnupg" "example" {

- `account_id` (String) Account Identifier for the GnuPG Key.
- `agent_id` (String) Agent identifier for the GnuPG Key.
- `identifier` (String) Identifier for the GnuPG Key.

### Optional

- `identifier` (String) Identifier for the GnuPG Key.
- `org_id` (String) Organization Identifier for the GnuPG Key.
- `project_id` (String) Project Identifier for the GnuPG Key.
- `request` (Block List) GnuPGPublicKey is a representation of a GnuPG public key (see [below for nested schema](#nestedblock--request))
Expand All @@ -53,10 +53,8 @@ Optional:
Optional:

- `fingerprint` (String) Fingerprint is the fingerprint of the key
- `key_data` (String) KeyData holds the raw key data, in base64 encoded format
- `key_data` (String) KeyData holds the raw key data, in base64 encoded format.
- `key_id` (String) KeyID specifies the key ID, in hexadecimal string format.
- `owner` (String) Owner holds the owner identification, e.g. a name and e-mail address
- `sub_type` (String) SubType holds the key's sub type
- `trust` (String) Trust holds the level of trust assigned to this key


14 changes: 6 additions & 8 deletions docs/data-sources/platform_gitops_repo_cert.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_repo_cert Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Data source for retrieving a GitOps RepoCert.
Data source for retrieving a GitOps Repository Certificate. It fetches all the certificates that are added to the provided agent.
---

# harness_platform_gitops_repo_cert (Data Source)

Data source for retrieving a GitOps RepoCert.
Data source for retrieving a GitOps Repository Certificate. It fetches all the certificates that are added to the provided agent.

## Example Usage

Expand All @@ -27,16 +27,14 @@ data "harness_platform_gitops_repo_cert" "test" {

### Required

- `account_id` (String) account identifier of the Repository Certificates.
- `account_id` (String) Account identifier of the GitOps repository certificate.

### Optional

- `agent_id` (String) agent identifier of the Repository Certificates.
- `org_id` (String) organization identifier of the Repository Certificates.
- `project_id` (String) project identifier of the Repository Certificates.
- `agent_id` (String) Agent identifier of the GitOps repository certificate.
- `org_id` (String) Organization identifier of the GitOps repository certificate.
- `project_id` (String) Project identifier of the GitOps repository certificate.

### Read-Only

- `id` (String) The ID of this resource.


27 changes: 12 additions & 15 deletions docs/data-sources/platform_gitops_repo_cred.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_repo_cred Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Data source for retrieving a GitOps RepoCred.
Data source for fetching a GitOps Repository Credentials.
---

# harness_platform_gitops_repo_cred (Data Source)

Data source for retrieving a GitOps RepoCred.
Data source for fetching a GitOps Repository Credentials.

## Example Usage

Expand All @@ -27,16 +27,15 @@ data "harness_platform_gitops_repo_cred" "test" {

### Required

- `account_id` (String) account identifier of the Repository Credentials.
- `agent_id` (String) agent identifier of the Repository Credentials.
- `account_id` (String) Account identifier of the Repository Credentials.
- `agent_id` (String) Agent identifier of the Repository Credentials.
- `identifier` (String) Identifier of the Repository Credentials.

### Optional

- `creds` (Block List) credential details. (see [below for nested schema](#nestedblock--creds))
- `org_id` (String) Organization identifier of the Repository Credential.
- `project_id` (String) Project identifier of the Repository Credential.
- `upsert` (Boolean) if the Repository credential should be upserted.
- `org_id` (String) Organization identifier of the Repository Credentials.
- `project_id` (String) Project identifier of the Repository Credentials.

### Read-Only

Expand All @@ -52,12 +51,10 @@ Optional:
- `github_app_id` (String) Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- `github_app_installation_id` (String) Specifies the ID of the installed GitHub App for GitHub app authentication.
- `github_app_private_key` (String) github_app_private_key specifies the private key PEM data for authentication via GitHub app.
- `password` (String) Password for authenticating at the repo server.
- `ssh_private_key` (String) Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- `tls_client_cert_data` (String) Specifies the TLS client cert data for authenticating at the repo server.
- `tls_client_cert_key` (String) Specifies the TLS client cert key for authenticating at the repo server.
- `password` (String) Password or PAT to be used for authenticating the remote repository.
- `ssh_private_key` (String) SSH Key in PEM format for authenticating the repository. Used only for Git repository.
- `tls_client_cert_data` (String) Certificate in PEM format for authenticating at the repo server. This is used for mTLS.
- `tls_client_cert_key` (String) Private key in PEM format for authenticating at the repo server. This is used for mTLS.
- `type` (String) Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- `url` (String) url representing this object.
- `username` (String) Username for authenticating at the repo server.


- `url` (String) URL of the remote repository. Make sure you pass at least an org, this will not work if you just provide the host, for eg. "https://github.com"
- `username` (String) Username to be used for authenticating the remote repository.
9 changes: 2 additions & 7 deletions docs/data-sources/platform_gitops_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_repository Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Data Source for fetching a Harness GitOps Repository.
Data source for fetching a Harness GitOps Repository.
---

# harness_platform_gitops_repository (Data Source)

Data Source for fetching a Harness GitOps Repository.
Data source for fetching a Harness GitOps Repository.

## Example Usage

Expand All @@ -33,15 +33,10 @@ data "harness_platform_gitops_repository" "example" {

### Optional

- `creds_only` (Boolean) Indicates if to operate on credential set instead of repository.
- `enable_oci` (Boolean) Indicates if helm-oci support must be enabled for this repo.
- `org_id` (String) Organization identifier of the GitOps repository.
- `project_id` (String) Project identifier of the GitOps repository.
- `query_force_refresh` (Boolean) Indicates to force refresh query for repository.
- `query_project` (String) Project to query for the GitOps repo.
- `query_repo` (String) GitOps repository to query.
- `update_mask` (Block List) Update mask of the repository. (see [below for nested schema](#nestedblock--update_mask))
- `upsert` (Boolean) Indicates if the GitOps repository should be updated if existing and inserted if not.

### Read-Only

Expand Down
12 changes: 6 additions & 6 deletions docs/resources/platform_gitops_agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "harness_platform_gitops_agent Resource - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Resource for creating a Harness Gitops Agents.
Resource for managing a Harness GitOps Agent.
---

# harness_platform_gitops_agent (Resource)

Resource for creating a Harness Gitops Agents.
Resource for managing a Harness GitOps Agent.

## Example Usage

Expand Down Expand Up @@ -41,8 +41,8 @@ Enum: "AGENT_TYPE_UNSET" "CONNECTED_ARGO_PROVIDER" "MANAGED_ARGO_PROVIDER"
### Optional

- `description` (String) Description of the GitOps agent.
- `operator` (String) Operator to use for the Harness GitOps agent. Enum: "ARGO" "FLAMINGO"
- `metadata` (Block List) Metadata of the agent. (see [below for nested schema](#nestedblock--metadata))
- `operator` (String) The Operator to use for the Harness GitOps agent. Enum: "ARGO" "FLAMINGO"
- `org_id` (String) Organization identifier of the GitOps agent.
- `project_id` (String) Project identifier of the GitOps agent.
- `tags` (Map of String) Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
Expand All @@ -57,9 +57,9 @@ Enum: "AGENT_TYPE_UNSET" "CONNECTED_ARGO_PROVIDER" "MANAGED_ARGO_PROVIDER"

Optional:

- `high_availability` (Boolean) Indicates if the deployment should be deployed using the deploy-ha.yaml
- `namespace` (String) The k8s namespace that this agent resides in.
- `is_namespaced` (Boolean) Indicates if the agent is namespaced. If true no cluster roles.
- `high_availability` (Boolean) Indicates if the agent is deployed in HA mode.
- `is_namespaced` (Boolean) Indicates if the agent is namespaced.
- `namespace` (String) The kubernetes namespace where the agent should be installed.

## Import

Expand Down
Loading

0 comments on commit 1c4921d

Please sign in to comment.