This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies
Google Cloud Apps
The program known as Terraform has gained popularity as a tool to manage resources in the form of code as it provides a basic syntax that simplifies changes and prevents many clouds. Any cloud platform can be used. Terraform can manage on-premises infrastructure with vSphere and Cisco as well as with any cloud service provider because it is platform independent. Instead of creating new workflows and skills to manage each environment, organizations can apply the same workflows and skills that are already accepted. Through this article, we learn the installation and use of Terraform and GCP (Google Cloud Platform) on our Linux system.
How to install Terraform Google Cloud Platform on Ubuntu 20.04
By following these step-by-step instructions, you can install GCP terraform without any problems. Before that, we have some requirements to update the system and have the latest version of Linux.
The first order we made was for generating a terraform package. For this, we need a free package. With the appropriate command, the package is unzipped:
Now we have used the url to download our terraform specified in the terminal below. Note that we need to provide the latest versions of Terraform modules. We can get the latest version from their website. We provided version "0.11.10".
By default, we have a $home directory in our UBUNTU 20.04 system, and the terraform package will be removed from the current working directory. The command below generates the terraform package.
In binary storage, we moved the terraform using the method shown as a rule. The Terraform binary must be added manually to the bin file because the configuration file is missing.
Now we get Terraform from Ubuntu directly without providing its directory using the command below. After installing Terraform, we need to configure a command line service to connect to our Google Cloud Platform service. This will allow us to log into our Google Cloud Platform account and allow Terraform to manage our resources. How to configure Terraform Google Cloud Platform on Ubuntu 20.04
As we downloaded the Cloud SDK in the section above, now we need to set up the SDK environment, which is possible by running the following command. Press "Y" to continue. Then, the URL is generated when you press "Y" in the prompt. Click the specified URL. This will take you to a login page where an email and password will be required. You can immediately see how the link message works. After successfully logging in, the Google Cloud Platform Dashboard will open. We can create a new project by clicking "CREATE PROJECT". We created the project by fulfilling these conditions. After clicking the "CREATE" option, our project will be created. Make sure the job we selected is created so we can move on to the next step.
We should also use the "Project ID" for the terraform script. As the screenshot says, it's in the "Project Overview" section.
To do this, go to the "IAM & Admin" section and click on "Service Accounts". Open creative work account. We have clarified the details requested from them. Then click on the "Continue Create" option.
As we did in the first step of creating a work account description. Now the second step is to grant permission to the service account. Here, we have provided an editor by selecting the "Editor" option. Next, we gave our Gmail address to give access to the work account and clicked on the "Don't" option.
Then, to verify the configuration created using the Terraform script, the key is required. The key we need to create is for the above service account and it should be in JSON format. To create a key, click on the three dots shown in the image below "Activities". Next, select the "Manage key" option. The "Manage Keys Page" will open and we will have the "Add Keys" option. The "generate secret" key page will open here and we need to select the "JSON" option for our key type. By pressing the "CREATE" button. The key will be extracted and downloaded as a JSON file.
The first configuration we set to build the network will now be done. We created the directory as "mylinux-project-gcp" because each terraform has a different directory.
Next, we defined these contents in our main.tf file. We have added the name of the JSON file to the "credentials" option. And at t
Shipping Cost | No Shipping |
Shipping Time | Ready to ship in 4-7 Business Days |
Location | erenkoy 34738, Istanbul, Turkey |
No reviews found.
No comments found for this product. Be the first to comment!