File tree 7 files changed +51
-15
lines changed
7 files changed +51
-15
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ export GOOGLE_REGION={VALUE} # e.g: us-central1
30
30
unset TESSERA_BASE_NAME
31
31
```
32
32
33
- TODO: Add the Artifact Registry which is in the Cloud Build pull request. The expected repository is ` ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci ` .
34
-
35
33
Build and push the Docker image to Artifact Registry repository:
36
34
37
35
``` sh
@@ -45,4 +43,3 @@ docker push ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci/conforma
45
43
Terraforming the project can be done by:
46
44
1 . ` cd ` to the relevant directory (deployment/live/gcp/ci/) for the environment to deploy/change.
47
45
2 . Run ` terragrunt apply ` .
48
-
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ terraform {
4
4
5
5
locals {
6
6
env = " ci"
7
+ docker_env = local. env
7
8
base_name = " ${ local . env } -conformance"
8
9
server_docker_image = " us-central1-docker.pkg.dev/${ include . root . locals . project_id } /docker-${ local . env } /conformance-gcp:latest"
9
10
}
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ google = {
4
+ source = " registry.terraform.io/hashicorp/google"
5
+ version = " 6.1.0"
6
+ }
7
+ }
8
+ }
9
+
10
+ # Artifact Registry
11
+
12
+ resource "google_project_service" "artifact_registry_api" {
13
+ service = " artifactregistry.googleapis.com"
14
+ disable_on_destroy = false
15
+ }
16
+
17
+ resource "google_artifact_registry_repository" "docker" {
18
+ repository_id = " docker-${ var . docker_env } "
19
+ location = var. location
20
+ description = " Static CT docker images"
21
+ format = " DOCKER"
22
+ depends_on = [
23
+ google_project_service . artifact_registry_api ,
24
+ ]
25
+ }
Original file line number Diff line number Diff line change
1
+ variable "location" {
2
+ description = " Location in which to create resources"
3
+ type = string
4
+ }
5
+
6
+ variable "docker_env" {
7
+ description = " Unique identifier for the Docker env, e.g. dev or ci or prod"
8
+ type = string
9
+ }
Original file line number Diff line number Diff line change @@ -11,19 +11,11 @@ terraform {
11
11
12
12
# Artifact Registry
13
13
14
- resource "google_project_service" "artifact_registry_api" {
15
- service = " artifactregistry.googleapis.com"
16
- disable_on_destroy = false
17
- }
14
+ module "artifactregistry" {
15
+ source = " ../artifactregistry"
18
16
19
- resource "google_artifact_registry_repository" "docker" {
20
- repository_id = " docker-${ var . docker_env } "
21
- location = var. location
22
- description = " Static CT docker images"
23
- format = " DOCKER"
24
- depends_on = [
25
- google_project_service . artifact_registry_api ,
26
- ]
17
+ location = var. location
18
+ docker_env = var. docker_env
27
19
}
28
20
29
21
# Cloud Build
Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ terraform {
2
2
backend "gcs" {}
3
3
}
4
4
5
+ module "artifactregistry" {
6
+ source = " ../artifactregistry"
7
+
8
+ location = var. location
9
+ docker_env = var. docker_env
10
+ }
11
+
5
12
module "storage" {
6
13
source = " ../storage"
7
14
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ variable "env" {
18
18
type = string
19
19
}
20
20
21
+ variable "docker_env" {
22
+ description = " Unique identifier for the Docker env, e.g. dev or ci or prod"
23
+ type = string
24
+ }
25
+
21
26
variable "server_docker_image" {
22
27
description = " The full image URL (path & tag) for the Docker image to deploy in Cloud Run"
23
28
type = string
You can’t perform that action at this time.
0 commit comments