GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: Initial Terraform configurations (Work in Progress) by burkedavison · Pull Request #8436 · googleapis/google-cloud-java

Conversation

@burkedavison

@burkedavison burkedavison commented Sep 21, 2022

Copy link
Copy Markdown
Member

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 and gcloud must be installed. Developed on MacOS. Not yet tested on Linux.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
burkedavison added 2 commits September 21, 2022 14:58
@burkedavison
ci: Initial Terraform configurations (Work in Progress)
1d3f47c
@burkedavison
ci: Add Terraform scripts and configurations for java-accessapproval,…
fb6b240
… java-bigqueryconnection, and java-container
@burkedavison
burkedavison marked this pull request as draft September 21, 2022 19:09
burkedavison added 2 commits September 21, 2022 15:15
@burkedavison
fix: Remove hardcoded project prefix, and replace with environment va…
fe40718
…riable.
@burkedavison
fix: Ensure 'set-quota-project' is set to the created GCP project. De…
65ff848
…spite generating an error, it works and is necessary.
suztomo
suztomo reviewed Sep 21, 2022
View reviewed changes
Comment thread java-container/.terraform/main.tf Resolved

Uh oh!

There was an error while loading. Please reload this page.

@meltsufin

meltsufin commented Sep 21, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@burkedavison

burkedavison commented Sep 21, 2022 via email

Copy link
Copy Markdown
Member Author
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: ***@***.***>
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

suztomo
suztomo reviewed Sep 22, 2022
View reviewed changes
Comment thread .terraform/test.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

burkedavison added 20 commits September 22, 2022 13:20
@burkedavison
fix: Workaround set-quota-project not working when previous quota pro…
6f89ea6
…ject has been deleted. Remove unused required provider.
@burkedavison
chore: Add 'auto_create_subnetworks' to container network configuration.
dad488e
@burkedavison
fix: Add predestroy stage. Remove container network from tfstate to a…
3959735
…void destroy failure.
@burkedavison
chore: Refactor script to split project and module provisioning. Supp…
3fbf756
…ort persistent and single-use project use cases. See ./.terraform/README.md
@burkedavison
chore: Add java-compute terraform config
061b666
@burkedavison
chore: Add java-containeranalysis terraform config
9eaac54
@burkedavison
chore: Add java-datacatalog terraform config
1ddad88
@burkedavison
chore: Add java-datalabeling terraform config
638566e
@burkedavison
chore: Add java-errorreporting terraform config
45dfae5
@burkedavison
chore: Add java-game-servers terraform config
1aee4e1
@burkedavison
chore: Add java-iot terraform config
57a1ef3
@burkedavison
chore: Add java-kms terraform config
52b4884
@burkedavison
chore: Add java-monitoring terraform config
fdf8198
@burkedavison
chore: Add java-resourcemanager terraform config
4c93bcb
@burkedavison
chore: Add java-secretmanager terraform config
d8d5727
@burkedavison
chore: Add java-speech terraform config
cbe9b98
@burkedavison
chore: Add java-trace terraform config
cf3c219
@burkedavison
chore: Add java-translate terraform config
f7543ae
@burkedavison
chore: Add java-video-intelligence terraform config
d5b11ca
@burkedavison
chore: Add java-vision terraform config
57aebd8
suztomo
suztomo reviewed Sep 22, 2022
View reviewed changes
Comment thread java-container/.terraform/main.tf
@@ -0,0 +1,43 @@
terraform {
required_providers {
google = {

@suztomo suztomo Sep 22, 2022

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@burkedavison burkedavison Sep 23, 2022

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .terraform/test.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .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

@suztomo suztomo Sep 22, 2022

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

burkedavison reacted with hooray emoji
All reactions
  • 🎉 1 reaction

@burkedavison burkedavison Sep 23, 2022

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 6, 2022
burkedavison added 4 commits October 7, 2022 08:28
@burkedavison
fix: Don't prepend "serviceAccount:" when using member "allAuthentica…
0c917af
…tedUsers"
@burkedavison
Merge branch 'main' into terraform
f479750
@burkedavison
chore: Change module delimiter from ':' to ',' for consistency with .…
f8277b8
…kokoro scripts.
@burkedavison
Merge branch 'main' into terraform
843c440
suztomo
suztomo reviewed Oct 7, 2022
View reviewed changes
Comment thread .terraform/helpers/generated-main.template.tf
@@ -0,0 +1,48 @@
# Auto-generated by generate-config.sh

@suztomo suztomo Oct 7, 2022

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@burkedavison burkedavison Oct 7, 2022

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
burkedavison added 6 commits October 7, 2022 14:46
@burkedavison
chore: Split 'gcloud' steps from 'terraform' steps in preparation for…
0fef18c
… Kokoro invocations which will already have a GCP project and service account available.
@burkedavison
fix: Return to previous working directory after plan.sh
483dea6
@burkedavison
chore: Use set -eo pipefail rather than explicit "|| exit"
c5264f9
@burkedavison
Merge branch 'main' into terraform
42b099b
@burkedavison
chore: Remove 'test-individually.sh'
70527ff
@burkedavison
fix: Ignore 'java-recommender' IT rather than modifying logic.
bc34548
@burkedavison burkedavison added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 11, 2022
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 11, 2022
burkedavison and others added 4 commits October 14, 2022 09:22
@burkedavison
Merge branch 'main' into terraform
56abe0c
# Conflicts:
#	.gitignore
@release-please @ddixit14
chore: release main (#8610)
0db282c
* chore: release main

* chore: manual fix

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: ddixit14 <[email protected]>
@chingor13
build: have release-please tag releases (#8615)
6420712
@burkedavison
Merge branch 'main' into terraform
023793d
@meltsufin
meltsufin force-pushed the main branch from 6420712 to 3f48450 Compare October 17, 2022 14:50
burkedavison added 5 commits October 19, 2022 10:51
@burkedavison
Merge branch 'main' into terraform
ddae556
# 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
@burkedavison
fix: Revert ITHeadersTest changes to same as main
3f9b482
@burkedavison
fix: Remove unused import
5ac7c07
@burkedavison
fix: Apply mvn com.coveo:fmt-maven-plugin:format
a6dfc72
@burkedavison
ci: Terraform now used in Kokoro integration tests
09abe52
@burkedavison burkedavison added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 24, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 24, 2022
@burkedavison
ci: Temporarily disable Terraform in integration tests
23c4a91
@burkedavison burkedavison closed this Oct 25, 2022
@burkedavison

burkedavison commented Oct 25, 2022

Copy link
Copy Markdown
Member Author

See #8555 for continuation of this effort.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@burkedavison
burkedavison deleted the terraform branch October 26, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@suztomo suztomo suztomo left review comments
@meltsufin meltsufin Awaiting requested review from meltsufin
+1 more reviewer
@xtineskim xtineskim xtineskim left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@burkedavison @meltsufin @suztomo @xtineskim @yoshi-kokoro @chingor13
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.