课程内容与代码会放在 Github 上: https://github.com/chechiachang/terraform-30-days
赛後文章会整理放到个人的部落格上 http://chechia.net/
本文简短说明如何搭配 Google Cloud Platform 使用 Terraform
还请参考官方文件 GCP terraform get-started
Prerequiesites
VERSION=351.0.0
OS=darwin
ARCH=x86_64
cd # home
wget "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${VERSION}-${OS}-${ARCH}.tar.gz"
tar -zxf google-cloud-sdk-${VERSION}-${OS}-${ARCH}.tar.gz
ls google-cloud-sdk/bin
把下面这端加到 ~/.bashrc 或 ~/.zshrc
# Google SDK
export PATH="$PATH:/Users/${USER}/google-cloud-sdk/bin"
if [ -f '/Users/${USER}/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/${USER}/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/${USER}/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/${USER}/google-cloud-sdk/completion.zsh.inc'; fi
进行 gcloud init
gcloud init
Pick configuration to use:
[1] Create a new configuration
Choose the account you would like to use to perform operations for
this configuration:
[1] Log in with a new account
You are logged in as: [[email protected]].
Pick cloud project to use:
[1] Create a new project
Enter a Project ID. Note that a Project ID CANNOT be changed later.
Project IDs must be 6-30 characters (lowercase ASCII, digits, or
hyphens) in length and start with a lowercase letter. terraform-30-days
为了产生 foundation 我们使用 root account
本地产生 credential
gcloud auth application-default login
Credentials saved to file: [~/.config/gcloud/application_default_credentials.json]
cd gcp/foundation/us-west1/terraform_backend
terraform init
terraform plan
terraform apply
gcp/foundation/us-west1/terraform_backend
产生
完成上述设定後,可以使用 terragrunt 操作 terraform。关於 terragrunt 细节请见第六天左右。
cd gcp/foundation/compute_network
terragrunt init
terragrunt plan
terragrunt apply
<<: 从零开始学3D游戏开发 Roblox Studio 简介 Part.1
特殊的数字 Infinity 系列: Infinity + Infinity // Infinity...
删除档案的部分,首先要先把栏位列印出来 资料表一样参考第23天的文章 https://ithelp....
那麽在前篇,我们已经安装建置好整个Python运行环境,接下来就可以学习如何编写简单的程序了! 以下...
AR介绍 AR为Augmented Reality(扩增实境)的简称,透过照相镜头和APP将真实世界...
在上一篇,建立起一个Angular+Nestjs的Nx专案,那麽这一篇就要来好好介绍什麽是Nx。 安...