Sample User Inputs Forms

In this page you can find some sample user inputs using multiple input types and catalog dynamic fields.

To test any of the samples below, just copy the content and paste it on the User Input form in the Self-Serve Action builder.

Add an environment variable action

[
  {
    "type": "item-selector",
    "payloadName": "service",
    "title": "Service",
    "dataset": {
      "data": "{{services()}}",
      "value": "name"
    }
  },
  {
    "type": "item-selector",
    "payloadName": "environment",
    "title": "Environment",
    "dataset": {
      "data": "{{environments()}}",
      "value": "name"
    }
  },
  {
    "required": true,
    "type": "text",
    "title": "Key",
    "payloadName": "key",
    "defaultValue": ""
  },
  {
    "required": true,
    "type": "text",
    "title": "Value",
    "payloadName": "value",
    "defaultValue": ""
  }
]

Cloud resources selector dynamic form

[
  {
    "required": true,
    "type": "dropdown",
    "title": "Cloud Provider",
    "payloadName": "cloud_type",
    "defaultValue": "AWS",
    "options": [
      {
        "label": "AWS",
        "value": "AWS"
      },
      {
        "label": "GCP",
        "value": "GCP"
      },
      {
        "label": "AZURE",
        "value": "AZURE"
      },
      {
        "label": "K8s",
        "value": "K8s"
      }
    ]
  },
  {
    "type": "item-selector",
    "payloadName": "selected_resource_azure",
    "title": "Resources AZURE",
    "dataset": {
      "data": "{{resources()}}",
      "value": "id"
    },
    "filter": [
      {
        "column": "provider",
        "operator": "in",
        "value": "{{cloud_type}}"
      }
    ],
    "condition": {
      "when": "cloud_type",
      "is": "AZURE"
    }
  },
  {
    "type": "item-selector",
    "payloadName": "selected_resource_aws",
    "title": "Resources AWS - Filtered by EKS Clusters",
    "dataset": {
      "data": "{{resources()}}",
      "value": "id"
    },
    "condition": {
      "when": "cloud_type",
      "is": "AWS"
    },
    "filter": [
      {
        "column": "provider",
        "operator": "in",
        "value": "{{cloud_type}}"
      },
      {
        "column": "type",
        "operator": "in",
        "value": "AWS:EKS:Cluster"
      }
    ]
  },
  {
    "type": "item-selector",
    "payloadName": "selected_resource_k8s",
    "title": "Resources K8s",
    "dataset": {
      "data": "{{resources()}}",
      "value": "id"
    },
    "condition": {
      "when": "cloud_type",
      "is": "K8s"
    },
    "filter": [
      {
        "column": "provider",
        "operator": "in",
        "value": "{{cloud_type}}"
      }
    ]
  },
  {
    "type": "item-selector",
    "payloadName": "selected_resource_gcp",
    "title": "Resources GCP",
    "dataset": {
      "data": "{{resources()}}",
      "value": "id"
    },
    "condition": {
      "when": "cloud_type",
      "is": "GCP"
    },
    "filter": [
      {
        "column": "provider",
        "operator": "in",
        "value": "{{cloud_type}}"
      }
    ]
  }
]

Create release quality gate from Scorecard result

[
  {
    "required": true,
    "type": "item-selector",
    "helpText": "Select one or more Scorecards to be checked in 100% compliant against the service(s) before the release.",
    "payloadName": "scorecard_id",
    "title": "Scorecards",
    "multiple": true,
    "dataset": {
      "data": "{{scorecards()}}",
      "value": "id"
    }
  },
  {
    "required": true,
    "type": "item-selector",
    "helpText": "Select one or more environment in which the release will be quality gated.",
    "payloadName": "environments",
    "title": "Environments",
    "multiple": true,
    "dataset": {
      "data": "{{environments()}}",
      "value": "id"
    }
  },
  {
    "required": true,
    "type": "item-selector",
    "helpText": "Select the services you want to apply this quality gate.",
    "payloadName": "Services",
    "title": "Services",
    "multiple": true,
    "dataset": {
      "data": "{{services()}}",
      "value": "id"
    }
  },
  {
    "type": "text",
    "title": "Message for the service owners",
    "helpText": "Specify a message to the service owners in case of fail in the quality gate.",
    "payloadName": "message"
  },
  {
    "type": "datepicker",
    "title": "Expiration date for this gate",
    "defaultValue": "04.04.2024",
    "payloadName": "expiration_date"
  }
]

Deploy app or service

[
  {
    "required": true,
    "type": "dropdown",
    "title": "Type",
    "payloadName": "type",
    "defaultValue": "Service",
    "options": [
      {
        "label": "Service",
        "value": "Service"
      },
      {
        "label": "Application",
        "value": "Application"
      }
    ]
  },
  {
    "type": "checkbox",
    "title": "Existing item?",
    "payloadName": "exists",
    "defaultValue": "true",
    "helpText": "Uncheck if you are creating a item that don't exist in the catalog."
  },
  {
    "type": "item-selector",
    "payloadName": "selected_item",
    "title": "Services",
    "condition": [
      {
        "when": "exists",
        "is": "true"
      },
      {
        "when": "type",
        "isNotEmpty": true
      },
      {
        "when": "type",
        "is": "Application",
        "then": {
          "title": "Applications",
          "helpText": "Select a application",
          "dataset": {
            "data": "{{applications()}}",
            "value": "id"
          }
        },
        "else": {
          "title": "Service",
          "helpText": "Select a service",
          "dataset": {
            "data": "{{services()}}",
            "value": "id"
          }
        }
      }
    ]
  },
  {
    "type": "item-selector",
    "title": "Repository",
    "helpText": "Repository where your code is",
    "payloadName": "new_item_repo",
    "dataset": {
      "data": "{{repositories()}}",
      "value": "name"
    },
    "condition": [
      {
        "when": "exists",
        "is": "false"
      }
    ]
  },
  {
    "type": "text",
    "title": "Service/App name",
    "payloadName": "new_item_name",
    "condition": [
      {
        "when": "exists",
        "is": "false"
      }
    ]
  },
  {
    "type": "text",
    "title": "Service/App Description",
    "payloadName": "new_item_descripion",
    "condition": [
      {
        "when": "exists",
        "is": "false"
      }
    ]
  },
  {
    "required": true,
    "type": "item-selector",
    "payloadName": "environment",
    "title": "Environment",
    "multiple": true,
    "dataset": {
      "data": "{{environments()}}",
      "value": "name"
    }
  },
  {
    "type": "text",
    "title": "Justification for approval process",
    "helpText": "Justification for production deployment for internal approval process",
    "payloadName": "justification",
    "condition": [
      {
        "when": "environment",
        "in": [
          "production"
        ]
      }
    ]
  }
]

Create cloud resource

[
  {
    "required": true,
    "type": "text",
    "title": "Name",
    "payloadName": "name",
    "defaultValue": ""
  },
  {
    "required": true,
    "type": "item-selector",
    "payloadName": "Service",
    "title": "Service",
    "dataset": {
      "data": "{{services()}}",
      "value": "id"
    }
  },
  {
    "required": true,
    "type": "item-selector",
    "payloadName": "environments",
    "title": "Environment",
    "multiple": true,
    "dataset": {
      "data": "{{environments()}}",
      "value": "id"
    }
  },
  {
    "required": true,
    "type": "dropdown",
    "title": "Region",
    "payloadName": "region",
    "defaultValue": "",
    "options": [
      {
        "label": "us-east-2",
        "value": "us-east-2"
      },
      {
        "label": "us-east-1",
        "value": "us-east-1"
      },
      {
        "label": "us-west-1",
        "value": "us-west-1"
      },
      {
        "label": "us-west-2",
        "value": "us-west-2"
      },
      {
        "label": "ap-east-1",
        "value": "ap-east-1"
      },
      {
        "label": "af-south-1",
        "value": "af-south-1"
      },
      {
        "label": "ap-south-1",
        "value": "ap-south-1"
      },
      {
        "label": "ap-northeast-3",
        "value": "ap-northeast-3"
      },
      {
        "label": "ca-central-1",
        "value": "ca-central-1"
      },
      {
        "label": "eu-central-1",
        "value": "eu-central-1"
      },
      {
        "label": "eu-west-1",
        "value": "eu-west-1"
      },
      {
        "label": "eu-west-2",
        "value": "eu-west-2"
      },
      {
        "label": "me-south-1",
        "value": "me-south-1"
      },
      {
        "label": "sa-east-1",
        "value": "sa-east-1"
      }
    ]
  },
  {
    "required": true,
    "type": "dropdown",
    "title": "Type",
    "payloadName": "type",
    "options": [
      {
        "label": "EC2",
        "value": "EC2"
      },
      {
        "label": "S3",
        "value": "S3"
      }
    ]
  },
  {
    "type": "dropdown",
    "title": "ECS size",
    "payloadName": "ec2size",
    "defaultValue": "",
    "condition": {
      "when": "type",
      "is": "EC2"
    },
    "options": [
      {
        "label": "m7g.medium",
        "value": "m7g.medium"
      },
      {
        "label": "m7g.large",
        "value": "m7g.large"
      },
      {
        "label": "m7g.xlarge",
        "value": "m7g.xlarge"
      },
      {
        "label": "m7g.4xlarge",
        "value": "m7g.4xlarge"
      },
      {
        "label": "m7g.16xlarge",
        "value": "m7g.xlarge"
      },
      {
        "label": "m7g.16xlarge",
        "value": "m7g.xlarge"
      },
      {
        "label": "m7g.metal",
        "value": "m7g.metal"
      },
      {
        "label": "m7gd.large",
        "value": "m7gd.large"
      },
      {
        "label": "m7gd.xlarge",
        "value": "m7gd.xlarge"
      },
      {
        "label": "m7gd.4xlarge",
        "value": "m7gd.4xlarge"
      },
      {
        "label": "m7gd.8xlarge",
        "value": "m7gd.8xlarge"
      },
      {
        "label": "m7gd.16xlarge",
        "value": "m7gd.16xlarge"
      }
    ]
  },
  {
    "type": "dropdown",
    "title": "ECS VPC",
    "payloadName": "ec2vpc",
    "defaultValue": "",
    "condition": {
      "when": "type",
      "is": "EC2"
    },
    "options": [
      {
        "label": "vpc-05769a9a8d389476f",
        "value": "vpc-05769a9a8d389476f"
      },
      {
        "label": "vpc-0c0df9c6c103d928f",
        "value": "vpc-0c0df9c6c103d928f"
      },
      {
        "label": "vpc-0af4a6cbe19ea4a09",
        "value": "vpc-0af4a6cbe19ea4a09"
      },
      {
        "label": "pc-0aaef9192c49a23da",
        "value": "pc-0aaef9192c49a23da"
      }
    ]
  },
  {
    "type": "text",
    "title": "S3 Bucket Name",
    "payloadName": "s3name",
    "condition": {
      "when": "type",
      "is": "S3"
    }
  }
]

Create a Jupyter notebook


[
  {
    "required": true,
    "type": "text",
    "title": "Name",
    "payloadName": "name",
    "defaultValue": ""
  },
  {
    "type": "number",
    "title": "TTL (days)",
    "payloadName": "ttl",
    "defaultValue": "1",
    "helpText": "How many days should this environment be available"
  },
  {
    "type": "checkbox",
    "title": "Change owner",
    "payloadName": "owner",
    "defaultValue": "false",
    "helpText": "Select this toggle to assign ownership to a different team."
  },
  {
    "type": "dropdown",
    "title": "Owner team",
    "payloadName": "team",
    "defaultValue": "Da Vinci Squad",
    "options": [
      {
        "label": "Da Vinci Squad",
        "value": "Da Vinci Squad"
      },
      {
        "label": "Dali Squad",
        "value": "Dali Squad"
      },
      {
        "label": "Monet Squad",
        "value": "Monet Squad"
      },
      {
        "label": "Picasso Squad",
        "value": "Picasso Squad"
      }
    ],
    "condition": {
      "when": "owner",
      "is": "true"
    }
  }
]

Rollback last production deploy

[
  {
    "type": "item-selector",
    "payloadName": "service",
    "title": "Service",
    "dataset": {
      "data": "{{services()}}",
      "value": "name"
    }
  },
  {
    "type": "item-selector",
    "payloadName": "environment",
    "title": "Environment",
    "dataset": {
      "data": "{{environments()}}",
      "value": "name"
    }
  },
  {
    "type": "text",
    "title": "Justificative",
    "payloadName": "justificative",
    "defaultValue": ""
  },
  {
    "type": "checkbox",
    "title": "Create incident",
    "payloadName": "incident",
    "defaultValue": "false",
    "helpText": "Create a P1 severity incident in the service On Call integrated plug-in"
  }
]

Last updated

Copyright © 2023 configure8, Inc. All rights reserved.