Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Prerequisites to run Terraform from GCP cloud shell
Anchor
preqcloudshell
preqcloudshell

  • Users You need a valid Google Cloud Platform account. This account will be used to authenticate Terraform to interact with GCP resources.

  • The user typically needs the following permissions are required:

    • Editor Role

    • Secret Manager Admin

    • Storage Object Admin

    • storage.buckets.get

    • storage.buckets.update

    • storage.objects.update

  • Google Console users should must have the privilege to launch Google resources like Instances, Dataproc  clusterDataproc cluster, Google Storage, and Disks in the Projectproject.

  • Logged-in users should must have the privilege to launch Gcloud in GCP. 

  • If a user intends to To utilize an existing service account for deployments, it must possess specific permissions as outlined in kyvos documentation .If a user intends to in Prerequisites for deploying Kyvos in a GCP environment section.

  • To utilize an existing VPC for deployments, it must possess specific permissions as outlined in the kyvos documentationIf a user intends to Prerequisites for deploying Kyvos in a GCP environment section.

  • To utilize an existing bucket for deployments, it must possess specific permissions as outlined in the kyvos documentation Prerequisites for deploying Kyvos in a GCP environment section.

Prerequisites to run Terraform form local machine
Anchor
localmachine
localmachine

  • Download and install Terraform on your local machine.terraform installation

  • To install Terraform, refer to the Terraform documentation.

  • Execute terraform Terraform init command to verify successful installation of Terraform.

  • Jq should be installed on your local machine.

  • User needs You need a GCP account to create and manage resources. Ensure that you have the necessary permissions.

  • Configure GCP on your local machine.

  • gcloud initlizationFor gcloud initialization, refer to the Google documentation.

Automated resource creation using Terraform from GCP
Anchor
ATM_GCP
ATM_GCP

...

  1. Open a terminal or command prompt on your local machine.

  2. Navigate to your Terraform configuration directory (where your .tf files are located).

  3. Make sure to establish Create a directory named "terraform" and inside it, construct add subdirectories and files as specified above.according to the following specifications:

    image-20241017-081850.pngImage Added
  4. Access the kyvosparams.tfvars file located in the conf directory, and configure the parameters as needed for your deployment

  5. Cd inside the "bin" folder, execute the command ./deploy.sh command. This command will initialize Terraform, generate a plan, and apply the configuration as specified in the kyvosparams.tfvars file.

  6. Review the output to ensure Terraform will create, modify, or delete the resources as expected.

    • If you need to interrupt the script while it's running, press Ctrl+Z.

    • If you need to make modifications to the kyvosparams.tfvars file, do so accordingly.

  7. Upon successful execution of this command, Terraform will display the outputs as specified in the configuration.

  8. To destroy your entire deployment, simply execute the ./deploy.sh destroy command.