Skip to content

Commit

Permalink
[feat]: [CDS=99491]: Fix overrides v2 terraform automations (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovish1999 authored Aug 28, 2024
1 parent ebd4fcf commit 9715716
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,30 +124,33 @@ variables:
- name: v1
type: String
value: val1
required: false
manifests:
- manifest:
identifier: manifest1
type: Values
spec:
store:
type: Github
spec:
connectorRef: "<+input>"
connectorRef: <+input>
gitFetchType: Branch
branch: master
commitId: null
paths:
- files1
repoName: "<+input>"
branch: master
skipResourceVersioning: false
folderPath: null
repoName: <+input>
type: Github
configFiles:
- configFile:
identifier: configFile1
spec:
store:
type: Harness
spec:
files:
- "<+org.description>"
- <+org.description>
secretFiles: null
type: Harness
EOT
}
Expand All @@ -167,6 +170,7 @@ variables:
- name: v2
type: String
value: val2
required: false
EOT
}
`, id, name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestAccServiceOverrides_ProjectScope(t *testing.T) {
{
Config: testAccServiceOverridesProjectScope(id, name),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "org_id", id),
resource.TestCheckResourceAttr(resourceName, "org_id", id),
resource.TestCheckResourceAttr(resourceName, "project_id", id),
),
},
Expand Down Expand Up @@ -104,8 +104,7 @@ func TestAccRemoteServiceOverrides(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testRemoteServiceOverrides(id, name),
Check: resource.ComposeTestCheckFunc(
),
Check: resource.ComposeTestCheckFunc(),
},
{
ResourceName: resourceName,
Expand Down Expand Up @@ -223,30 +222,33 @@ variables:
- name: v1
type: String
value: val1
required: false
manifests:
- manifest:
identifier: manifest1
type: Values
spec:
store:
type: Github
spec:
connectorRef: "<+input>"
connectorRef: <+input>
gitFetchType: Branch
branch: master
commitId: null
paths:
- files1
folderPath: null
repoName: "<+input>"
branch: master
skipResourceVersioning: false
type: Github
configFiles:
- configFile:
identifier: configFile1
spec:
store:
type: Harness
spec:
files:
- "<+org.description>"
- <+org.description>
secretFiles: null
type: Harness
EOT
}
`, id, name)
Expand Down Expand Up @@ -312,7 +314,6 @@ func testRemoteServiceOverrides(id string, name string) string {
}`, id, name)
}


func testAccServiceOverridesOrgScope(id string, name string) string {
return fmt.Sprintf(`
resource "harness_platform_organization" "test" {
Expand Down Expand Up @@ -377,31 +378,33 @@ variables:
- name: v1
type: String
value: val1
required: false
manifests:
- manifest:
identifier: manifest1
type: Values
spec:
store:
type: Github
spec:
connectorRef: "<+input>"
connectorRef: <+input>
gitFetchType: Branch
branch: master
commitId: null
paths:
- files1
repoName: "<+input>"
branch: master
skipResourceVersioning: false
folderPath: null
repoName: <+input>
type: Github
configFiles:
- configFile:
identifier: configFile1
spec:
store:
type: Harness
spec:
files:
- "<+org.description>"
- <+org.description>
secretFiles: null
type: Harness
EOT
}
`, id, name)
Expand Down Expand Up @@ -463,30 +466,33 @@ variables:
- name: v1
type: String
value: val1
required: false
manifests:
- manifest:
identifier: manifest1
type: Values
spec:
store:
type: Github
spec:
connectorRef: "<+input>"
connectorRef: <+input>
gitFetchType: Branch
branch: master
commitId: null
paths:
- files1
repoName: "<+input>"
branch: master
skipResourceVersioning: false
folderPath: null
repoName: <+input>
type: Github
configFiles:
- configFile:
identifier: configFile1
spec:
store:
type: Harness
spec:
files:
- "<+org.description>"
- <+org.description>
secretFiles: null
type: Harness
EOT
}
`, id, name)
Expand Down

0 comments on commit 9715716

Please sign in to comment.