Alirezabg / Devops-project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Devops-project

Screenshot from 2023-01-23 18-52-06 (1)

Install the gcloud CLI

follow this link to install Google cloud CLI https://cloud.google.com/sdk/docs/install

Create Service Account fot Terraform

gcloud iam service-accounts create NAME [--description=DESCRIPTION] [--display-name=DISPLAY_NAME] [GCLOUD_WIDE_FLAG …]

gcloud iam service-accounts keys create key.json --iam-account=my-iam-account@my-project.iam.gserviceaccount.com

store credential in github secrets as GOOGLE_CREDENTIALS also define BASENAME and REGION change the PROJECT_ID and number in variable.tf or in GOOGLE_CREDENTIALS

Create a bucket to store Terraform state

gcloud storage buckets create gs://BUCKET_NAME

Use github secret to manage Google Credential

Make sure you have the necessary Cloud Storage permissions on your user account: storage.buckets.create storage.buckets.list storage.objects.get storage.objects.create storage.objects.delete storage.objects.update

API should be enabled

Artifact Registry API Cloud Resource Manager API Identity and Access Management (IAM) API

About


Languages

Language:HCL 41.9%Language:Go 33.8%Language:JavaScript 11.6%Language:Dockerfile 3.6%Language:CSS 2.6%Language:HTML 2.3%Language:Shell 2.2%Language:Makefile 1.9%