Il supporto di Cloud Deployment Manager terminerà il 31 dicembre 2025. Se al momento utilizzi Deployment Manager, esegui la migrazione a Infrastructure Manager o a una tecnologia di deployment alternativa entro il 31 dicembre 2025 per assicurarti che i tuoi servizi continuino senza interruzioni.
Conversione di tipi composti in modelli supportati
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Un tipo composito è costituito da uno o più modelli, configurati per funzionare insieme, che vengono aggiunti definitivamente a Deployment Manager. Per una panoramica dei tipi compositi e la procedura per crearli, consulta Aggiunta di un modello come tipo composito.
Tuttavia,
la funzionalità dei tipi composti è attualmente deprecata
e non sarà più utilizzabile nei deployment nuovi o aggiornati il 22 febbraio 2022. Le configurazioni di deployment sono interessate se utilizzano tipi di risorse con il formatotype: PROJECT_ID/composite:TEMPLATE_NAME.
Questa pagina descrive i passaggi per convertire i tipi composti in modelli supportati.
Separazione del tipo composito in singoli modelli
Per convertire il tipo composto in modelli supportati, puoi creare manualmente un singolo modello contenente tutti gli elementi del tipo composto oppure separare gli elementi del tipo composto in singoli file modello.
Devi copiare tutti i singoli file del modello nella stessa posizione del deployment. Per evitare conflitti di denominazione, ti consigliamo di utilizzare una distinta
cartella rispetto a quella utilizzata per la configurazione del deployment.
Devi anche assicurarti che il file di configurazione sia configurato per importare il singolo file o i singoli file modello. Per informazioni sull'importazione dei modelli, consulta Importare il modello.
Sostituzione dei riferimenti al tipo composto
Aggiorna quindi i deployment in modo da utilizzare direttamente i singoli modelli o i modelli
collettivi, anziché il tipo composito precedente.
Trova e sostituisci tutte le istanze di sintassi di tipo composito, ad esempio:
type:PROJECT_ID/composite:main-template
Sostituisci la sintassi del tipo composito con un riferimento diretto a un modello, ad esempio:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-03 UTC."],[[["\u003cp\u003eComposite types, which are multiple templates configured to work together, are deprecated and will not be usable in new or updated deployments after February 22, 2022.\u003c/p\u003e\n"],["\u003cp\u003eTo convert composite types, you can either create a single template containing all elements or separate the elements into individual template files.\u003c/p\u003e\n"],["\u003cp\u003eTemplate files should be moved to the same location as the deployment, preferably in a separate folder to avoid naming conflicts, and the configuration file must be updated to import these files.\u003c/p\u003e\n"],["\u003cp\u003eDeployments need to be updated to directly use the individual template or templates instead of the composite type, replacing the composite type syntax with direct template references.\u003c/p\u003e\n"]]],[],null,["# Converting composite types to supported templates\n\nA composite type is one or more templates, configured to work together, that are\nadded permanently to Deployment Manager. For an overview of composite types,\nand steps to create them, visit\n[Adding a template as a composite type](/deployment-manager/docs/configuration/templates/create-composite-types).\n\nHowever,\n[the composite types feature is currently deprecated](/deployment-manager/docs/deprecations/composite-types),\nand will no longer be usable in new or updated deployments on **February 22,\n2022** . Your deployment configurations are affected if they use resource types\nwith the format\n`type: `\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/composite:`\u003cvar translate=\"no\"\u003eTEMPLATE_NAME\u003c/var\u003e.\n\nThis page describes the steps to convert composite types to supported templates.\n\nSeparating your composite type into individual templates\n========================================================\n\nTo convert your composite type into supported templates, you can either manually\ncreate a single template that contains all of the elements of the composite\ntype, or separate out the elements of your composite type into individual\ntemplate files.\n\nFor more information on templates and creating templates, refer to\n[Creating a basic template](/deployment-manager/docs/configuration/templates/create-basic-template).\n\nMoving and importing your template files\n========================================\n\nYou must copy all individual template files to the same location as your\ndeployment. To avoid naming conflicts, we recommend that you use a separate\nfolder from the folder you used for your deployment configuration.\n\nYou must also ensure that your configuration file is set up to import the\nindividual template file or files. For information about importing templates,\nvisit\n[Importing the template](/deployment-manager/docs/configuration/templates/create-basic-template#importing_the_template).\n\nReplacing references to your composite type\n===========================================\n\nNext, update your deployments to use your individual template or templates\ndirectly, instead of the previous composite type.\n\nFind and replace all instances of composite type syntax, such as: \n\n type: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT_ID\u003c/span\u003e\u003c/var\u003e/composite:main-template\n\nReplace the composite type syntax with a direct reference to a template, such\nas: \n\n type: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePATH_TO\u003c/span\u003e\u003c/var\u003e/main-template.jinja"]]