add tests and docs for using custom service account in dataflow flex template job#4260
add tests and docs for using custom service account in dataflow flex template job#4260rileykarson merged 7 commits intoGoogleCloudPlatform:masterfrom xingao267:dataflow
Conversation
|
I tested it locally. It seems the dataflow jobs is created successfully with the custom service account, but test failed with the following error: @rileykarson could you help take a look at this PR? |
rileykarson
left a comment
There was a problem hiding this comment.
I think the error comes from testAccDataflowJobGetGeneratedInstanceTemplate. I'd suggest running the test with TF_LOG=DEBUG set, and looking at the HTTP requests/responses.
Also, can you add the field to the documentation? https://github.com/GoogleCloudPlatform/magic-modules/blob/master/third_party/terraform/website/docs/r/dataflow_flex_template_job.html.markdown
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=159774" |
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=159774" |
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=159779" |
|
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSpannerInstance_basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccBigqueryDataTransferConfig|TestAccComposerEnvironment_withUpdateOnCreate|TestAccComputeTargetInstance_targetInstanceCustomNetworkExample|TestAccFilestoreInstance_filestoreInstanceBasicExample|TestAccFilestoreInstance_update|TestAccProjectIamCustomRole_basic|TestAccOSLoginSSHPublicKey_osLoginSshKeyExpiry|TestAccSpannerDatabase_basic|TestAccStorageBucket_cors You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=159828" |
Thanks! Fixed the test. For flex template job, I need to get the SA info directly from the VM but not VM template. |
third_party/terraform/resources/resource_dataflow_flex_template_job.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_dataflow_flex_template_job.go.erb
Outdated
Show resolved
Hide resolved
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=159894" |
|
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSpannerInstance_basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccBigqueryDataTransferConfig|TestAccComposerEnvironment_withUpdateOnCreate|TestAccContainerNodePool_nodeLocations|TestAccContainerNodePool_basic|TestAccContainerNodePool_maxPodsPerNode|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccContainerNodePool_withNodeConfig|TestAccContainerNodePool_withGPU|TestAccContainerNodePool_withLinuxNodeConfig|TestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withNodeConfigScopeAlias|TestAccContainerNodePool_withSandboxConfig|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccContainerNodePool_regionalAutoscaling|TestAccContainerNodePool_withManagement|TestAccContainerNodePool_autoscaling|TestAccContainerNodePool_regionalClusters|TestAccContainerNodePool_shieldedInstanceConfig|TestAccContainerNodePool_resize|TestAccContainerNodePool_012_ConfigModeAttr|TestAccContainerNodePool_EmptyGuestAccelerator|TestAccFilestoreInstance_filestoreInstanceBasicExample|TestAccFilestoreInstance_update|TestAccOSLoginSSHPublicKey_osLoginSshKeyExpiry You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=159896" |
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=160866" |
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=160868" |
rileykarson
left a comment
There was a problem hiding this comment.
Looking at the "all commits" view, it appears that the actual resource changes got reverted at some point?
|
@rileykarson according to hashicorp/terraform-provider-google#7658 (comment), it turned out we can specify custom SA in the parameters block. So I reverted the actual resource changes and made this PR just adding tests and docs for how to use custom SA. |
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=160870" |
|
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceComposerEnvironment_basic|TestAccDataSourceSpannerInstance_basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccBigqueryDataTransferConfig|TestAccComposerEnvironment_withUpdateOnCreate|TestAccFilestoreInstance_filestoreInstanceBasicExample|TestAccFilestoreInstance_update|TestAccOSLoginSSHPublicKey_osLoginSshKeyExpiry You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=160872" |
1 similar comment
|
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceComposerEnvironment_basic|TestAccDataSourceSpannerInstance_basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccBigqueryDataTransferConfig|TestAccComposerEnvironment_withUpdateOnCreate|TestAccFilestoreInstance_filestoreInstanceBasicExample|TestAccFilestoreInstance_update|TestAccOSLoginSSHPublicKey_osLoginSshKeyExpiry You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=160872" |
rileykarson
left a comment
There was a problem hiding this comment.
LGTM- just running through the test pipeline before merging.
/gcbrun
|
Well, that didn't appear to have taken. I'll try again! /gcbrun |
|
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=161491" |
|
@rileykarson I can't see the builds, do you know why it is failing? |
|
Just a timeout! The VCR test run I triggered should supersede it. It doesn't look like the second phase kicked off- I'll do that manually on Monday. |
|
@rileykarson any updates on this? |
|
Sorry! Heavy load of interrupts on my part this last week kept me distracted. Started a run now. For my own benefit, that's https://ci-oss.hashicorp.engineering/buildConfiguration/GoogleCloudBeta_ProviderGoogleCloudBetaMmUpstream/162586?buildTab=overview |
|
@rileykarson it looks like the documentation change included in this PR did not get released to https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataflow_flex_template_job. Did I miss anything? |
rileykarson
left a comment
There was a problem hiding this comment.
That's expected! We had a fairly substantial gap between releases (hashicorp/terraform-provider-google#7998)
It should be available today.
|
@rileykarson got it, thanks for explaining! |
fixes hashicorp/terraform-provider-google#7658
If this PR is for Terraform, I acknowledge that I have:
make testandmake lintto ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)