# Templating Container Version in Replicated Classic

**URL:** <https://community.replicated.com/t/templating-container-version-in-replicated-classic/1302>\
**Category:** Packaging an application\
**Tags:** replicated-classic\
**Created:** [September 26, 2023, 7:55pm UTC](https://community.replicated.com/t/templating-container-version-in-replicated-classic/1302 "2023-09-26T19:55:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@bob](https://community.replicated.com/u/bob)\
**Post date:** [September 26, 2023, 7:55pm UTC](https://community.replicated.com/t/templating-container-version-in-replicated-classic/1302/1 "2023-09-26T19:55:56Z")

</div>

Can I template the container version field in Replicated Classic? I’m trying to do something like this so we don’t need to make a release for each container version change in CI:

```auto
source: ecr
name: foo
image_name: foo
version: '{{repl if ConfigOptionEquals "foo_version" "" }}1.0.0{{repl else}}{{repl ConfigOption "foo_version" }}{{repl end}}'

```

But it’s failing during install with the following error:

> ecr/foo:{{repl if ConfigOptionEquals “foo\_version” “” }}1.0.0{{repl else}}{{repl ConfigOption “foo\_version” }}{{repl end}}: API error (400): invalid reference format

---

<div class="post-metadata">

**Author:** ![ethanm](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/ethanm/32/11_2.png) [@ethanm](https://community.replicated.com/u/ethanm)\
**Post date:** [September 27, 2023, 4:01pm UTC](https://community.replicated.com/t/templating-container-version-in-replicated-classic/1302/2 "2023-09-27T16:01:44Z")

</div>

Unfortunately you cannot use templates in the container image field. The reason for this is it would not be possible to build airgap bundles with images.
