privateClusterConfig:enablePrivateNodes:trueenablePrivateEndpoint:true# Configure the IP range for the hosted master networkmasterIpv4CidrBlock:IP_RANGEipAllocationPolicy:useIpAliases:truecreateSubnetwork:true
# Config provided to Deployment Managerresources:-name:example-resourcetype:gcp-types/service-v1:sample-type-with-passwordproperties:zone:us-central1-ausername:test-userpassword:hunter2# Config as surfaced by Deployment Managerresources:-name:example-resourcetype:gcp-types/service-v1:sample-type-with-passwordproperties:zone:us-central1-ausername:test-userpassword:(redacted)
# Not a valid instance configuration, used solely for demonstrationresources:-name:example-resourcetype:gcp-types/compute-v1:instancesproperties:zone:us-central1-adisks:-autoDelete:trueboot:true# Will not be redactedpassword:hunter2
为主账号授予 owner 角色可允许他们修改 IAM 政策。因此,只有当成员因合法目的而需要管理 IAM 政策时才授予其所有者角色,因为您的政策包含敏感的访问权限控制数据。有尽可能少的用户参与政策管理,将会简化可能必须进行的任何审核。
❑
Deployment Manager 使用 Google API 服务账号来创建和管理您的资源。如果您使用 Deployment Manager 来管理关键资源(如自定义 IAM 角色),则必须为默认的 Google API 服务账号分配其他 IAM 角色。例如,如果要使用 Deployment Manager 创建和管理自定义 IAM 角色,您必须将 Role Administrator 角色分配给 Google API 服务账号。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[[["\u003cp\u003eDeployment Manager should be used to modify resources that were originally created as part of a deployment; otherwise, you might encounter errors.\u003c/p\u003e\n"],["\u003cp\u003eWhen managing credentials in deployments, place all sensitive information in the top-level YAML config, as credentials included in Jinja or Python templates, or key-value pairs within YAML files, may not be fully redacted.\u003c/p\u003e\n"],["\u003cp\u003eFor complex infrastructures, use Python to build templates and structure your configuration file to call other templates, simplifying the creation of composite types.\u003c/p\u003e\n"],["\u003cp\u003eTo manage large deployments efficiently, break resources into smaller, independent groups that can be managed as separate deployments, and consider limiting deployments to 1000 or fewer resources.\u003c/p\u003e\n"],["\u003cp\u003eAutomating project creation and integrating Deployment Manager into CI/CD pipelines allows for consistent, reproducible project configurations, and efficient resource management, particularly for stateful and stateless resources.\u003c/p\u003e\n"]]],[],null,["# Best practices for using Deployment Manager\n\nThis page describes the best practices for creating deployments using\nGoogle Cloud Deployment Manager. This page is designed for users who are familiar with\nDeployment Manager; this page will not teach you how to use\nDeployment Manager.\n\nIf you are new to Deployment Manager, try the\n[Quickstart](/deployment-manager/docs/manage-cloud-resources-deployment) instead.\n\nManaging resources\n------------------\n\nIncluding credentials in your deployment\n----------------------------------------\n\nBuilding templates\n------------------\n\nManaging the size of your deployments\n-------------------------------------\n\nDeployment Manager can operate on a large number of resources, subject to\n[quota limits](/deployment-manager/quotas#deployment_manager). If you want to\nreduce the amount of time it takes to create, update, or delete your\ndeployments, you can reduce the number of resources within each individual\ndeployment.\n| **Note:** If you are not encountering other limitations within Deployment Manager, then you do not have to reduce the size of your deployments. The items presented in this section are intended only as suggestions that you can use to prevent runtime issues from occurring later on.\n\nPermissions\n-----------\n\nBy default, Deployment Manager uses the credentials of the Google APIs\nservice account to authenticate to other APIs. The Google APIs service account\nis designed specifically to run internal Google processes on your behalf.\n\nWhen you want to grant other users access to your Deployment Manager\nproject, you need to grant the user an\n[IAM role](/deployment-manager/docs/access-control) that has the\nappropriate permissions to use Deployment Manager. There are a number of\npredefined IAM roles you can use to determine how much access a\nuser has to call Deployment Manager.\n\nAutomation\n----------\n\nConsider automating the creation of projects as well as automating the creation\nof resources contained within the projects. This enables you to adopt an\ninfrastructure-as-code approach for project provisioning. This approach provides\nmany benefits, such as the ability to:\n\n- Allow enforcement of corporate requirements when providing projects to the teams who need access to Google Cloud resources.\n- Provide a series of predefined project environments that can be quickly and easily provisioned.\n- Use version control to manage your base project configuration.\n- Have confidence that you are deploying reproducible and consistent project configurations.\n- Incorporate project creation as part of an automated provisioning process.\n\nContinuous Integration (CI) / Continuous Deployment (CD)\n--------------------------------------------------------\n\nUse Deployment Manager as part of your CI/CD pipeline."]]