-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ci: Initial Terraform configurations (Work in Progress) #8436
Conversation
… java-bigqueryconnection, and java-container
…spite generating an error, it works and is necessary.
Have you looked into how we will run it as part of CI/Kokoro? I guess we'll need to configure Kokoro service account to have permissions on the projects directory. |
Kokoro is part of the discussion, but not the current focus until we can
iron out some of the issues currently being faced.
There are some issues with this create+destroy project workflow that I need
to resolve; and we haven't made a clear decision yet on whether we want to
continue down this path. If we choose to continue having Terraform
create+destroy projects, then yes - we'd need to give Kokoro's service
account project creation+deletion permissions and define a specific folder
for it to use.
However, we could also choose to have a single project in which dedicated
instances of resources (like database instances, network instances, etc)
get created for each test; but this also has issues that would need to be
resolved. (For example, we can't delete container networks due to GCE
Enforcer firewall rule dependencies, so would that mean our
`java-container` ITs litter the project with old networks, or would
`java-container` be set up to use only a single network -- or would we have
a set of networks that could be allocated+released to allow only a single
owner at a time...)
…On Wed, Sep 21, 2022 at 4:23 PM Mike Eltsufin ***@***.***> wrote:
Have you looked into how we will run it as part of CI/Kokoro? I guess
we'll need to configure Kokoro service account to have permissions on the
products directory.
—
Reply to this email directly, view it on GitHub
<#8436 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJV4PTUCYDEJ7DEWL2HBIUDV7NVCLANCNFSM6AAAAAAQSLS2XE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…ject has been deleted. Remove unused required provider.
…void destroy failure.
…ort persistent and single-use project use cases. See ./.terraform/README.md
@@ -0,0 +1,43 @@ | |||
terraform { | |||
required_providers { | |||
google = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel these first declaration redundant. The three main.tf has the almost same section. Is there a way to eliminate the redundancy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Investigating
.terraform/modules-under-test.txt
Outdated
@@ -0,0 +1,20 @@ | |||
# Modules to be tested when no specific module is given to test.sh as an argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file can be replaced by a command to find directories that contain Terraform configuration. With that we can eliminate a possibility of having discrepancy (Terraform files are added to modules but forget updating this file). What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. TODO
@@ -0,0 +1,48 @@ | |||
# Auto-generated by generate-config.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we don't add generated files. Would this PR becomes much smaller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three 'template' files aren't actually generated -- they're used to copy and then append to the "actual" generated files which are not in git.
… Kokoro invocations which will already have a GCP project and service account available.
# Conflicts: # .gitignore
* chore: release main * chore: manual fix Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: ddixit14 <deepankardixit@google.com>
# Conflicts: # .release-please-manifest.json # gapic-libraries-bom/CHANGELOG.md # gapic-libraries-bom/pom.xml # google-cloud-jar-parent/CHANGELOG.md # google-cloud-pom-parent/CHANGELOG.md # java-accessapproval/CHANGELOG.md # java-accesscontextmanager/CHANGELOG.md # java-aiplatform/CHANGELOG.md # java-analytics-admin/CHANGELOG.md # java-analytics-data/CHANGELOG.md # java-analyticshub/CHANGELOG.md # java-api-gateway/CHANGELOG.md # java-apigee-connect/CHANGELOG.md # java-apigee-registry/CHANGELOG.md # java-apikeys/CHANGELOG.md # java-appengine-admin/CHANGELOG.md # java-area120-tables/CHANGELOG.md # java-artifact-registry/CHANGELOG.md # java-asset/CHANGELOG.md # java-assured-workloads/CHANGELOG.md # java-automl/CHANGELOG.md # java-bare-metal-solution/CHANGELOG.md # java-batch/CHANGELOG.md # java-beyondcorp-appconnections/CHANGELOG.md # java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections-bom/pom.xml # java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections/pom.xml # java-beyondcorp-appconnections/grpc-google-cloud-beyondcorp-appconnections-v1/pom.xml # java-beyondcorp-appconnections/pom.xml # java-beyondcorp-appconnections/proto-google-cloud-beyondcorp-appconnections-v1/pom.xml # java-beyondcorp-appconnections/versions.txt # java-beyondcorp-appconnectors/CHANGELOG.md # java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors-bom/pom.xml # java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors/pom.xml # java-beyondcorp-appconnectors/grpc-google-cloud-beyondcorp-appconnectors-v1/pom.xml # java-beyondcorp-appconnectors/pom.xml # java-beyondcorp-appconnectors/proto-google-cloud-beyondcorp-appconnectors-v1/pom.xml # java-beyondcorp-appconnectors/versions.txt # java-beyondcorp-appgateways/CHANGELOG.md # java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways-bom/pom.xml # java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways/pom.xml # java-beyondcorp-appgateways/grpc-google-cloud-beyondcorp-appgateways-v1/pom.xml # java-beyondcorp-appgateways/pom.xml # java-beyondcorp-appgateways/proto-google-cloud-beyondcorp-appgateways-v1/pom.xml # java-beyondcorp-appgateways/versions.txt # java-beyondcorp-clientconnectorservices/CHANGELOG.md # java-beyondcorp-clientgateways/CHANGELOG.md # java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways-bom/pom.xml # java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways/pom.xml # java-beyondcorp-clientgateways/grpc-google-cloud-beyondcorp-clientgateways-v1/pom.xml # java-beyondcorp-clientgateways/pom.xml # java-beyondcorp-clientgateways/proto-google-cloud-beyondcorp-clientgateways-v1/pom.xml # java-beyondcorp-clientgateways/versions.txt # java-bigquery-data-exchange/CHANGELOG.md # java-bigqueryconnection/CHANGELOG.md # java-bigquerydatapolicy/CHANGELOG.md # java-bigquerydatatransfer/CHANGELOG.md # java-bigquerymigration/CHANGELOG.md # java-bigqueryreservation/CHANGELOG.md # java-billing/CHANGELOG.md # java-billingbudgets/CHANGELOG.md # java-binary-authorization/CHANGELOG.md # java-certificate-manager/CHANGELOG.md # java-channel/CHANGELOG.md # java-cloudbuild/CHANGELOG.md # java-cloudcommerceconsumerprocurement/CHANGELOG.md # java-compute/CHANGELOG.md # java-contact-center-insights/CHANGELOG.md # java-container/CHANGELOG.md # java-containeranalysis/CHANGELOG.md # java-data-fusion/CHANGELOG.md # java-datacatalog/CHANGELOG.md # java-dataflow/CHANGELOG.md # java-dataform/CHANGELOG.md # java-datalabeling/CHANGELOG.md # java-dataplex/CHANGELOG.md # java-dataproc-metastore/CHANGELOG.md # java-dataproc/CHANGELOG.md # java-datastream/CHANGELOG.md # java-debugger-client/CHANGELOG.md # java-deploy/CHANGELOG.md # java-dialogflow-cx/CHANGELOG.md # java-dialogflow/CHANGELOG.md # java-distributedcloudedge/CHANGELOG.md # java-dlp/CHANGELOG.md # java-dms/CHANGELOG.md # java-dns/CHANGELOG.md # java-document-ai/CHANGELOG.md # java-domains/CHANGELOG.md # java-errorreporting/CHANGELOG.md # java-essential-contacts/CHANGELOG.md # java-eventarc-publishing/CHANGELOG.md # java-eventarc/CHANGELOG.md # java-filestore/CHANGELOG.md # java-functions/CHANGELOG.md # java-game-servers/CHANGELOG.md # java-gke-backup/CHANGELOG.md # java-gke-connect-gateway/CHANGELOG.md # java-gke-multi-cloud/CHANGELOG.md # java-gkehub/CHANGELOG.md # java-grafeas/CHANGELOG.md # java-gsuite-addons/CHANGELOG.md # java-iam-admin/CHANGELOG.md # java-iamcredentials/CHANGELOG.md # java-ids/CHANGELOG.md # java-iot/CHANGELOG.md # java-kms/CHANGELOG.md # java-language/CHANGELOG.md # java-life-sciences/CHANGELOG.md # java-managed-identities/CHANGELOG.md # java-mediatranslation/CHANGELOG.md # java-memcache/CHANGELOG.md # java-monitoring-dashboards/CHANGELOG.md # java-monitoring/CHANGELOG.md # java-network-management/CHANGELOG.md # java-network-security/CHANGELOG.md # java-networkconnectivity/CHANGELOG.md # java-notebooks/CHANGELOG.md # java-optimization/CHANGELOG.md # java-orchestration-airflow/CHANGELOG.md # java-orgpolicy/CHANGELOG.md # java-os-config/CHANGELOG.md # java-os-login/CHANGELOG.md # java-phishingprotection/CHANGELOG.md # java-policy-troubleshooter/CHANGELOG.md # java-private-catalog/CHANGELOG.md # java-profiler/CHANGELOG.md # java-publicca/CHANGELOG.md # java-recaptchaenterprise/CHANGELOG.md # java-recommendations-ai/CHANGELOG.md # java-recommender/CHANGELOG.md # java-redis/CHANGELOG.md # java-resource-settings/CHANGELOG.md # java-resourcemanager/CHANGELOG.md # java-retail/CHANGELOG.md # java-run/CHANGELOG.md # java-scheduler/CHANGELOG.md # java-secretmanager/CHANGELOG.md # java-security-private-ca/CHANGELOG.md # java-securitycenter-settings/CHANGELOG.md # java-securitycenter/CHANGELOG.md # java-service-control/CHANGELOG.md # java-service-management/CHANGELOG.md # java-service-usage/CHANGELOG.md # java-servicedirectory/CHANGELOG.md # java-shell/CHANGELOG.md # java-speech/CHANGELOG.md # java-storage-transfer/CHANGELOG.md # java-talent/CHANGELOG.md # java-tasks/CHANGELOG.md # java-texttospeech/CHANGELOG.md # java-tpu/CHANGELOG.md # java-trace/CHANGELOG.md # java-translate/CHANGELOG.md # java-video-intelligence/CHANGELOG.md # java-video-live-stream/CHANGELOG.md # java-video-stitcher/CHANGELOG.md # java-video-transcoder/CHANGELOG.md # java-vision/CHANGELOG.md # java-vmmigration/CHANGELOG.md # java-vpcaccess/CHANGELOG.md # java-webrisk/CHANGELOG.md # java-websecurityscanner/CHANGELOG.md # java-workflow-executions/CHANGELOG.md # java-workflows/CHANGELOG.md # release-please-config.json
See #8555 for continuation of this effort. |
See
./.terraform/test.sh
for instructions.These terraform configurations are (currently) designed to create and destroy a new GCP project for each module being tested. To run the script, you must identify a GCP Folder ID in which the project(s) will be created, and a GCP Billing Account ID to assign to the created project(s).
This is a work in progress. We have not decided we want to do this, but it does offer full isolation between integration tests.
terraform
andgcloud
must be installed. Developed on MacOS. Not yet tested on Linux.