{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":29194,"path":"it-operations-management/cloud-configuration-governance/create-post-provisioning.md","title":"Create post-provision operations","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create post-provision operations\n\nCreate post-provision tasks for newly provisioned catalog items by defining subflows, scripts, CAPI calls, or resource operations. For efficiency, set up a post-provision operation, eliminating the need for manual invocation. This approach enhances time management, ensuring seamless execution of desired actions on the catalog item after resource provisioning.\n\n## Before you begin\n\nRole required: sn\\_cmp.cloud\\_service\\_designer\n\n## About this task\n\nYou can create post-provision operations only for catalog items that are based on templates.\n\n## Procedure\n\n1.  In the Cloud Admin Portal, navigate to **Design** &gt; **Cloud Catalog Items**.\n\n2.  Open the catalog item, click the **Post Provisioning Operation** tab, and then click **New**.\n\n3.  On the form, fill in the fields.\n\n<table id=\"table_eyh_qnw_3fb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nStep Type\n\n</td><td>\n\nPost-provision operation. Based on the post-operation you select, additional fields appear.-   CAPI:\n    -   CAPI Provider\n    -   CAPI Interface\n    -   CAPI Method\n    -   CAPI Version\n-   InstanceScript:\n\nScript: Enter the name of the script.\n\n-   Resource:\n    -   Resource Interface\n    -   Interface Operation\n-   Flow: Select a subflow. All active subflows in the instance are listed.\n\n**Note:** For more information, see [Subflows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/subflows.md).\n\n</td></tr><tr><td>\n\nOrder\n\n</td><td>\n\nOrder of post-provision operations. Enter the order \\(in numerals\\) in which you want the post-provision operation to be invoked. For example, if you enter the value 2 for CAPI and the value 3 for InstanceScript, then CAPI is invoked first and then the InstanceScript gets invoked. If you do not enter any value in this field, the system automatically enters a value in increments of 20.\n\n</td></tr><tr><td>\n\nEnabled\n\n</td><td>\n\nOption for enabling the post-provision operation you want invoked.\n\n</td></tr></tbody>\n</table>4.  Click **Submit**.\n\n    Parameters for the post-provision operation are automatically created as operation attributes on the Manage Attributes form.\n\n5.  To set attribute values for a post-provision operation:\n\n    1.  Click the **Manage Attributes** related link.\n\n        The Manage Attributes form opens.\n\n    2.  Select the post-provision operation to update.\n\n        All attributes for the selected operation appear in the Operations list. You can either create expression mappings \\(shown in the **Mapping** column\\) for an attribute or can you generate variables for an attribute. See [Manage operation attributes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/cloud-configuration-governance/manage-attributes.md) for more information.\n\n        \\[Omitted image \"manage-attributes-post-provision.png\"\\] Alt text: Post-provisioning attributes\n\n    3.  On the Operation Attributes form, edit the values in the **Mapping** field as needed.\n\n    4.  To set a value and not show the field to the cloud user, set **Generate Variable** to false.\n\n        For VMware post-provision operations, you can set the following attribute values:\n\n<table id=\"table_yxs_nzg_r3b\"><thead><tr><th>\n\nAttribute name\n\n</th><th>\n\n&lt;Value field&gt; to set in the Mapping expression\n\n</th></tr></thead><tbody><tr><td>\n\nNodeCredential\n\n</td><td>\n\n$\\(capiResolver.NodeCredentialResolver\\#nodeCredentialId=`<Credential SysID>`\\)**Note:** You must create the credentials manually to be able to specify the sys\\_id in the expression\n\n</td></tr><tr><td>\n\nNodeAddress\n\n</td><td>\n\n$\\(Script:CMPVMUtils.getReachableIp\\[arg=$\\(Stack.items\\[`<VM Name>`\\].attributes\\[sys\\_id\\]\\)\\]\\)\n\n</td></tr><tr><td>\n\nScriptExpression\n\n</td><td>\n\n$\\{CloudScript.scripts.`<Script Name>`\\}\n\n</td></tr></tbody>\n</table>    5.  Click **Apply Changes**.\n\n        All configurations are saved and the Cloud Catalog Items page opens.\n\n\n"}}