Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara melihat informasi tentang resource yang
disediakan oleh Infrastructure Manager.
Anda dapat melihat resource untuk memahami statusnya, atau melihat resource apa saja yang ada dalam deployment sebelum memperbarui atau menghapus deployment.
Saat Infrastructure Manager men-deploy konfigurasi Terraform, layanan akan menyediakan dan mengonfigurasi resource Google Cloud yang ditentukan dalam konfigurasi. Metadata tentang resource ini ada dalam file status Terraform,
dan Infra Manager menyimpan file ini untuk setiap deployment dan revisi.
File status memiliki informasi tentang resource saat disediakan
oleh Infra Manager. File status dan Infra Manager tidak
memiliki informasi tentang resource ini jika diubah, kecuali jika
diubah oleh
revisi Infra Manager.
Misalnya, Anda dapat menggunakan Infra Manager untuk men-deploy load balancer, lalu memodifikasi load balancer menggunakan konsol Google Cloud .
Dalam hal ini, Infra Manager memiliki informasi tentang load balancer
yang awalnya disediakan, tetapi tidak tentang perubahan yang Anda lakukan
melalui konsol Google Cloud .
Jika Anda memerlukan informasi tentang nama atau status deployment, lihat
Melihat deployment.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[[["\u003cp\u003eThis page explains how to view the resources provisioned by Infrastructure Manager, which are detailed in the Terraform state file stored for each deployment and revision.\u003c/p\u003e\n"],["\u003cp\u003eInfrastructure Manager tracks resources as initially provisioned but does not automatically reflect modifications made outside of Infrastructure Manager, such as through the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eYou can list the resources associated with a specific deployment revision using the \u003ccode\u003egcloud infra-manager resources list\u003c/code\u003e command, with options to filter and sort the results based on various resource attributes.\u003c/p\u003e\n"],["\u003cp\u003eTo view details about a particular resource, use the \u003ccode\u003egcloud infra-manager resources describe\u003c/code\u003e command followed by the resource's ID.\u003c/p\u003e\n"],["\u003cp\u003eBefore viewing resources, you must ensure that Infrastructure Manager is enabled and that you have the necessary IAM permissions (\u003ccode\u003eroles/config.admin\u003c/code\u003e or \u003ccode\u003eroles/config.viewer\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# View resources deployed\n\nThis page describes how to view information about resources that are\nprovisioned by Infrastructure Manager.\n\nYou may want to view resources to understand their state, or to see what\nresources exist in a deployment before you update or delete the deployment.\n\nWhen Infrastructure Manager deploys a Terraform configuration, the service provisions\nand configures the Google Cloud resources that are defined in the\nconfiguration. Metadata about these resources are in the Terraform state file,\nand Infra Manager stores this file for each deployment and revision.\n\nThe state file has information about the resources when they are provisioned\nby Infra Manager. The state file and Infra Manager do not\nhave information about these resources if they are modified, unless they\nare modified by a\n[Infra Manager revision](/infrastructure-manager/docs/update-deployment).\n\nFor example, you can use Infra Manager to deploy a load balancer\nand then you can modify the load balancer using the Google Cloud console.\nIn this case, Infra Manager has information about the load balancer\nthat was initially provisioned, but not about the changes that you did\nthrough the Google Cloud console.\n\nIf you need information about the deployment name or state, see\n[View deployments](/infrastructure-manager/docs/view-deployments).\n\nBefore you begin\n----------------\n\n1. Ensure [Infra Manager is enabled](/infrastructure-manager/docs/enable-service).\n2. Ensure you have a service account.\n3. Ensure that you have the IAM permissions needed to view deployments.\n - `roles/config.admin` or `roles/config.viewer`.\n\nList resources provisioned by a deployment\n------------------------------------------\n\nTo list the resources provisioned by a deployment: \n\n gcloud infra-manager resources list --revision=projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/deployments/\u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e/revisions/\u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID where Infrastructure Manager runs.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location where Infra Manager runs. See [Infrastructure Manager locations](/infrastructure-manager/docs/locations) for the list of valid locations.\n- \u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e: the deployment identifier of the resource's deployment.\n- \u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e: the revision identifier of the revision you're viewing.\n\n### Filter the list of resources\n\nTo filter the list of resources: \n\n gcloud infra-manager resources list --revision=projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/deployments/\u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e/revisions/\u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e --filter=\u003cvar translate=\"no\"\u003eEXPRESSION\u003c/var\u003e\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID where Infrastructure Manager runs.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location where Infra Manager runs. See [Infrastructure Manager locations](/infrastructure-manager/docs/locations) for the list of valid locations.\n- \u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e: the deployment identifier of the resource's deployment.\n- \u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e: the revision identifier of the revision you're viewing and filtering.\n- \u003cvar translate=\"no\"\u003eEXPRESSION\u003c/var\u003e: the expression you are filtering for. Supported expressions are:\n - `terraformInfo.address (string)`\n - `terraformInfo.type (string)`\n - `terraformInfo.id (string)`\n - `state (string)`, one of: `STATE_UNSPECIFIED`, `PLANNED`, `IN_PROGRESS`, `RECONCILED`, `FAILED`\n - `intent(string)`, one of: `INTENT_UNSPECIFIED`, `CREATE`, `UPDATE`, `DELETE`, `RECREATE`, `UNCHANGED`\n - `caiAssets.fullResourceName` (map)\n - `caiAssets.type` (map)\n\n### Sort the list of resources\n\nTo sort the list of resources: \n\n gcloud infra-manager resources list --revision=projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/deployments/\u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e/revisions/\u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e --sort-by=[\u003cvar translate=\"no\"\u003eFIELD\u003c/var\u003e]\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID where Infrastructure Manager runs.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location where Infra Manager runs. See [Infrastructure Manager locations](/infrastructure-manager/docs/locations) for the list of valid locations.\n- \u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e: the deployment identifier of the resource's deployment.\n- \u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e: the revision identifier of the revision you're viewing and sorting.\n- \u003cvar translate=\"no\"\u003eFIELD\u003c/var\u003e: the field used to sort. Supported fields are:\n - `name`\n - `terraformInfo.address`\n - `terraformInfo.type`\n - `terraformInfo.id`\n\nView details about a resource\n-----------------------------\n\nTo view details about a specific resource, use the resource ID: \n\n gcloud infra-manager resources describe projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/deployments/\u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e/revisions/\u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e/resources/\u003cvar translate=\"no\"\u003eRESOURCE_ID\u003c/var\u003e\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID where Infrastructure Manager runs.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location where Infra Manager runs. See [Infrastructure Manager locations](/infrastructure-manager/docs/locations) for the list of valid locations.\n- \u003cvar translate=\"no\"\u003eDEPLOYMENT_ID\u003c/var\u003e: the deployment identifier of the resource's deployment.\n- \u003cvar translate=\"no\"\u003eREVISION_ID\u003c/var\u003e: the revision identifier of the specific revision that deployed the resource.\n- \u003cvar translate=\"no\"\u003eRESOURCE_ID\u003c/var\u003e: the resource ID of the resource you're viewing.\n\nWhat's next\n-----------\n\n- Learn more about [Terraform with Google Cloud](/docs/terraform).\n- [Automate deployments](/infrastructure-manager/docs/automate-git).\n- [Update a deployment](/infrastructure-manager/docs/update-deployment).\n- [View the state of a deployment](/infrastructure-manager/docs/view-deployments).\n- [Delete a deployment](/infrastructure-manager/docs/delete-deployments)."]]