<p>Using <code>values:</code> is a way to restrict what can be passed into the parameters. For this reason, there isn't a way to wildcard an input value.</p>
<p>Since what you want to do is allow anything but default to 'release candidate' if nothing is provided, you really only need <code>default:</code> and can remove the <code>values:</code> restriction.</p>

CC BY-SA 4.0
2023-08-11T16:53:57.120Z
2023-08-11T16:53:57.120Z
Matthew Robertson
<p>In my pipeline definition, for getting resources from other pipeline, I'd like to define a default tags value to use, such as &quot;release candidate&quot;, but allow to select to use any tags or even without tag. Is there a simple way to do so?</p>
<p>Here's my attempt but seems like &quot;*&quot; doesn't work:(</p>
<pre><code>parameters:
- name: TagsToUse
  displayName: 'Select the tags to use for artifact from pipeline xxxx'
  type: string
  default: 'release candidate'
  values:
  - 'release candidate'
  - '*'

resources:
  pipelines:
  - pipeline: xxxx
    project: 'MyProject'
    source: 'TargetSource'
    branch: 'master'
    tags: ${{ parameters.TagsToUse }}
...
...
...
</code></pre>

CC BY-SA 4.0
2023-07-27T10:37:28.207Z
My gut feeling is you can't. Not everything in yaml pipelines is equal or interpreted the same way. You could try a [condition](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#conditional-insertion) but I think it might not be valid `- ${{ if ne(parameters.tags, '*') }}:`
ste-fu
CC BY-SA 4.0
2023-07-31T13:35:13.103Z
hum... thanks for your answer.
Weishan Yang
<azure-devops><azure-pipelines><build-pipeline><yaml><pipeline>
How to specify ANY for tags in the yaml file for pipelines
Weishan Yang
# How to specify ANY for tags in the yaml file for pipelines

(Asked by: username_0 on 2023-07-20)

In my pipeline definition, for getting resources from other pipeline, I'd like to define a default tags value to use, such as "release candidate", but allow to select to use any tags or even without tag. Is there a simple way to do so?
Here's my attempt but seems like "*" doesn't work:(
parameters:
- name: TagsToUse
  displayName: 'Select the tags to use for artifact from pipeline xxxx'
  type: string
  default: 'release candidate'
  values:
  - 'release candidate'
  - '*'

resources:
  pipelines:
  - pipeline: xxxx
    project: 'MyProject'
    source: 'TargetSource'
    branch: 'master'
    tags: ${{ parameters.TagsToUse }}
...
...
...

**Tags:** azure-devops, azure-pipelines, build-pipeline, yaml, pipeline

> **Comments:**
> **username_1**: My gut feeling is you can't. Not everything in yaml pipelines is equal or interpreted the same way. You could try a [condition](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#conditional-insertion) but I think it might not be valid `- ${{ if ne(parameters.tags, '*') }}:`  
> **username_0**: hum... thanks for your answer.  

---

## 1 answers

### Answer by username_2 on 2023-08-11. Score: 0

Using `values:` is a way to restrict what can be passed into the parameters. For this reason, there isn't a way to wildcard an input value.

Since what you want to do is allow anything but default to 'release candidate' if nothing is provided, you really only need `default:` and can remove the `values:` restriction.


---

