Skip to content

Commit

Permalink
[feat]: [CDS-82723]: Add override identifier details in overrides v2 …
Browse files Browse the repository at this point in the history
…documentation (#730)

* [feat]: [CDS-82723]: add override identifier details in overrides v2 docs

* [feat]: [CDS-82723]: add override identifier details in overrides v2 docs - 2

* [feat]: [CDS-82723]: add override identifier details in overrides v2 docs - 3
  • Loading branch information
lovish1999 committed Oct 27, 2023
1 parent e72b2a9 commit 7d44615
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/730.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
harness_platform_service_overrides_v2 - Updated documentation with details of how overrides v2 identifiers are generated.
```
13 changes: 11 additions & 2 deletions docs/data-sources/platform_service_overrides_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ data "harness_platform_service_overrides_v2" "test" {

### Required

- `identifier` (String) The identifier of the override entity.
- `identifier` (String) The identifier of the override entity. This identifier is generated based on the type of the override entity by joining respective environment, service & infrastructure identifiers with "_".
- "ENV_GLOBAL_OVERRIDE" : If the env_id is e1, then the override identifier will be "e1".
- "ENV_SERVICE_OVERRIDE" : If the env_id is e1 & service_id is s1, then the override identifier will be "e1_s1".
- "INFRA_GLOBAL_OVERRIDE" : If the env_id is e1 & infra_id is i1, then the override identifier will be "e1_i1".
- "INFRA_SERVICE_OVERRIDE" : If the env_id is e1, service_id is s1 & infra_id is i1, then the override identifier will be "e1_s1_i1".


### Optional

Expand All @@ -38,5 +43,9 @@ data "harness_platform_service_overrides_v2" "test" {
- `infra_id` (String) The infrastructure ID to which the override entity is associated.
- `service_id` (String) The service ID to which the override entity is associated.
- `env_id` (String) The environment ID to which the override entity is associated.
- `type` (String) The type of the override entity.
- `type` (String) The type of the override entity. There can be four types of override entity -
- "ENV_GLOBAL_OVERRIDE" : Applies to an environment globally irrespective of the service used with it.
- "ENV_SERVICE_OVERRIDE" : Applies to a specific environment & service combination.
- "INFRA_GLOBAL_OVERRIDE" : Applies to an infrastructure globally irrespective of the service used with it.
- "INFRA_SERVICE_OVERRIDE" : Applies to a specific infrastructure & service combination.
- `yaml` (String) The yaml of the override entity's spec property. More details regarding the spec property can be found [here](https://apidocs.harness.io/tag/ServiceOverrides#operation/createServiceOverride!path=spec&t=request)
6 changes: 5 additions & 1 deletion docs/resources/platform_service_overrides_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ resource "harness_platform_service_overrides_v2" "test" {
### Read-Only

- `id` (String) The ID of this resource.
- `identifier` (String) The identifier of the override entity.
- `identifier` (String) The identifier of the override entity. This identifier is generated based on the type of the override entity by joining respective environment, service & infrastructure identifiers with "_".
- "ENV_GLOBAL_OVERRIDE" : If the env_id is e1, then the override identifier will be "e1".
- "ENV_SERVICE_OVERRIDE" : If the env_id is e1 & service_id is s1, then the override identifier will be "e1_s1".
- "INFRA_GLOBAL_OVERRIDE" : If the env_id is e1 & infra_id is i1, then the override identifier will be "e1_i1".
- "INFRA_SERVICE_OVERRIDE" : If the env_id is e1, service_id is s1 & infra_id is i1, then the override identifier will be "e1_s1_i1".

## Import

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ variables:
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func testAccServiceOverridesProjectScope(id string, name string) string {
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down Expand Up @@ -201,7 +201,7 @@ variables:
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down Expand Up @@ -255,7 +255,7 @@ func testAccServiceOverridesOrgScope(id string, name string) string {
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down Expand Up @@ -294,7 +294,7 @@ variables:
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down Expand Up @@ -342,7 +342,7 @@ func testAccServiceOverridesAccountScope(id string, name string) string {
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down Expand Up @@ -380,7 +380,7 @@ variables:
manifests:
- manifest:
identifier: manifest1
type: K8sManifest
type: Values
spec:
store:
type: Github
Expand Down

0 comments on commit 7d44615

Please sign in to comment.