속성은 제품별 또는 서비스별 설정을 정의하는 데 사용될 수 있습니다. 예를 들면 gcloud CLI에서 승인을 위해 사용되는 계정 설정, Compute Engine 리소스로 작업 시 사용되는 기본 리전 설정 또는 자동 gcloud CLI 구성요소 업데이트를 해제하기 위한 옵션 설정 등이 있습니다. 또한 속성을 사용하여 gcloud CLI 명령어의 상세 수준 및 프롬프트 구성과 같은 gcloud CLI 환경설정을 정의할 수도 있습니다.
속성과 신고
gcloud CLI는 gcloud CLI 속성과 효과가 동일한 일부 전역 플래그와 명령어 플래그를 지원합니다. 예를 들어 gcloud CLI는 --project 플래그와 project 속성을 모두 지원합니다. 속성을 사용하면 명령어 실행에서 설정을 동일하게 유지할 수 있지만, 플래그는 각 호출 단위로 명령어 동작에 영향을 미칩니다. 두 가지 모두가 설정된 경우에는 플래그가 속성보다 우선 시 됩니다.
구성
구성은 gcloud CLI 속성을 조합하여 이름을 붙인 것입니다. gcloud CLI는 default라는 구성을 초기 활성 구성으로 사용합니다. default 구성은 대부분의 사용 사례에 적합합니다. 하지만 추가 구성을 만들고 필요에 따라 구성을 전환할 수도 있습니다.
활성 구성의 속성을 설정하려면 gcloud config set을 실행합니다. 다음 예시에서는 project 속성을 설정합니다. 여기서 PROJECT_ID는 프로젝트의 고유 ID입니다.
gcloud config set project PROJECT_ID
core 속성 섹션에 없는 속성을 설정하려면 섹션 다음에 슬래시를 지정한 후 속성 이름을 지정해야 합니다. 다음 예시에서는 영역 이름을 us-east1-b로 설정합니다.
gcloud config set compute/zone us-east1-b
환경 변수를 사용한 속성 설정
환경 변수를 사용하여 속성을 설정할 수도 있습니다. 각 속성에는 속성을 설정하는 데 사용할 수 있는 해당 환경 변수가 있습니다. 환경 변수의 이름은 CLOUDSDK_SECTION_NAME_PROPERTY_NAME 패턴을 따릅니다.
예를 들어 다음과 같이 core/project 및 compute/zone 속성을 설정할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Managing gcloud CLI properties\n\nProperties are settings that govern the behavior of the gcloud CLI.\n\nYou can use properties to define a per-product or per-service setting such as\nthe account used by the gcloud CLI for authorization, the default\nregion to use when working with Compute Engine resources, or the option to\nturn off automatic gcloud CLI component update checks. Properties\ncan also be used to define gcloud CLI preferences like verbosity\nlevel and prompt configuration for gcloud CLI commands.\n\nProperties and flags\n--------------------\n\nThe gcloud CLI supports some\n[global flags](/sdk/gcloud/reference) and command flags that have the same\neffect as gcloud CLI properties. For example, the gcloud CLI supports both\nthe `--project` flag and `project` property. Properties allow you to maintain\nthe same settings across command executions while flags affect command behavior\non a per-invocation basis. Note that flags override properties when both\nare set.\n\nConfigurations\n--------------\n\nA [configuration](/sdk/docs/configurations) is a named set of\ngcloud CLI properties. The gcloud CLI uses a\nconfiguration named `default` as the initial active configuration. The `default`\nconfiguration is suitable for most use cases. However, you can also\ncreate additional configurations and switch between them as required.\n\nListing properties\n------------------\n\nTo list the properties in the active\n[configuration](/sdk/docs/configurations), run\n[`gcloud config list`](/sdk/gcloud/reference/config/list): \n\n gcloud config list\n\nThe gcloud CLI returns the list of properties: \n\n```sh\n[compute]\nregion = us-east1\nzone = us-east1-d\n[core]\naccount = user@google.com\ndisable_usage_reporting = False\nproject = example-project\n[metrics]\ncommand_name = gcloud.config.list\n```\n\nSetting properties\n------------------\n\nTo set a property in the active configuration, run\n[`gcloud config set`](/sdk/gcloud/reference/config/set). The following example\nsets the [`project`](/sdk/gcloud/reference#--project)\nproperty, where \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the unique ID for your project. \n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nTo set properties that are not in the [`core`](/sdk/docs/properties#core)\nproperties section, you must specify the section followed by a forward slash\nbefore the property name. The following example sets the zone name to\n`us-east1-b`. \n\n gcloud config set compute/zone \u003cvar translate=\"no\"\u003eus-east1-b\u003c/var\u003e\n\nSetting properties using environment variables\n----------------------------------------------\n\nYou can also set properties using environment variables. Each property has a\ncorresponding environment variable that can be used to set it. The name of the\nenvironment variable follows the `CLOUDSDK_SECTION_NAME_PROPERTY_NAME` pattern.\nFor example, you can set the `core/project` and `compute/zone` properties as\nfollows: \n\n CLOUDSDK_CORE_PROJECT=\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e\n\n CLOUDSDK_COMPUTE_ZONE=\u003cvar translate=\"no\"\u003eZONE_NAME\u003c/var\u003e\n\n| **Note:** The environment variable values take precedence over property values set using [`gcloud config set`](/sdk/gcloud/reference/config/set).\n\nUnsetting properties\n--------------------\n\nTo unset a property in the active configuration, use\n[`gcloud config unset`](/sdk/gcloud/reference/config/unset): \n\n gcloud config unset disable_usage_reporting\n\nAvailable Properties\n--------------------\n\nThe list of all properties can be found by running\n[`gcloud topic configurations`](/sdk/gcloud/reference/topic/configurations)\nor [`gcloud config set --help`](/sdk/gcloud/reference/config/set) and looking\nfor the Available Properties section.\n\nWhat's next\n-----------\n\n- Read [gcloud CLI configurations](/sdk/docs/configurations) to learn more about configurations."]]