本页面介绍如何启用和停用 Infrastructure Manager。
如需了解 Infra Manager 的费用,请参阅价格。
启用服务
- 登录您的 Google Cloud 账号。如果您是 Google Cloud新手, 请创建一个账号来评估我们的产品在 实际场景中的表现。新客户还可获享 $300 赠金,用于 运行、测试和部署工作负载。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
- 如果尚未安装 Google Cloud CLI,请安装并初始化
。对于现有安装,请使用以下命令更新 Google Cloud CLI 的组件:
gcloud components update。如需检查 gcloud CLI 的版本,请运行以下命令:
gcloud version
- 通过 Google Cloud 控制台
或以下
gcloud命令启用该 API:gcloud services enable config.googleapis.com
- 可选:如需将 配额验证 与 Infra Manager 搭配使用,请通过 Google Cloud 控制台 或以下
gcloud命令启用该 API:gcloud services enable cloudquotas.googleapis.com
停用服务
停用 Infra Manager API 后,任何相关资源都将继续存在于项目中。停用后,您将无法使用该服务对项目中的部署和资源进行任何更改。
如果您再次启用该 API,则可以继续以首次启用该 API 时的方式使用该服务。
如需通过 Google Cloud 控制台停用 API,请执行以下操作:
控制台
- 转到 API 概览 Infra Manager 页面。
- 选择已启用该 API 的项目。
- 点击管理。
- 点击停用 API。
gcloud
运行以下命令来为当前项目停用该 API:
gcloud services disable config.googleapis.com
后续步骤
- 详细了解如何将 Terraform 与 Google Cloud 搭配使用。
- 使用 Infra Manager 部署基础架构。
- 更新部署。
- 查看部署的状态。