magic-modules
magic-modules copied to clipboard
Support serviceAccount field for AppEngine flex
Fixes https://github.com/hashicorp/terraform-provider-google/issues/11813
If this PR is for Terraform, I acknowledge that I have:
- [x] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
- [x] Generated Terraform, and ran
make test
andmake lint
to ensure it passes unit and linter tests. - [x] Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
- [ ] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
- [x] Read the Release Notes Guide before writing my release note below.
Release Note Template for Downstream PRs (will be copied)
appengine: Added field `serviceAccount` to `app_engine_flexible_app_version`
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Hello! I am a robot who works on Magic Modules PRs.
I've detected that you're a community contributor. @melinath, a repository maintainer, has been assigned to assist you and help review your changes.
:question: First time contributing? Click here for more details
Your assigned reviewer will help review your code by:
- Ensuring it's backwards compatible, covers common error cases, etc.
- Summarizing the change into a user-facing changelog note.
- Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.
You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.
If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 2 files changed, 34 insertions(+)) Terraform Beta: Diff ( 2 files changed, 34 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2125
Passed tests 1889
Skipped tests: 227
Failed tests: 9
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccAccessApprovalSettings|TestAccComputeInstance_networkPerformanceConfig|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccCloudFunctions2Function_fullUpdate
Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
TestAccAccessApprovalSettings
[view]
Tests failed during RECORDING mode:
TestAccComputeInstance_networkPerformanceConfig
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
Thanks for your contribution! Please complete the third checkbox by adding this field to an example or (if that's not possible) to a handwritten test in the third_party folder
Added field to existing example
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 46 insertions(+)) Terraform Beta: Diff ( 3 files changed, 46 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2128
Passed tests 1891
Skipped tests: 227
Failed tests: 10
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccComputeInstance_networkPerformanceConfig|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample|TestAccSqlUser_mysqlDisabled
Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
TestAccSqlUser_mysqlDisabled
[view]
Tests failed during RECORDING mode:
TestAccComputeInstance_networkPerformanceConfig
[view]
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
@melinath i added an example, but unable to view failed test cases and logs. It says I don't have access to Google cloud bucket.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 46 insertions(+)) Terraform Beta: Diff ( 3 files changed, 46 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2128
Passed tests 1892
Skipped tests: 227
Failed tests: 9
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_networkPerformanceConfig|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudFunctions2Function_fullUpdate|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
Tests passed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
Tests failed during RECORDING mode:
TestAccComputeInstance_networkPerformanceConfig
[view]
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
I think this feature could be easily added the google_app_engine_standard_app_version
resource
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 37 insertions(+)) Terraform Beta: Diff ( 3 files changed, 37 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2128
Passed tests 1892
Skipped tests: 227
Failed tests: 9
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccComputeInstance_networkPerformanceConfig|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
Tests passed during RECORDING mode:
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
Tests failed during RECORDING mode:
TestAccComputeInstance_networkPerformanceConfig
[view]
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
It looks like still the same failure - I'm out until next Tuesday but I can take a deeper look next week unless you figure it out in the meantime.
Looking at this again - it looks like the error message did change slightly, actually - I think this is a configuration issue in our CI/CD environment. I'll take a look tomorrow.
okay, I see what's happening here: because this test creates a new project, the cloudservices default service account for that project doesn't have permissions on the service account running the tests overall.
Sorry for getting this wrong previously. I recommend the following:
Go back to creating a new service account in this test (like in 2adaef1) but with a few changes:
- set a custom account name like
my-account
that has a hyphen- using the
vars
map (nottest_env_vars
)- make sure you set the project field so that the service account is created inside the project for this test (so that the cloudservices service account will have correct access to it by default)
I think that should do it!
Thanks, I will update PR by EOD today.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 48 insertions(+)) Terraform Beta: Diff ( 3 files changed, 48 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2140
Passed tests 1898
Skipped tests: 228
Failed tests: 14
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_networkPerformanceConfig|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlUser_mysqlDisabled|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig
Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccCGCSnippet_eventarcWorkflowsExample
[view]
TestAccSqlUser_mysqlDisabled
[view]
Tests failed during RECORDING mode:
TestAccComputeInstance_networkPerformanceConfig
[view]
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig
[view]
Please fix these to complete your PR View the build log or the debug log for each test
okay, I see what's happening here: because this test creates a new project, the cloudservices default service account for that project doesn't have permissions on the service account running the tests overall.
Sorry for getting this wrong previously. I recommend the following:
Go back to creating a new service account in this test (like in 2adaef1) but with a few changes:
- set a custom account name like
my-account
that has a hyphen- using the
vars
map (nottest_env_vars
)- make sure you set the project field so that the service account is created inside the project for this test (so that the cloudservices service account will have correct access to it by default)
I think that should do it!
@melinath i fixed the PR as suggested, but the test is still failing.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 48 insertions(+)) Terraform Beta: Diff ( 3 files changed, 48 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2144
Passed tests 1904
Skipped tests: 228
Failed tests: 12
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeInstance_networkPerformanceConfig|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudFunctions2Function_fullUpdate|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_SqlServerAuditConfig
[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
[view]
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccComputeInstance_networkPerformanceConfig
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
Please fix these to complete your PR View the build log or the debug log for each test
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.
Diff report:
Terraform GA: Diff ( 3 files changed, 48 insertions(+)) Terraform Beta: Diff ( 3 files changed, 48 insertions(+)) TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
Tests analytics
Total tests: 2144
Passed tests 1902
Skipped tests: 230
Failed tests: 12
Action taken
Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample|TestAccSqlUser_mysqlDisabled|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
Tests passed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample
[view]
TestAccCloudFunctions2Function_fullUpdate
[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample
[view]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample
[view]
TestAccSqlUser_mysqlDisabled
[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample
[view]
Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities
[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing
[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample
[view]
TestAccAppEngineFlexibleAppVersion_appEngineFlexibleAppVersionExample
[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig
[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
[view]
Please fix these to complete your PR View the build log or the debug log for each test