IBM UrbanCode Deploy Terraform provider

The IBM® UrbanCode® Deploy provider contains the resources to interact with your IBM UrbanCode Deploy server.

Argument reference

Table 1. Argument reference
Name Required Descriptions
username True The IBM UrbanCode Deploy user name.
password True The IBM UrbanCode Deploy password.
ucd_server_url True The IBM UrbanCode Deploy server URL.
proxy_url False The proxy server URL that is used to connect to an IBM UrbanCode Deploy server.

Example usage

provider "ucd" {
     username = "admin"
     password = "admin_password"
     ucd_server_url = "https://ucd-server.raleigh.ibm.com:8443"
 }

Resources

  • ucd_agent_mapping: Add an agent to the resource tree.
    Table 2. Argument reference
    Name Required Description
    agent_name True The IBM UrbanCode Deploy agent name.
    description False The description for the agent.
    dynamic False Determines if the agent is added as a dynamic group.
    name False The name given to this agent in the resource tree.
    parent_id True The ID of the resource in the resource tree where the agent is added. This is normally the base resource group ID.
    sleep_delay False The amount of time to wait between checks for the agent. Default is 4 seconds.
    tags False List of tags assigned to this agent resource in the resource tree.
    timeout False The amount of time to check for the agent. Default is 20 seconds.
    Example usage
    resource "ucd_agent_mapping" "agent_resource" {
         agent_name = "database_server_agent"
         description = "Agent to manage the database server"
         parent_id = "${ucd_resource_tree.tree.id}"
         tags = ["QA"]
     }
  • ucd_application_process_request: Run an application process on an environment.
    Table 3. Argument reference
    Name Required Description
    application True The application name.
    application_process True The application process.
    component_version False The component version to be used when running the application process.
    environment True The environment name.
    properties False The JSON string that represents properties.
    sleep_delay False The amount of time to wait between checks for application process completion. Default is 10 seconds.
    snapshot False The application snapshot.
    timeout False The amount of time to wait for the application process to complete. Default is 300 seconds.
    Example usage
    resource "ucd_application_process_request" "application_process_request" {
         application = "JKE"
         application_process = "install"
         environment = "${ucd_environment.environment.name}"
         properties {
            "user" = "user1"
            "email" = "user1@email.com"
         }
         component_version {
            component = "JKE_web"
            version = "latest"
         }
     }
  • ucd_component_mapping: Add a component to the resource tree.
    Table 4. Argument reference
    Name Required Description
    component True The component name.
    description False The component description.
    name False The name given to this component in the resource tree.
    parent_id True The ID of the resource in the resource tree under which to place this component. This is normally the agent.
    role_id False The component role ID.
    role_properties False The component role properties.
    tags False List of tags assigned to this component resource in the resource tree.
    use_impersonation False Determines whether or not to use default impersonation.
    Example usage
    resource "ucd_component_mapping" "jke_resource" {
         component = "jke.war"
         description = "The JKE component"
         parent_id = ""${ucd_agent.agent.id}"
         tags = ["QA"]
     }
  • ucd_component_process_request: Run a component process on an environment.
    Table 5. Argument reference
    Name Required Description
    application True The application name.
    component True The component name.
    environment True The environment name.
    process True The component process to run.
    resource True The ID of the component resource in the resource tree.
    sleep_delay False The amount of time to wait between checks for component process completion. The default is 10 seconds.
    timeout False The amount of time to wait for the component process to complete. The default is 300 seconds.
    version False The component version.
    Example usage
    resource "ucd_component_process_request" "component_process_request" {
         application = "JKE"
         component = "jke.war"
         environment = "${ucd_environment.environment.name}"
         process = "deploy"
         resource = "${ucd_component_mapping.component_resource.id}"
         version = "4.0"
     }
  • ucd_environment: Add an environment to the resource tree.
    Table 6. Argument reference
    Name Required Description
    application True The application name or ID for the environment.
    base_resource_group False The base resource group name or ID to add to the environment.
    color False The color for the environment.
    component_property False Sets a component environment property. Can be specified multiple times for each property.
    delete_attached_resources False Determines whether or not to delete the resources attached to this environments. The default value is true.
    description False A description for the environment.
    exempt_process False The process exempt from approval.
    inherit_system_cleanup False Determines if the environment uses the component version cleanup settings for the system or component settings.
    lock_snapshots False All of the snapshots used in a request to the deployment are locked to prevent changes.
    name True The environment name.
    require_approvals False Determines if the environment requires approvals for deployment.
    Example usage
    resource "ucd_environment" "environment" {
        name = "my_environment"
        application = "JKE"
        base_resource_group ="${ucd_resource_tree.tree.id}"
        component_property {
           component = "jke.war"
           name = "JKE_DB_HOST"
           value = "${aws_instance.db.private_ip}"
        }
     }
  • ucd_resource_tree: Create a top-level resource group.
    Table 7. Argument reference
    Name Required Description
    base_resource_group_name True The base resource group name.
    description False A description for the base resource group.
    dynamic False Determines if the resource group is added as a dynamic group.
    parent False Name or ID of the parent resource for this resource group.
    Example usage
    resource "ucd_resource_tree" "tree" {
        base_resource_group_name = "my_tree"
        parent = "/my_app/QA/staging"
     }