Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Patching Workflows #4733

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
71c3aeb
Merge pull request #1 from GoogleCloudPlatform/master
upodroid Aug 3, 2020
e1a9488
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Aug 10, 2020
51eaff6
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Aug 25, 2020
649e97c
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Sep 21, 2020
ee373cc
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Oct 3, 2020
d330773
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Oct 27, 2020
0d73e9f
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Nov 17, 2020
191a775
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Dec 15, 2020
b90d594
mark field as updatable
upodroid Jan 5, 2021
4b79149
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Jan 20, 2021
a3e1989
Merge branch 'master' of github.com:borg-land/magic-modules
upodroid Jan 26, 2021
9ffeb0b
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Jan 26, 2021
9dd54f3
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Feb 1, 2021
b917f22
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Feb 15, 2021
7b836a0
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Mar 22, 2021
aaeee0b
Merge branch 'master' of github.com:GoogleCloudPlatform/magic-modules
upodroid Apr 13, 2021
f37e367
workflows are patchable now
upodroid Apr 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions mmv1/products/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,13 @@ objects:
A set of key/value label pairs to assign to this Workflow.
- !ruby/object:Api::Type::String
name: 'serviceAccount'
input: true
description: |
Name of the service account associated with the latest workflow version. This service
account represents the identity of the workflow and determines what permissions the workflow has.

Format: projects/{project}/serviceAccounts/{account}.
- !ruby/object:Api::Type::String
name: 'sourceContents'
input: true
description: |
Workflow code to be executed. The size limit is 32KB.
- !ruby/object:Api::Type::String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func TestAccWorkflowsWorkflow_basic(t *testing.T) {
func TestAccWorkflowsWorkflow_Update(t *testing.T) {
// Custom test written to test diffs
t.Parallel()

bucketName := fmt.Sprintf("tf-test-acc-bucket-%d", randInt(t))
workflowName := fmt.Sprintf("tf-test-acc-workflow-%d", randInt(t))

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckWorkflowsWorkflowDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccWorkflowsWorkflow_basic(bucketName),
Config: testAccWorkflowsWorkflow_Update(workflowName),
},
{
Config: testAccWorkflowsWorkflow_newBucket(bucketName),
Config: testAccWorkflowsWorkflow_Updated(workflowName),
},
},
})
}

func testAccWorkflowsWorkflow_basic(name string) string {
func testAccWorkflowsWorkflow_Update(name string) string {
return fmt.Sprintf(`
resource "google_workflows_workflow" "example" {
name = "%s"
Expand Down Expand Up @@ -66,12 +66,8 @@ EOF
`, name)
}

func testAccWorkflowsWorkflow_newBucket(name string) string {
func testAccWorkflowsWorkflow_Updated(name string) string {
return fmt.Sprintf(`
resource "google_storage_bucket" "bucket" {
name = "%s"
}

resource "google_workflows_workflow" "example" {
name = "%s"
region = "us-central1"
Expand All @@ -95,7 +91,7 @@ resource "google_workflows_workflow" "example" {
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
url: https:/fi.wikipedia.org/w/api.php
query:
action: opensearch
search: $${CurrentDateTime.body.dayOfTheWeek}
Expand All @@ -104,7 +100,7 @@ resource "google_workflows_workflow" "example" {
return: $${WikiResult.body[1]}
EOF
}
`, name, name)
`, name)
}

func TestWorkflowsWorkflowStateUpgradeV0(t *testing.T) {
Expand Down