Skip to content
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

Provide an example for the TF deployment. #6

Open
vaikas opened this issue Apr 10, 2023 · 0 comments
Open

Provide an example for the TF deployment. #6

vaikas opened this issue Apr 10, 2023 · 0 comments

Comments

@vaikas
Copy link
Member

vaikas commented Apr 10, 2023

I figured that I'd create my own version and saw the Terraform there, and thought it would just be a matter of terraform plan && terraform apply.

So, changed the project id:

diff --git a/iac/main.tf b/iac/main.tf
index a5e01b4..0b94654 100644
--- a/iac/main.tf
+++ b/iac/main.tf
@@ -8,13 +8,13 @@ terraform {
     }
   }
   backend "gcs" {
-    bucket = "artifacts.just-trust-me.appspot.com"
+    bucket = "artifacts.vaikas-chainguard.appspot.com"
     prefix = "/iac"
   }
 }

 locals {
-  project_id = "just-trust-me"
+  project_id = "vaikas-chainguard"
 }

But if you do terraform plan/apply, there's two issues, one:

  • Warning (during plan):
Plan: 4 to add, 0 to change, 0 to destroy.
╷
│ Warning: Deprecated Resource
│
│   with ko_image.image,
│   on main.tf line 33, in resource "ko_image" "image":
│   33: resource "ko_image" "image" {
│
│ Deprecated: use ko_build

And then when applying (not sure if because above, but ko does not build the image):

ko_image.image: Creating...
ko_image.image: Creation complete after 0s [id=id]
google_service_account.issuer: Creating...
google_service_account.issuer: Creation complete after 2s [id=projects/vaikas-chainguard/serviceAccounts/[email protected]]
google_cloud_run_service.issuer: Creating...
╷
│ Warning: Deprecated Resource
│
│   with ko_image.image,
│   on main.tf line 33, in resource "ko_image" "image":
│   33: resource "ko_image" "image" {
│
│ Deprecated: use ko_build
╵
╷
│ Error: Error creating Service: googleapi: Error 400: spec.template.spec.containers[0]: Missing required container spec
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.BadRequest",
│     "fieldViolations": [
│       {
│         "description": "Missing required container spec",
│         "field": "spec.template.spec.containers[0]"
│       }
│     ]
│   }
│ ]
│
│   with google_cloud_run_service.issuer,
│   on main.tf line 41, in resource "google_cloud_run_service" "issuer":
│   41: resource "google_cloud_run_service" "issuer" {
│
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant