Skip to content

Commit

Permalink
Merge branch 'main' into CDS-57560
Browse files Browse the repository at this point in the history
  • Loading branch information
RishabhGupta34 committed Apr 27, 2023
2 parents c483d53 + 9fc8e95 commit 1fda24c
Show file tree
Hide file tree
Showing 38 changed files with 1,728 additions and 117 deletions.
3 changes: 3 additions & 0 deletions .changelog/508.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/harness_platform_connector_github: Added support for secret ref in application and installtion in github app authentication method.
```
2 changes: 2 additions & 0 deletions .changelog/511.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:new-resource
platform_connector_terraform_cloud - Added a Terraform Cloud connector resource in the Harness Terraform provider.
3 changes: 3 additions & 0 deletions .changelog/515.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
data-source/harness_platform_infrastructure: Fix bug wrt usages of tags in infrastructure yaml.
```
3 changes: 3 additions & 0 deletions .changelog/516.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:fix
resource/harness_platform_environment_service_overrides: Fix bug wrt terraform apply indicating change in service override identifier with same request.
```
4 changes: 4 additions & 0 deletions .changelog/517.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:new-resource
platform_feature_flag - Added feature flag resources to the Harness Terraform Provider.
platform_ff_api_key - Added FF SDK API key resources to the Harness Terraform provider.
```
3 changes: 3 additions & 0 deletions .changelog/518.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/harness_platform_template: added force deletion support for templates
```
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# 0.19.0 (April 26,2023)

ENHANCEMENTS:

* resource/harness_platform_template: added force deletion support for templates ([#518](https://github.com/harness/terraform-provider-harness/issues/518))

# 0.18.0 (April 25,2023)

FEATURES:

* **New Resource:** `platform_feature_flag - Added feature flag resources to the Harness Terraform Provider.
platform_ff_api_key - Added FF SDK API key resources to the Harness Terraform provider.` ([#517](https://github.com/harness/terraform-provider-harness/issues/517))

# 0.17.5 (April 20,2023)

BUG FIXES:

* data-source/harness_platform_infrastructure: Fix bug wrt usages of tags in infrastructure yaml. ([#515](https://github.com/harness/terraform-provider-harness/issues/515))

# 0.17.4 (April 20,2023)

ENHANCEMENTS:

* resource/harness_platform_connector_github: Added support for secret ref in application and installtion in github app authentication method. ([#508](https://github.com/harness/terraform-provider-harness/issues/508))

# 0.17.3 (April 10,2023)

BUG FIXES:
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/platform_connector_github.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Read-Only:
Read-Only:

- `application_id` (String)
- `application_id_ref` (String)
- `installation_id` (String)
- `installation_id_ref` (String)
- `private_key_ref` (String)


Expand Down
54 changes: 54 additions & 0 deletions docs/data-sources/platform_connector_terraform_cloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "harness_platform_connector_terraform_cloud Data Source - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Resource for looking up a Terraform Cloud connector.
---

# harness_platform_connector_terraform_cloud (Data Source)

Resource for looking up a Terraform Cloud connector.

## Example Usage

```terraform
data "harness_platform_connector_terraform_cloud" "example" {
identifier = "identifier"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `identifier` (String) Unique identifier of the resource.
- `name` (String) Name of the resource.
- `org_id` (String) Unique identifier of the organization.
- `project_id` (String) Unique identifier of the project.

### Read-Only

- `credentials` (List of Object) Credentials to connect to the Terraform Cloud platform. (see [below for nested schema](#nestedatt--credentials))
- `delegate_selectors` (Set of String) Tags to filter delegates for connection.
- `description` (String) Description of the resource.
- `id` (String) The ID of this resource.
- `tags` (Set of String) Tags to associate with the resource.
- `url` (String) URL of the Terraform Cloud platform.

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

Read-Only:

- `api_token` (List of Object) (see [below for nested schema](#nestedobjatt--credentials--api_token))

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

Read-Only:

- `api_token_ref` (String)


17 changes: 17 additions & 0 deletions docs/data-sources/platform_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,25 @@ Data source for retrieving a Harness pipeline.
## Example Usage

```terraform
#For account level template
data "harness_platform_template" "example" {
identifier = "identifier"
version = "version"
}
#For org level template
data "harness_platform_template" "example1" {
identifier = "identifier"
version = "version"
org_id = "org_id"
}
#For project level template
data "harness_platform_template" "example2" {
identifier = "identifier"
version = "version"
org_id = "org_id"
project_id = "project_id"
}
```

Expand Down
7 changes: 6 additions & 1 deletion docs/resources/platform_connector_github.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,14 @@ Optional:

Required:

- `private_key_ref` (String) Reference to the secret containing the private key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.

Optional:

- `application_id` (String) Enter the GitHub App ID from the GitHub App General tab.
- `application_id_ref` (String) Reference to the secret containing application id To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
- `installation_id` (String) Enter the Installation ID located in the URL of the installed GitHub App.
- `private_key_ref` (String) Reference to the secret containing the private key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
- `installation_id_ref` (String) Reference to the secret containing installation id. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.

## Import

Expand Down
91 changes: 91 additions & 0 deletions docs/resources/platform_connector_terraform_cloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "harness_platform_connector_terraform_cloud Resource - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Resource for creating a Terraform Cloud connector.
---

# harness_platform_connector_terraform_cloud (Resource)

Resource for creating a Terraform Cloud connector.

## Example Usage

```terraform
# Create a Terraform Cloud connector by using an API token as a secret.
resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
identifier = "example_terraform_cloud_connector"
name = "Example terraform cloud connector"
description = "description of terraform cloud connector"
tags = ["foo:bar"]
delegate_selectors = ["harness-delegate"]
credentials {
api_token {
api_token_ref = "account.TEST_terraform_cloud_api_token"
}
}
}
# Specify the connectivity mode by setting execute_on_delegate to true or false. The default mode executes on the delegate.
resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
identifier = "example_terraform_cloud_connector"
name = "Example terraform cloud connector"
description = "description of terraform cloud connector"
delegate_selectors = ["harness-delegate"]
tags = ["foo:bar"]
execute_on_delegate = false
credentials {
api_token {
api_token_ref = "account.TEST_terraform_cloud_api_token"
}
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `credentials` (Block List, Min: 1, Max: 1) Credentials to connect to the Terraform Cloud platform. (see [below for nested schema](#nestedblock--credentials))
- `identifier` (String) Unique identifier of the resource.
- `name` (String) Name of the resource.
- `url` (String) URL of the Terraform Cloud platform.

### Optional

- `delegate_selectors` (Set of String) Connect only using delegates with these tags.
- `description` (String) Description of the resource.
- `org_id` (String) Unique identifier of the organization.
- `project_id` (String) Unique identifier of the project.
- `tags` (Set of String) Tags to associate with the resource.

### Read-Only

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

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

Required:

- `api_token` (Block List, Min: 1, Max: 1) API token credentials to use for authentication. (see [below for nested schema](#nestedblock--credentials--api_token))

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

Required:

- `api_token_ref` (String) Reference to a secret containing the API token to use for authentication. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.

## Import

Import is supported using the following syntax:

```shell
# Import using the Terraform Cloud provider connector ID.
terraform import harness_platform_connector_terraform_cloud.example <connector_id>
```
124 changes: 124 additions & 0 deletions docs/resources/platform_feature_flag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "harness_platform_feature_flag Resource - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Resource for managing Feature Flags.
---

# harness_platform_feature_flag (Resource)

Resource for managing Feature Flags.

## Example Usage

```terraform
// Boolean Flag
resource "harness_platform_feature_flag" "mybooleanflag" {
org_id = "test"
project_id = "testff"
kind = "boolean"
name = "MY_FEATURE"
identifier = "MY_FEATURE"
permanent = false
default_on_variation = "Enabled"
default_off_variation = "Disabled"
variation {
identifier = "Enabled"
name = "Enabled"
description = "The feature is enabled"
value = "true"
}
variation {
identifier = "Disabled"
name = "Disabled"
description = "The feature is disabled"
value = "false"
}
}
// Multivariate flag
resource "harness_platform_feature_flag" "mymultivariateflag" {
org_id = "test"
project_id = "testff"
kind = "int"
name = "FREE_TRIAL_DURATION"
identifier = "FREE_TRIAL_DURATION"
permanent = false
default_on_variation = "trial7"
default_off_variation = "trial20"
variation {
identifier = "trial7"
name = "7 days trial"
description = "Free trial period 7 days"
value = "7"
}
variation {
identifier = "trial14"
name = "14 days trial"
description = "Free trial period 14 days"
value = "14"
}
variation {
identifier = "trial20"
name = "20 days trial"
description = "Free trial period 20 days"
value = "20"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `default_off_variation` (String) Which of the variations to use when the flag is toggled to off state
- `default_on_variation` (String) Which of the variations to use when the flag is toggled to on state
- `identifier` (String) Identifier of the Feature Flag
- `kind` (String) The type of data the flag represents. Valid values are `boolean`, `int`, `string`, `json`
- `name` (String) Name of the Feature Flag
- `org_id` (String) Organization Identifier
- `permanent` (Boolean) Whether or not the flag is permanent. If it is, it will never be flagged as stale
- `project_id` (String) Project Identifier
- `variation` (Block List, Min: 2) The options available for your flag (see [below for nested schema](#nestedblock--variation))

### Optional

- `archived` (Boolean) Whether or not the flag is archived
- `git_details` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--git_details))
- `owner` (String) The owner of the flag

### Read-Only

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

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

Required:

- `description` (String) The description of the variation
- `identifier` (String) The identifier of the variation
- `name` (String) The user friendly name of the variation
- `value` (String) The value of the variation


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

Required:

- `commit_msg` (String) The commit message to use as part of a gitsync operation


Loading

0 comments on commit 1fda24c

Please sign in to comment.