From 78cb911f85855b6331af8b4282c2e502c82803ef Mon Sep 17 00:00:00 2001 From: Manavjot Singh Date: Mon, 23 Oct 2023 16:01:32 -0400 Subject: [PATCH] fix: [CDS-81697]: GitOps app project mapping name update (#712) * fix: [CDS-81307]: GitOps app project mapping name update * updating the go mod and adding changelog * reverting the change in policyset --- .changelog/709.txt | 3 +++ .../data-source.tf | 2 +- .../resource.tf | 2 +- go.sum | 2 -- .../data_source_gitops_agent_deploy_yaml_test.go | 4 +++- .../datasource_gitops_app_project_mapping_test.go | 8 +++++--- .../resource_gitops_app_project_mapping_test.go | 1 + 7 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .changelog/709.txt diff --git a/.changelog/709.txt b/.changelog/709.txt new file mode 100644 index 000000000..69609ed9d --- /dev/null +++ b/.changelog/709.txt @@ -0,0 +1,3 @@ +```release-note:bug +harness_platform_gitops_app_project_mapping - Fix field name of argo project. +``` \ No newline at end of file diff --git a/examples/data-sources/harness_platform_gitops_app_project_mapping/data-source.tf b/examples/data-sources/harness_platform_gitops_app_project_mapping/data-source.tf index 98a6eb1ff..f3cf8f2e3 100644 --- a/examples/data-sources/harness_platform_gitops_app_project_mapping/data-source.tf +++ b/examples/data-sources/harness_platform_gitops_app_project_mapping/data-source.tf @@ -1,4 +1,4 @@ -data "harness_platform_gitops_app_project_mapping" "test" { +data "harness_platform_gitops_app_project_mapping" "example" { identifier = "identifier" account_id = "account_id" org_id = "organization_id" diff --git a/examples/resources/harness_platform_gitops_app_project_mapping/resource.tf b/examples/resources/harness_platform_gitops_app_project_mapping/resource.tf index 0a000425c..a2462b607 100644 --- a/examples/resources/harness_platform_gitops_app_project_mapping/resource.tf +++ b/examples/resources/harness_platform_gitops_app_project_mapping/resource.tf @@ -1,4 +1,4 @@ -resource "harness_platform_gitops_app_project_mapping" "test" { +resource "harness_platform_gitops_app_project_mapping" "example" { account_id = "account_id" org_id = "organization_id" project_id = "project_id" diff --git a/go.sum b/go.sum index 72cef989c..1791d4efd 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/harness/harness-go-sdk v0.3.52 h1:jXeGkBFBNRhQ3VvEcFZFl8+T5mVNPTrkeGAvqjgz3Ro= -github.com/harness/harness-go-sdk v0.3.52/go.mod h1:CPXydorp4zd5Dz2u2FXiHyWL4yd5PQafOMN69cgPSvk= github.com/harness/harness-go-sdk v0.3.55 h1:54vNEpOEVHnK6RCMs0kz86/tNMxDFDNhh5FNtDFQ/5c= github.com/harness/harness-go-sdk v0.3.55/go.mod h1:CPXydorp4zd5Dz2u2FXiHyWL4yd5PQafOMN69cgPSvk= github.com/harness/harness-openapi-go-client v0.0.19 h1:8XuZvSPZrNqKRLh7Qksdz78WvRMRzRf88LgzxoT5u7k= diff --git a/internal/service/platform/gitops/agent_yaml/data_source_gitops_agent_deploy_yaml_test.go b/internal/service/platform/gitops/agent_yaml/data_source_gitops_agent_deploy_yaml_test.go index 855c37698..c3fe4dde0 100644 --- a/internal/service/platform/gitops/agent_yaml/data_source_gitops_agent_deploy_yaml_test.go +++ b/internal/service/platform/gitops/agent_yaml/data_source_gitops_agent_deploy_yaml_test.go @@ -2,11 +2,12 @@ package agent_yaml_test import ( "fmt" - "github.com/harness/harness-go-sdk/harness/utils" "os" "strings" "testing" + "github.com/harness/harness-go-sdk/harness/utils" + "github.com/harness/terraform-provider-harness/internal/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) @@ -51,6 +52,7 @@ func testAccDataSourceGitopsAgentDeployYaml(agentId string, accountId string, ag org_id = harness_platform_organization.test.id name = "%[3]s" type = "MANAGED_ARGO_PROVIDER" + operator = "ARGO" metadata { namespace = "%[4]s" high_availability = false diff --git a/internal/service/platform/gitops/app_project/datasource_gitops_app_project_mapping_test.go b/internal/service/platform/gitops/app_project/datasource_gitops_app_project_mapping_test.go index 829a7c9c3..0db67b4bd 100644 --- a/internal/service/platform/gitops/app_project/datasource_gitops_app_project_mapping_test.go +++ b/internal/service/platform/gitops/app_project/datasource_gitops_app_project_mapping_test.go @@ -2,12 +2,13 @@ package app_project_test import ( "fmt" - "github.com/harness/harness-go-sdk/harness/utils" - "github.com/harness/terraform-provider-harness/internal/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "os" "strings" "testing" + + "github.com/harness/harness-go-sdk/harness/utils" + "github.com/harness/terraform-provider-harness/internal/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccDatasourceGitopsAppProjectMapping(t *testing.T) { @@ -54,6 +55,7 @@ func testAccDatasourceGitopsAppProjectMapping(agentId string, accountId string, project_id = harness_platform_project.test.id name = "%[1]s" type = "MANAGED_ARGO_PROVIDER" + operator = "ARGO" metadata { namespace = "%[1]s" high_availability = false diff --git a/internal/service/platform/gitops/app_project/resource_gitops_app_project_mapping_test.go b/internal/service/platform/gitops/app_project/resource_gitops_app_project_mapping_test.go index 14a43cb06..ee72cf16f 100644 --- a/internal/service/platform/gitops/app_project/resource_gitops_app_project_mapping_test.go +++ b/internal/service/platform/gitops/app_project/resource_gitops_app_project_mapping_test.go @@ -96,6 +96,7 @@ func testAccResourceGitopsAppProjectMapping(agentId string, accountId string, ar project_id = harness_platform_project.test.id name = "%[1]s" type = "MANAGED_ARGO_PROVIDER" + operator = "ARGO" metadata { namespace = "%[1]s" high_availability = false