From 84d416c0639f593c716d894ef90a236adba40c11 Mon Sep 17 00:00:00 2001 From: Jonny Browning Date: Tue, 29 Nov 2022 09:23:08 +0000 Subject: [PATCH 1/4] docs: update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 044b85b..0125232 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ | Name | Version | |------|---------| | [google](#requirement\_google) | >= 4.0.0 | -| [http](#requirement\_http) | >= 2.2.0 | +| [null](#requirement\_null) | >= 3.0.0 | ## Providers From 1d2be39894068072f84d5c9f3935eba363f572d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 29 Nov 2022 09:23:38 +0000 Subject: [PATCH 2/4] terraform-docs: automated action --- README.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0125232..b3a6798 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ +# Vertex AI Custom Code Service Agent + +This repo contains a Terraform module that enables the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + +This is done by running a simple custom training job (CustomJob), because the Service Agent is created the first time it is used. + +This module relies on the `curl` tool being available on the system running Terraform. + +This module is available in the [Datatonic Terraform Registry](https://registry.terraform.io/namespaces/teamdatatonic). + +## Development + +### Local setup + +- Install [pre-commit](https://pre-commit.com/) +- Install the pre-commit hooks - `pre-commit install` + +### README + +The README file is autogenerated using [`terraform-docs`](https://github.com/terraform-docs/terraform-docs). This is done when you create a pull request (or push to an existing PR). + +You can customise the template (including this text for example) in `.github/workflows/pr-checks.yml`. + ## Requirements | Name | Version | @@ -9,8 +32,8 @@ | Name | Version | |------|---------| -| [google](#provider\_google) | 4.44.1 | -| [null](#provider\_null) | 3.2.1 | +| [google](#provider\_google) | >= 4.0.0 | +| [null](#provider\_null) | >= 3.0.0 | ## Modules @@ -35,4 +58,4 @@ No modules. | Name | Description | |------|-------------| -| [email](#output\_email) | n/a | +| [email](#output\_email) | n/a | \ No newline at end of file From 55aeef2845fb1060454b79748ad27ac4c69afed2 Mon Sep 17 00:00:00 2001 From: Jonny Browning Date: Tue, 29 Nov 2022 10:04:47 +0000 Subject: [PATCH 3/4] ci: remove terratest --- .github/workflows/pr-checks.yml | 49 --------------------------------- 1 file changed, 49 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index e18c22b..d628b87 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -28,55 +28,6 @@ jobs: - uses: pre-commit/action@v3.0.0 name: Pre-commit checks - terratest: - runs-on: ubuntu-latest - steps: - - uses: hashicorp/setup-terraform@v2 - with: - terraform_wrapper: false - - - name: Check out repository - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} - - - name: Set up Go 1.18 - uses: actions/setup-go@v1 - with: - go-version: 1.18 - - - id: 'auth' - name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@v0' - with: - credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' - - - name: 'Set up Cloud SDK' - uses: 'google-github-actions/setup-gcloud@v0' - - - name: Copy pipeline.json to GCS - run: "gsutil cp test/pipeline.json gs://${{ secrets.TEST_BUCKET }}/terraform-google-scheduled-vertex-pipelines/${{ github.run_id }}/pipeline.json" - - - name: Copy pipeline.yaml to AR - run: > - curl -X POST - -H "Authorization: Bearer $(gcloud auth print-access-token)" - -F tags=latest - -F content=@test/pipeline.yaml - "https://europe-west2-kfp.pkg.dev/${{ secrets.TEST_PROJECT_ID }}/${{ secrets.TEST_AR_REPO }}" - - - name: Run Terratest - run: make test - env: - TF_VAR_project: ${{ secrets.TEST_PROJECT_ID }} - TF_VAR_gcs_bucket: ${{ secrets.TEST_BUCKET }} - TF_VAR_object_name: "terraform-google-scheduled-vertex-pipelines/${{ github.run_id }}/pipeline.json" - TF_VAR_ar_repository: ${{ secrets.TEST_AR_REPO }} - - - name: Delete pipeline.json from GCS after test - if: always() - run: "gsutil rm gs://${{ secrets.TEST_BUCKET }}/terraform-google-scheduled-vertex-pipelines/${{ github.run_id }}/pipeline.json" - generate-readme: runs-on: ubuntu-latest steps: From cc18a4d52218b91560a75eb9b948300cedbcb397 Mon Sep 17 00:00:00 2001 From: Jonny Browning Date: Tue, 29 Nov 2022 10:10:10 +0000 Subject: [PATCH 4/4] fix: add terraform lock file to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 7a3e2fd..36a476c 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,9 @@ override.tf.json *_override.tf *_override.tf.json +# Terraform lock file +.terraform.lock.hcl + # Include override files you do wish to add to version control using negated pattern # # !example_override.tf