Infrastructure Manager에서 주석 및 라벨을 사용할 수 있습니다.
필수 사항이 아닙니다. 이 문서에서는 라벨 및 주석을 연결할 수 있는 리소스를 나열하고 이를 사용하는 방법과 볼 수 있는 위치를 설명합니다. Infra Manager에서 주석이나 라벨을 사용하려면 --annotation 및 --label 플래그를 사용합니다.
주석 및 라벨이란 무엇인가요?
주석은 자유 형식 텍스트의 키-값 쌍입니다. 주석을 사용하여 리소스와 연결된 임의의 정보를 연결할 수 있습니다.
라벨을 사용하여 리소스를 구성할 수 있습니다. 예를 들어 라벨 선택을 기반으로 로직을 적용할 수 있습니다.
주석은 일반적으로 클라이언트 도구에서 리소스에 연결된 임의의 데이터를 저장하는 데 사용하는 식별 불가능한 정보를 저장하는 데 사용되는 반면 라벨은 일반적으로 리소스를 구성하는 데 사용됩니다.
Google Cloud에서 주석을 사용하는 방법에 관한 자세한 내용은 주석 AIP 문서를 참고하세요. 라벨 사용에 관한 자세한 내용은 라벨 개요 문서를 참고하세요.
주석 및 라벨 제약조건
주석과 마찬가지로 라벨은 다음 제한사항을 준수해야 하는 키-값 쌍입니다.
키와 값 모두 128바이트 이하여야 합니다.
키와 값에는 소문자, 숫자, 밑줄, 대시만 사용할 수 있습니다.
키는 소문자나 국제 문자로 시작해야 합니다.
모든 문자는 UTF-8 인코딩을 사용해야 합니다. 국제 문자는 허용됩니다.
예를 들면 다음과 같습니다.
[[["이해하기 쉬움","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-05(UTC)"],[[["\u003cp\u003eAnnotations and labels are optional key-value pairs used with Infrastructure Manager to attach information or organize resources.\u003c/p\u003e\n"],["\u003cp\u003eAnnotations store non-identifying, arbitrary text data associated with a resource, while labels are used for organizing resources.\u003c/p\u003e\n"],["\u003cp\u003eBoth annotations and labels have constraints, including a maximum length of 128 bytes for keys and values, and specific character restrictions.\u003c/p\u003e\n"],["\u003cp\u003eAnnotations and labels can be applied when creating or updating deployments with Infrastructure Manager to monitor deployments or query information sets.\u003c/p\u003e\n"]]],[],null,["# Annotations and labels\n\nYou can use annotations and labels with Infrastructure Manager.\nThey're not required. This document lists the resources to which you can attach\nlabels and annotations, and describes how you can use them and where you can\nview them. To use annotations or labels with Infra Manager, use the\n`--annotation` and `--label` flags.\n\nWhat are annotations and labels?\n--------------------------------\n\n*Annotations* are key-value pairs of free-form text. You can use them to attach\narbitrary information associated with the resource.\n\nYou can use *labels* to organize resources. For example, you can apply logic\nbased on label selection.\n\nAnnotations are used for storing non-identifying information typically used by\nclient tools to store arbitrary data attached to a resource, while labels are\ntypically used to organize resources.\n\nFor more information about using annotations with Google Cloud, see\n[annotations AIP](https://google.aip.dev/148#annotations) documentation. To learn more about using labels, see the\n[labels overview](/resource-manager/docs/labels-overview#what-are-labels) documentation.\n\nAnnotation and label constraints\n--------------------------------\n\nAs with annotations, labels are key-value pairs that must conform to the\nfollowing limitations:\n\n- Keys and values both must be 128 bytes or less.\n- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.\n- Keys must start with a lowercase letter or international character.\n- All characters must use UTF-8 encoding. International characters are allowed.\n For example:\n\n --annotation=\"appVersion=v.1.2.3,environment=production\"\n\nUse annotations and labels with Infra Manager\n---------------------------------------------\n\nThe use of annotations and labels can be applied in a variety of ways across\nyour Google Cloud infrastructure.\n\nWhen you create or update deployments with Infra Manager, you can use\nannotations and labels to monitor deployments or query sets of information.\nFor more information, see [deploy infrastructure using Infra Manager](/infrastructure-manager/docs/deploy-resources),\n[update a deployment](/infrastructure-manager/docs/update-deployment), or [preview a deployment](/infrastructure-manager/docs/preview-deployment).\n\nWhat's next\n-----------\n\nUse Infra Manager to standardize, reuse, and scale your infrastructure\nwith Google Cloud:\n\n- [Deploy a VPC using Terraform](/infrastructure-manager/docs/deploy-vpc-with-terraform)\n- [Deploy infrastructure using Infra Manager](/infrastructure-manager/docs/deploy-resources)"]]