Skip to content

Commit 92976e6

Browse files
nassergonzalezHarness
authored andcommitted
feat: [IAC-4683]: Add MRT enable/disable endpoints (#1302)
* ac7b4e Apply suggestion from code review * c65664 feat: [IAC-4683]: Add MRT enable/disable endpoints * d313b6 feat: [IAC-4683]: Add MRT enable/disable endpoints * e8f918 feat: [IAC-4683]: Add MRT enable/disable endpoints
1 parent 4499a2e commit 92976e6

File tree

19 files changed

+1538
-8
lines changed

19 files changed

+1538
-8
lines changed

.changelog/1302.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```release-note:new-resource
2+
harness_platform_infra_module_testing - added a new resource for iacm module registry testing
3+
harness_platform_infra_module_testing - added a new data source for iacm module registry testing
4+
harness_platform_infra_modules - added a new data source for iacm module registry
5+
```

docs/data-sources/platform_infra_module.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ data "harness_platform_infra_module" "test" {
2525

2626
### Required
2727

28+
- `account` (String) Account that owns the module
2829
- `id` (String) Identifier of the module
2930
- `name` (String) Name of the module
3031
- `system` (String) Provider of the module
@@ -33,6 +34,10 @@ data "harness_platform_infra_module" "test" {
3334

3435
- `created` (Number) Timestamp when the module was created
3536
- `description` (String) Description of the module
37+
- `git_tag_style` (String) Git Tag Style
38+
- `module_error` (String) Error while retrieving the module
39+
- `org` (String) Organization that owns the module
40+
- `project` (String) Project that owns the module
3641
- `repository` (String) For account connectors, the repository where the module is stored
3742
- `repository_branch` (String) Repository Branch in which the module should be accessed
3843
- `repository_commit` (String) Repository Commit in which the module should be accessed
@@ -41,3 +46,21 @@ data "harness_platform_infra_module" "test" {
4146
- `repository_url` (String) URL where the module is stored
4247
- `synced` (Number) Timestamp when the module was last synced
4348
- `tags` (String) Tags associated with the module
49+
- `testing_enabled` (Boolean) Whether testing is enabled for the module
50+
- `testing_metadata` (Block List, Max: 1) Testing metadata for the module (see [below for nested schema](#nestedblock--testing_metadata))
51+
- `updated` (Number) Timestamp when the module was last modified
52+
- `versions` (List of String) Versions of the module
53+
54+
<a id="nestedblock--testing_metadata"></a>
55+
### Nested Schema for `testing_metadata`
56+
57+
Optional:
58+
59+
- `account` (String) Account is the internal customer account ID
60+
- `org` (String) Organization identifier
61+
- `pipelines` (List of String) Pipelines where the testing is enabled
62+
- `project` (String) Project identifier
63+
- `provider_connector` (String) Provider connector for testing purposes
64+
- `provisioner_type` (String) Provisioner type for testing purposes
65+
- `provisioner_version` (String) Provisioner version for testing purposes
66+
- `release_pipeline` (String) Release pipeline
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "harness_platform_infra_module_testing Data Source - terraform-provider-harness"
4+
subcategory: "Next Gen"
5+
description: |-
6+
Data source for retrieving modules testing metadata from the module registry.
7+
---
8+
9+
# harness_platform_infra_module_testing (Data Source)
10+
11+
Data source for retrieving modules testing metadata from the module registry.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `module_id` (String) Identifier of the module to enable testing for
21+
- `org` (String) Organization identifier
22+
- `pipelines` (List of String) List of pipeline IDs to create webhooks for triggering test executions
23+
- `project` (String) Project identifier
24+
- `provider_connector` (String) Provider connector for testing purposes
25+
- `provisioner_type` (String) Provisioner type for testing purposes (e.g., terraform, tofu)
26+
- `provisioner_version` (String) Provisioner version for testing purposes
27+
28+
### Optional
29+
30+
- `release_pipeline` (String) Pipeline ID to create webhooks for releases
31+
- `testing_enabled` (Boolean) Whether testing is enabled for the module
32+
- `testing_metadata` (Block List, Max: 1) Testing metadata for the module (see [below for nested schema](#nestedblock--testing_metadata))
33+
- `updated` (Number) Timestamp when the module was last modified
34+
- `versions` (List of String) Versions of the module
35+
36+
### Read-Only
37+
38+
- `account` (String) Account that owns the module
39+
- `created` (Number) Timestamp when the module was created
40+
- `description` (String) Description of the module
41+
- `git_tag_style` (String) Git Tag Style
42+
- `id` (String) The ID of this resource.
43+
- `module_error` (String) Error while retrieving the module
44+
- `name` (String) Name of the module
45+
- `repository` (String) For account connectors, the repository where the module is stored
46+
- `repository_branch` (String) Repository Branch in which the module should be accessed
47+
- `repository_commit` (String) Repository Commit in which the module should be accessed
48+
- `repository_connector` (String) Repository Connector is the reference to the connector for the repository
49+
- `repository_path` (String) Repository Path is the path in which the module resides
50+
- `repository_url` (String) URL where the module is stored
51+
- `synced` (Number) Timestamp when the module was last synced
52+
- `system` (String) Provider of the module
53+
- `tags` (String) Tags associated with the module
54+
55+
<a id="nestedblock--testing_metadata"></a>
56+
### Nested Schema for `testing_metadata`
57+
58+
Optional:
59+
60+
- `account` (String) Account is the internal customer account ID
61+
- `org` (String) Organization identifier
62+
- `pipelines` (List of String) Pipelines where the testing is enabled
63+
- `project` (String) Project identifier
64+
- `provider_connector` (String) Provider connector for testing purposes
65+
- `provisioner_type` (String) Provisioner type for testing purposes
66+
- `provisioner_version` (String) Provisioner version for testing purposes
67+
- `release_pipeline` (String) Release pipeline
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "harness_platform_infra_modules Data Source - terraform-provider-harness"
4+
subcategory: "Next Gen"
5+
description: |-
6+
Data source for retrieving a list of modules from the module registry.
7+
---
8+
9+
# harness_platform_infra_modules (Data Source)
10+
11+
Data source for retrieving a list of modules from the module registry.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "harness_platform_infra_modules" "all" {}
17+
```
18+
19+
<!-- schema generated by tfplugindocs -->
20+
## Schema
21+
22+
### Read-Only
23+
24+
- `id` (String) The ID of this resource.
25+
- `modules` (List of Object) List of modules (see [below for nested schema](#nestedatt--modules))
26+
27+
<a id="nestedatt--modules"></a>
28+
### Nested Schema for `modules`
29+
30+
Read-Only:
31+
32+
- `account` (String)
33+
- `created` (Number)
34+
- `description` (String)
35+
- `id` (String)
36+
- `name` (String)
37+
- `org` (String)
38+
- `project` (String)
39+
- `repository` (String)
40+
- `repository_branch` (String)
41+
- `repository_commit` (String)
42+
- `repository_connector` (String)
43+
- `repository_path` (String)
44+
- `repository_url` (String)
45+
- `synced` (Number)
46+
- `system` (String)
47+
- `tags` (String)
48+
- `testing_enabled` (Boolean)
49+
- `updated` (Number)
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "harness_platform_infra_module_testing Resource - terraform-provider-harness"
4+
subcategory: "Next Gen"
5+
description: |-
6+
Resource for managing Terraform/Tofu Modules.
7+
---
8+
9+
# harness_platform_infra_module_testing (Resource)
10+
11+
Resource for managing Terraform/Tofu Modules.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "harness_platform_infra_module" "example" {
17+
module_id = 1234
18+
org = "default"
19+
project = "project"
20+
provider_connector = "account.connector"
21+
provisioner_type = "tofu"
22+
provisioner_version = "1.9.4"
23+
pipelines = [
24+
"pipelinea",
25+
"pipelineb"
26+
]
27+
}
28+
```
29+
30+
<!-- schema generated by tfplugindocs -->
31+
## Schema
32+
33+
### Required
34+
35+
- `module_id` (String) Identifier of the module to enable testing for
36+
- `org` (String) Organization identifier
37+
- `pipelines` (List of String) List of pipeline IDs to create webhooks for triggering test executions
38+
- `project` (String) Project identifier
39+
- `provider_connector` (String) Provider connector for testing purposes
40+
- `provisioner_type` (String) Provisioner type for testing purposes (e.g., terraform, tofu)
41+
- `provisioner_version` (String) Provisioner version for testing purposes
42+
43+
### Optional
44+
45+
- `release_pipeline` (String) Pipeline ID to create webhooks for releases
46+
- `testing_enabled` (Boolean) Whether testing is enabled for the module
47+
- `testing_metadata` (Block List, Max: 1) Testing metadata for the module (see [below for nested schema](#nestedblock--testing_metadata))
48+
- `updated` (Number) Timestamp when the module was last modified
49+
- `versions` (List of String) Versions of the module
50+
51+
### Read-Only
52+
53+
- `account` (String) Account that owns the module
54+
- `created` (Number) Timestamp when the module was created
55+
- `description` (String) Description of the module
56+
- `git_tag_style` (String) Git Tag Style
57+
- `id` (String) The ID of this resource.
58+
- `module_error` (String) Error while retrieving the module
59+
- `name` (String) Name of the module
60+
- `repository` (String) For account connectors, the repository where the module is stored
61+
- `repository_branch` (String) Repository Branch in which the module should be accessed
62+
- `repository_commit` (String) Repository Commit in which the module should be accessed
63+
- `repository_connector` (String) Repository Connector is the reference to the connector for the repository
64+
- `repository_path` (String) Repository Path is the path in which the module resides
65+
- `repository_url` (String) URL where the module is stored
66+
- `synced` (Number) Timestamp when the module was last synced
67+
- `system` (String) Provider of the module
68+
- `tags` (String) Tags associated with the module
69+
70+
<a id="nestedblock--testing_metadata"></a>
71+
### Nested Schema for `testing_metadata`
72+
73+
Optional:
74+
75+
- `account` (String) Account is the internal customer account ID
76+
- `org` (String) Organization identifier
77+
- `pipelines` (List of String) Pipelines where the testing is enabled
78+
- `project` (String) Project identifier
79+
- `provider_connector` (String) Provider connector for testing purposes
80+
- `provisioner_type` (String) Provisioner type for testing purposes
81+
- `provisioner_version` (String) Provisioner version for testing purposes
82+
- `release_pipeline` (String) Release pipeline
83+
84+
## Import
85+
86+
Import is supported using the following syntax:
87+
88+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
89+
90+
```shell
91+
terraform import harness_platform_infra_module_testing.example <module_id>
92+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data "harness_platform_infra_module" "test" {
2+
identifier = "identifier"
3+
name = "name"
4+
system = "system"
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import harness_platform_infra_module_testing.example <module_id>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resource "harness_platform_infra_module" "example" {
2+
module_id = 1234
3+
org = "default"
4+
project = "project"
5+
provider_connector = "account.connector"
6+
provisioner_type = "tofu"
7+
provisioner_version = "1.9.4"
8+
pipelines = [
9+
"pipelinea",
10+
"pipelineb"
11+
]
12+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/aws/aws-sdk-go v1.46.4
1010
github.com/docker/docker v28.3.2+incompatible
1111
github.com/google/uuid v1.6.0
12-
github.com/harness/harness-go-sdk v0.5.17
12+
github.com/harness/harness-go-sdk v0.6.0
1313
github.com/harness/harness-openapi-go-client v0.0.25
1414
github.com/hashicorp/go-cleanhttp v0.5.2
1515
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
7878
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
7979
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA=
8080
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M=
81-
github.com/harness/harness-go-sdk v0.5.17 h1:sjkeJjx2DUxynAuOiYJb4O+YujAbhjo6IW8rRw4GjHg=
82-
github.com/harness/harness-go-sdk v0.5.17/go.mod h1:CPXydorp4zd5Dz2u2FXiHyWL4yd5PQafOMN69cgPSvk=
81+
github.com/harness/harness-go-sdk v0.6.0 h1:iKp7HrJL/mH5CJph1KGH+yqZMZZTvN/d9zogGyycRxc=
82+
github.com/harness/harness-go-sdk v0.6.0/go.mod h1:CPXydorp4zd5Dz2u2FXiHyWL4yd5PQafOMN69cgPSvk=
8383
github.com/harness/harness-openapi-go-client v0.0.25 h1:s1ALpC6cCJCMBkEVPjAjyHTPEpBfPyV78TeXpp3CEoU=
8484
github.com/harness/harness-openapi-go-client v0.0.25/go.mod h1:u0vqYb994BJGotmEwJevF4L3BNAdU9i8ui2d22gmLPA=
8585
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=

0 commit comments

Comments
 (0)