Allow ability to lock component input values

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

In the yaml configuration of a component, we can define spec.inputs which hold default values for the variable. This value can be overridden in the configuration that uses the component.

This issue is to ask for ability to have the option to lock the inputs. The "locked" inputs cannot be overridden when the component is included.

Example:

component configuration:

spec:
  inputs:
    stage:
      default: test
      locked: true
---
component-job:
  script: echo job 1
  stage: $[[ inputs.stage ]]

When using this component, job's stage cannot be changed.

include:
  - component: $CI_SERVER_FQDN/my-org/security-components/secret-detection@1.0.0
    inputs:
      stage: build #Either no effect, or give CI validation error
Edited by 🤖 GitLab Bot 🤖