Skip to content

Commit c63a9c3

Browse files
qchalmer-oracleMonica Joshi
authored andcommitted
Added support for Devops Deploy Helm Uninstall/Open Cli
1 parent 368d775 commit c63a9c3

15 files changed

+453
-191
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {
5+
}
6+
7+
variable "compartment_ocid" {
8+
}
9+
10+
variable "region" {
11+
}
12+
13+
provider "oci" {
14+
region = var.region
15+
tenancy_ocid = var.tenancy_ocid
16+
}
17+
18+
resource "random_string" "topicname" {
19+
length = 10
20+
special = false
21+
}
22+
23+
resource "random_string" "projectname" {
24+
length = 10
25+
special = false
26+
}
27+
28+
resource "oci_ons_notification_topic" "test_notification_topic" {
29+
#Required
30+
compartment_id = var.compartment_ocid
31+
name = random_string.topicname.result
32+
}
33+
34+
resource "oci_devops_project" "test_project" {
35+
#Required
36+
compartment_id = var.compartment_ocid
37+
name = join("", ["A", random_string.projectname.result])
38+
notification_config {
39+
#Required
40+
topic_id = oci_ons_notification_topic.test_notification_topic.id
41+
}
42+
}
43+
44+
resource "oci_devops_deploy_artifact" "test_deploy_helm_command_spec_artifact" {
45+
#Required
46+
project_id = oci_devops_project.test_project.id
47+
display_name = "Display_name"
48+
deploy_artifact_type = "HELM_COMMAND_SPEC"
49+
argument_substitution_mode = "NONE"
50+
deploy_artifact_source {
51+
deploy_artifact_source_type = "HELM_COMMAND_SPEC"
52+
helm_artifact_source_type = "INLINE"
53+
base64encoded_content = "aGVsbSBscyAtYQpoZWxtIHN0YXR1cyAtYQ=="
54+
}
55+
}

examples/devops/deployment_service/helm_diff/oke_helm_diff_deployment.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ resource "oci_devops_deploy_stage" "test_helm_deploy_stage" {
9393
}
9494
deploy_stage_type = "OKE_HELM_CHART_DEPLOYMENT"
9595
release_name = "release-name"
96+
purpose = "EXECUTE_HELM_UPGRADE"
9697
helm_chart_deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_helm_artifact.id
9798
}
9899

examples/devops/deployment_service/oke_helm_deploy_stage/oke_helm_deploy_stage.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@ resource "oci_devops_deploy_stage" "test_helm_deploy_stage" {
9393
}
9494
deploy_stage_type = "OKE_HELM_CHART_DEPLOYMENT"
9595
release_name = "release-name"
96+
purpose = "EXECUTE_HELM_UPGRADE"
9697
helm_chart_deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_helm_artifact.id
9798
}

internal/integrationtest/devops_deploy_artifact_helm_test.go

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ import (
2020

2121
var (
2222
DeployHelmArtifactRequiredOnlyResource = DevopsDeployArtifactResourceDependencies +
23-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, deployHelmArtifactRepresentation)
23+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, deployHelmChartArtifactRepresentation)
2424

2525
DeployHelmArtifactResourceConfig = DevopsDeployArtifactResourceDependencies +
26-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Update, deployHelmArtifactRepresentation)
26+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Update, deployHelmChartArtifactRepresentation)
27+
28+
DeployHelmCommandSpecArtifactResourceConfig = DevopsDeployArtifactResourceDependencies +
29+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, deployHelmCommandSpecArtifactRepresentation)
2730

2831
deployHelmArtifactSingularDataSourceRepresentation = map[string]interface{}{
2932
"deploy_artifact_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_devops_deploy_artifact.test_deploy_artifact.id}`},
3033
}
3134

32-
deployHelmArtifactRepresentation = map[string]interface{}{
35+
deployHelmChartArtifactRepresentation = map[string]interface{}{
3336
"argument_substitution_mode": acctest.Representation{RepType: acctest.Required, Create: `NONE`, Update: `SUBSTITUTE_PLACEHOLDERS`},
34-
"deploy_artifact_source": acctest.RepresentationGroup{RepType: acctest.Required, Group: deployHelmArtifactDeployArtifactSourceRepresentation},
37+
"deploy_artifact_source": acctest.RepresentationGroup{RepType: acctest.Required, Group: deployHelmChartArtifactDeployArtifactSourceRepresentation},
3538
"deploy_artifact_type": acctest.Representation{RepType: acctest.Required, Create: `HELM_CHART`},
3639
"project_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_devops_project.test_project.id}`},
3740
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
@@ -41,10 +44,29 @@ var (
4144
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation},
4245
}
4346

44-
deployHelmArtifactDeployArtifactSourceRepresentation = map[string]interface{}{
47+
deployHelmChartArtifactDeployArtifactSourceRepresentation = map[string]interface{}{
4548
"deploy_artifact_source_type": acctest.Representation{RepType: acctest.Required, Create: `HELM_CHART`},
46-
"chart_url": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithBlankDefault("helm_chart_url_static_resource"), Update: utils.GetEnvSettingWithBlankDefault("helm_chart_url_update_static_resource")},
47-
"deploy_artifact_version": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithBlankDefault("helm_deploy_artifact_version_static_resource"), Update: utils.GetEnvSettingWithBlankDefault("helm_deploy_artifact_version_update_static_resource")},
49+
"chart_url": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithDefault("helm_chart_url_static_resource", "oci://us-ashburn-1.ocir.io/idkxrdu9epyt/helm-test-chart"), Update: utils.GetEnvSettingWithDefault("helm_chart_url_update_static_resource", "oci://iad.ocir.io/ax022wvgmjpq/helm-charts-testing/helm-chart-nginx")},
50+
"deploy_artifact_version": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithDefault("helm_deploy_artifact_version_static_resource", "0.0.1"), Update: utils.GetEnvSettingWithDefault("helm_deploy_artifact_version_update_static_resource", "1.0.6")},
51+
}
52+
53+
deployHelmCommandSpecArtifactRepresentation = map[string]interface{}{
54+
"argument_substitution_mode": acctest.Representation{RepType: acctest.Required, Create: `NONE`, Update: `SUBSTITUTE_PLACEHOLDERS`},
55+
"deploy_artifact_source": acctest.RepresentationGroup{RepType: acctest.Required, Group: deployHelmCommandSpecArtifactDeployArtifactSourceRepresentation},
56+
"deploy_artifact_type": acctest.Representation{RepType: acctest.Required, Create: `HELM_COMMAND_SPEC`},
57+
"project_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_devops_project.test_project.id}`},
58+
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
59+
"description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`},
60+
"display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`},
61+
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}},
62+
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation},
63+
}
64+
65+
base64EncodeHelmCommandSpec = "aGVsbSBscyAtYQpoZWxtIHN0YXR1cyAtYQ=="
66+
deployHelmCommandSpecArtifactDeployArtifactSourceRepresentation = map[string]interface{}{
67+
"deploy_artifact_source_type": acctest.Representation{RepType: acctest.Required, Create: `INLINE`},
68+
"helm_artifact_source_type": acctest.Representation{RepType: acctest.Required, Create: `INLINE`},
69+
"base64encoded_content": acctest.Representation{RepType: acctest.Required, Create: base64EncodeHelmCommandSpec},
4870
}
4971
)
5072

@@ -56,10 +78,10 @@ func TestDevopsDeployArtifactResource_helm(t *testing.T) {
5678
config := acctest.ProviderTestConfig()
5779

5880
compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid")
59-
chartUrl := utils.GetEnvSettingWithBlankDefault("helm_chart_url_static_resource")
60-
artifactVersion := utils.GetEnvSettingWithBlankDefault("helm_deploy_artifact_version_static_resource")
61-
chartUrlUpdated := utils.GetEnvSettingWithBlankDefault("helm_chart_url_update_static_resource")
62-
artifactVersionUpdated := utils.GetEnvSettingWithBlankDefault("helm_deploy_artifact_version_update_static_resource")
81+
chartUrl := utils.GetEnvSettingWithDefault("helm_chart_url_static_resource", "oci://us-ashburn-1.ocir.io/idkxrdu9epyt/helm-test-chart")
82+
artifactVersion := utils.GetEnvSettingWithDefault("helm_deploy_artifact_version_static_resource", "0.0.1")
83+
chartUrlUpdated := utils.GetEnvSettingWithDefault("helm_chart_url_update_static_resource", "oci://iad.ocir.io/ax022wvgmjpq/helm-charts-testing/helm-chart-nginx")
84+
artifactVersionUpdated := utils.GetEnvSettingWithDefault("helm_deploy_artifact_version_update_static_resource", "1.0.6")
6385

6486
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId)
6587

@@ -70,13 +92,39 @@ func TestDevopsDeployArtifactResource_helm(t *testing.T) {
7092
var resId, resId2 string
7193
// Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "Create with optionals" step in the test.
7294
acctest.SaveConfigContent(config+compartmentIdVariableStr+DevopsDeployArtifactResourceDependencies+
73-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Create, deployHelmArtifactRepresentation), "devops", "deployArtifact", t)
95+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Create, deployHelmChartArtifactRepresentation), "devops", "deployArtifact", t)
7496

7597
acctest.ResourceTest(t, testAccCheckDevopsDeployArtifactDestroy, []resource.TestStep{
76-
// verify Create
98+
/*
99+
// verify Create (Helm command Spec)
100+
{
101+
Config: config + compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies +
102+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, deployHelmCommandSpecArtifactRepresentation),
103+
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
104+
resource.TestCheckResourceAttrSet(resourceName, "id"),
105+
resource.TestCheckResourceAttr(resourceName, "argument_substitution_mode", "NONE"),
106+
resource.TestCheckResourceAttr(resourceName, "deploy_artifact_source.#", "1"),
107+
resource.TestCheckResourceAttr(resourceName, "deploy_artifact_source.0.base64encoded_content", base64EncodeHelmCommandSpec),
108+
resource.TestCheckResourceAttr(resourceName, "deploy_artifact_source.0.deploy_artifact_source_type", "HELM_COMMAND_SPEC"),
109+
resource.TestCheckResourceAttr(resourceName, "deploy_artifact_source.0.helm_artifact_source_type", "INLINE"),
110+
resource.TestCheckResourceAttr(resourceName, "deploy_artifact_type", "HELM_COMMAND_SPEC"),
111+
resource.TestCheckResourceAttrSet(resourceName, "project_id"),
112+
113+
func(s *terraform.State) (err error) {
114+
resId, err = acctest.FromInstanceState(s, resourceName, "id")
115+
return err
116+
},
117+
),
118+
},
119+
// delete before next Create
120+
{
121+
Config: config + compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies,
122+
},
123+
*/
124+
// verify Create (Helm Chart)
77125
{
78126
Config: config + compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies +
79-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, deployHelmArtifactRepresentation),
127+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, deployHelmChartArtifactRepresentation),
80128
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
81129
resource.TestCheckResourceAttrSet(resourceName, "id"),
82130
resource.TestCheckResourceAttr(resourceName, "argument_substitution_mode", "NONE"),
@@ -101,7 +149,7 @@ func TestDevopsDeployArtifactResource_helm(t *testing.T) {
101149
// verify Create with optionals
102150
{
103151
Config: config + compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies +
104-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Create, deployHelmArtifactRepresentation),
152+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Create, deployHelmChartArtifactRepresentation),
105153
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
106154
resource.TestCheckResourceAttr(resourceName, "argument_substitution_mode", "NONE"),
107155
resource.TestCheckResourceAttrSet(resourceName, "compartment_id"),
@@ -132,7 +180,7 @@ func TestDevopsDeployArtifactResource_helm(t *testing.T) {
132180
// verify updates to updatable parameters
133181
{
134182
Config: config + compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies +
135-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Update, deployHelmArtifactRepresentation),
183+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Update, deployHelmChartArtifactRepresentation),
136184
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
137185
resource.TestCheckResourceAttr(resourceName, "argument_substitution_mode", "SUBSTITUTE_PLACEHOLDERS"),
138186
resource.TestCheckResourceAttrSet(resourceName, "compartment_id"),
@@ -162,7 +210,7 @@ func TestDevopsDeployArtifactResource_helm(t *testing.T) {
162210
Config: config +
163211
acctest.GenerateDataSourceFromRepresentationMap("oci_devops_deploy_artifacts", "test_deploy_artifacts", acctest.Optional, acctest.Update, DevopsDevopsDeployArtifactDataSourceRepresentation) +
164212
compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies +
165-
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Update, deployHelmArtifactRepresentation),
213+
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Update, deployHelmChartArtifactRepresentation),
166214
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
167215
resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId),
168216
resource.TestCheckResourceAttrSet(datasourceName, "display_name"),

internal/integrationtest/devops_deploy_artifact_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ var (
5858
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}},
5959
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation},
6060
}
61-
base64_encode = "YXBpVmVyc2lvbjogYmF0Y2gvdjEKa2luZDogSm9iCm1ldGFkYXRhOgogIGdlbmVyYXRlTmFtZTogaGVsbG93b3JsZAogIGxhYmVsczoKICAgIGFwcDogaGVsbG93b3JsZApzcGVjOgogIHR0bFNlY29uZHNBZnRlckZpbmlzaGVkOiAxMjAKICB0ZW1wbGF0ZToKICAgIHNwZWM6CiAgICAgIGNvbnRhaW5lcnM6CiAgICAgICAgLSBuYW1lOiBoZWxsb3dvcmxkCiAgICAgICAgICBpbWFnZTogcGh4Lm9jaXIuaW8vYXgwMjJ3dmdtanBxL2hlbGxvd29ybGQtb2tlLXZlcmlmaWVyOmxhdGVzdAogICAgICAgICAgY29tbWFuZDoKICAgICAgICAgICAgLSAiL2Jpbi9iYXNoIgogICAgICAgICAgICAtICItYyIKICAgICAgICAgICAgLSAic2xlZXAgMjsgZWNobyBIZWxsbyBXb3JsZDsiCiAgICAgIHJlc3RhcnRQb2xpY3k6IE5ldmVy"
62-
base64_encode_update = "a2luZDogTmFtZXNwYWNlCmFwaVZlcnNpb246IHYxCm1ldGFkYXRhOgogIG5hbWU6IGhlbGxvd29ybGQtZGVtbwotLS0KYXBpVmVyc2lvbjogYXBwcy92MQpraW5kOiBEZXBsb3ltZW50Cm1ldGFkYXRhOgogIG5hbWU6IGhlbGxvd29ybGQtZGVwbG95bWVudAogIG5hbWVzcGFjZTogaGVsbG93b3JsZC1kZW1vCnNwZWM6CiAgc2VsZWN0b3I6CiAgICBtYXRjaExhYmVsczoKICAgICAgYXBwOiBoZWxsb3dvcmxkCiAgcmVwbGljYXM6IDMKICB0ZW1wbGF0ZToKICAgIG1ldGFkYXRhOgogICAgICBsYWJlbHM6CiAgICAgICAgYXBwOiBoZWxsb3dvcmxkCiAgICBzcGVjOgogICAgICBjb250YWluZXJzOgogICAgICAgIC0gbmFtZTogaGVsbG93b3JsZAogICAgICAgICAgIyBlbnRlciB0aGUgcGF0aCB0byB5b3VyIGltYWdlLCBiZSBzdXJlIHRvIGluY2x1ZGUgdGhlIGNvcnJlY3QgcmVnaW9uIHByZWZpeAogICAgICAgICAgaW1hZ2U6IGlhZC5vY2lyLmlvL2F4MDIyd3ZnbWpwcS9oZWxsb3dvcmxkOnYxCiAgICAgICAgICBwb3J0czoKICAgICAgICAgICAgLSBjb250YWluZXJQb3J0OiA4ODg4CiAgICAgICAgICAgICAgcHJvdG9jb2w6IFRDUAoKLS0tCmFwaVZlcnNpb246IHYxCmtpbmQ6IFNlcnZpY2UKbWV0YWRhdGE6CiAgbmFtZTogaGVsbG93b3JsZC1zZXJ2aWNlCiAgbmFtZXNwYWNlOiBoZWxsb3dvcmxkLWRlbW8KICBhbm5vdGF0aW9uczoKICAgIHNlcnZpY2UuYmV0YS5rdWJlcm5ldGVzLmlvL29jaS1sb2FkLWJhbGFuY2VyLXNoYXBlOiAiMTBNYnBzIgpzcGVjOgogIHR5cGU6IExvYWRCYWxhbmNlcgogIHBvcnRzOgogICAgLSBwb3J0OiA4MDgwCiAgICAgIHByb3RvY29sOiBUQ1AKICAgICAgdGFyZ2V0UG9ydDogODg4OAogIHNlbGVjdG9yOgogICAgYXBwOiBoZWxsb3dvcmxk"
61+
base64_encode = "YXBpVmVyc2lvbjogYmF0Y2gvdjEKa2luZDogSm9iCm1ldGFkYXRhOgogIGdlbmVyYXRlTmFtZTogaGVsbG93b3JsZAogIGxhYmVsczoKICAgIGFwcDogaGVsbG93b3JsZApzcGVjOgogIHR0bFNlY29uZHNBZnRlckZpbmlzaGVkOiAxMjAKICB0ZW1wbGF0ZToKICAgIHNwZWM6CiAgICAgIGNvbnRhaW5lcnM6CiAgICAgICAgLSBuYW1lOiBoZWxsb3dvcmxkCiAgICAgICAgICBpbWFnZTogcGh4Lm9jaXIuaW8vYXgwMjJ3dmdtanBxL2hlbGxvd29ybGQtb2tlLXZlcmlmaWVyOmxhdGVzdAogICAgICAgICAgY29tbWFuZDoKICAgICAgICAgICAgLSAiL2Jpbi9iYXNoIgogICAgICAgICAgICAtICItYyIKICAgICAgICAgICAgLSAic2xlZXAgMjsgZWNobyBIZWxsbyBXb3JsZDsiCiAgICAgIHJlc3RhcnRQb2xpY3k6IE5ldmVy"
62+
base64_encode_update = "a2luZDogTmFtZXNwYWNlCmFwaVZlcnNpb246IHYxCm1ldGFkYXRhOgogIG5hbWU6IGhlbGxvd29ybGQtZGVtbwotLS0KYXBpVmVyc2lvbjogYXBwcy92MQpraW5kOiBEZXBsb3ltZW50Cm1ldGFkYXRhOgogIG5hbWU6IGhlbGxvd29ybGQtZGVwbG95bWVudAogIG5hbWVzcGFjZTogaGVsbG93b3JsZC1kZW1vCnNwZWM6CiAgc2VsZWN0b3I6CiAgICBtYXRjaExhYmVsczoKICAgICAgYXBwOiBoZWxsb3dvcmxkCiAgcmVwbGljYXM6IDMKICB0ZW1wbGF0ZToKICAgIG1ldGFkYXRhOgogICAgICBsYWJlbHM6CiAgICAgICAgYXBwOiBoZWxsb3dvcmxkCiAgICBzcGVjOgogICAgICBjb250YWluZXJzOgogICAgICAgIC0gbmFtZTogaGVsbG93b3JsZAogICAgICAgICAgIyBlbnRlciB0aGUgcGF0aCB0byB5b3VyIGltYWdlLCBiZSBzdXJlIHRvIGluY2x1ZGUgdGhlIGNvcnJlY3QgcmVnaW9uIHByZWZpeAogICAgICAgICAgaW1hZ2U6IGlhZC5vY2lyLmlvL2F4MDIyd3ZnbWpwcS9oZWxsb3dvcmxkOnYxCiAgICAgICAgICBwb3J0czoKICAgICAgICAgICAgLSBjb250YWluZXJQb3J0OiA4ODg4CiAgICAgICAgICAgICAgcHJvdG9jb2w6IFRDUAoKLS0tCmFwaVZlcnNpb246IHYxCmtpbmQ6IFNlcnZpY2UKbWV0YWRhdGE6CiAgbmFtZTogaGVsbG93b3JsZC1zZXJ2aWNlCiAgbmFtZXNwYWNlOiBoZWxsb3dvcmxkLWRlbW8KICBhbm5vdGF0aW9uczoKICAgIHNlcnZpY2UuYmV0YS5rdWJlcm5ldGVzLmlvL29jaS1sb2FkLWJhbGFuY2VyLXNoYXBlOiAiMTBNYnBzIgpzcGVjOgogIHR5cGU6IExvYWRCYWxhbmNlcgogIHBvcnRzOgogICAgLSBwb3J0OiA4MDgwCiAgICAgIHByb3RvY29sOiBUQ1AKICAgICAgdGFyZ2V0UG9ydDogODg4OAogIHNlbGVjdG9yOgogICAgYXBwOiBoZWxsb3dvcmxk"
63+
6364
deployArtifactDeployArtifactSourceRepresentation = map[string]interface{}{
6465
"deploy_artifact_source_type": acctest.Representation{RepType: acctest.Required, Create: `INLINE`},
6566
"base64encoded_content": acctest.Representation{RepType: acctest.Required, Create: base64_encode, Update: base64_encode_update},
@@ -90,7 +91,7 @@ func TestDevopsDeployArtifactResource_basic(t *testing.T) {
9091
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Optional, acctest.Create, DevopsDeployArtifactRepresentation), "devops", "deployArtifact", t)
9192

9293
acctest.ResourceTest(t, testAccCheckDevopsDeployArtifactDestroy, []resource.TestStep{
93-
// delete before next Create
94+
// verify Create
9495
{
9596
Config: config + compartmentIdVariableStr + DevopsDeployArtifactResourceDependencies +
9697
acctest.GenerateResourceFromRepresentationMap("oci_devops_deploy_artifact", "test_deploy_artifact", acctest.Required, acctest.Create, DevopsDeployArtifactRepresentation),

0 commit comments

Comments
 (0)