Skip to content

Commit

Permalink
needed to create the artifact registry
Browse files Browse the repository at this point in the history
  • Loading branch information
GondekNP committed Dec 31, 2023
1 parent d7ca3a7 commit 124e759
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cloud_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:

- name: Build and Deploy
run: |
gcloud builds submit --tag gcr.io/113009620257/burn-backend
gcloud beta run deploy burn-backend --image gcr.io/113009620257/burn-backend --platform managed
gcloud builds submit --tag us-central1-docker.pkg.dev/dse-nps/burn-severity-mapping-poc/burn-backend
gcloud beta run deploy burn-backend --image us-central1-docker.pkg.dev/dse-nps/burn-severity-mapping-poc/burn-backend --platform managed
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,11 @@ resource "google_service_account_iam_binding" "workload_identity_user" {
members = [
"principalSet://iam.googleapis.com/projects/${data.google_project.project.number}/locations/global/workloadIdentityPools/${google_iam_workload_identity_pool.pool.workload_identity_pool_id}/attribute.repository/SchmidtDSE/burn-severity-mapping-poc"
]
}

# Create an Artifact Registry repo for the container image
resource "google_artifact_registry_repository" "burn-backend" {
repository_id = "burn-backend"
format = "DOCKER"
location = "us-central1"
}
36 changes: 35 additions & 1 deletion terraform.tfstate
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.6.0",
"serial": 69,
"serial": 71,
"lineage": "44075ebe-b91a-1e72-3b17-affdfb63c0f1",
"outputs": {},
"resources": [
Expand Down Expand Up @@ -85,6 +85,40 @@
}
]
},
{
"mode": "managed",
"type": "google_artifact_registry_repository",
"name": "burn-backend",
"provider": "provider[\"registry.opentofu.org/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"create_time": "2023-12-31T03:14:03.513874Z",
"description": "",
"docker_config": [],
"effective_labels": {},
"format": "DOCKER",
"id": "projects/dse-nps/locations/us-central1/repositories/burn-backend",
"kms_key_name": "",
"labels": null,
"location": "us-central1",
"maven_config": [],
"mode": "STANDARD_REPOSITORY",
"name": "burn-backend",
"project": "dse-nps",
"remote_repository_config": [],
"repository_id": "burn-backend",
"terraform_labels": {},
"timeouts": null,
"update_time": "2023-12-31T03:14:03.513874Z",
"virtual_repository_config": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19"
}
]
},
{
"mode": "managed",
"type": "google_cloud_run_service",
Expand Down
10 changes: 5 additions & 5 deletions terraform.tfstate.backup
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.6.0",
"serial": 67,
"serial": 69,
"lineage": "44075ebe-b91a-1e72-3b17-affdfb63c0f1",
"outputs": {},
"resources": [
Expand Down Expand Up @@ -347,7 +347,7 @@
"schema_version": 0,
"attributes": {
"condition": [],
"etag": "BwYNxR9UGJw=",
"etag": "BwYNxTEeIYM=",
"id": "dse-nps/roles/cloudbuild.builds.builder/serviceAccount:[email protected]",
"member": "serviceAccount:[email protected]",
"project": "dse-nps",
Expand All @@ -371,7 +371,7 @@
"schema_version": 0,
"attributes": {
"condition": [],
"etag": "BwYNxR9UGJw=",
"etag": "BwYNxTEeIYM=",
"id": "dse-nps/roles/run.admin/serviceAccount:[email protected]",
"member": "serviceAccount:[email protected]",
"project": "dse-nps",
Expand Down Expand Up @@ -421,10 +421,10 @@
"schema_version": 0,
"attributes": {
"condition": [],
"etag": "BwYNxENC/ts=",
"etag": "BwYNxVI1KPI=",
"id": "projects/dse-nps/serviceAccounts/[email protected]/roles/iam.workloadIdentityUser",
"members": [
"principalSet://iam.googleapis.com/projects/113009620257/locations/global/workloadIdentityPools/github/attribute.repository/burn-severity-mapping-poc"
"principalSet://iam.googleapis.com/projects/113009620257/locations/global/workloadIdentityPools/github/attribute.repository/SchmidtDSE/burn-severity-mapping-poc"
],
"role": "roles/iam.workloadIdentityUser",
"service_account_id": "projects/dse-nps/serviceAccounts/[email protected]"
Expand Down

0 comments on commit 124e759

Please sign in to comment.