| <aid="expand_template_rule-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <aid="expand_template_rule-data"></a>data | List of targets for additional lookup information. | <ahref="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <aid="expand_template_rule-out"></a>out | Where to write the expanded file.<br><br>If the `template` is a source file, then `out` defaults to be named the same as the template file and outputted to the same workspace-relative path. In this case there will be no pre-declared label for the output file. It can be referenced by the target label instead. This pattern is similar to `copy_to_bin` but with substitutions on the copy.<br><br>Otherwise, `out` defaults to `[name].txt`. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <aid="expand_template_rule-is_executable"></a>is_executable | Whether to mark the output file as executable. | Boolean | optional | `False` |
| <aid="expand_template_rule-stamp"></a>stamp | Whether to encode build information into the output. Possible values:<br><br>- `stamp = 1`: Always stamp the build information into the output, even in [--nostamp](https://docs.bazel.build/versions/main/user-manual.html#flag--stamp) builds. This setting should be avoided, since it is non-deterministic. It potentially causes remote cache misses for the target and any downstream actions that depend on the result. - `stamp = 0`: Never stamp, instead replace build information by constant values. This gives good build result caching. - `stamp = -1`: Embedding of build information is controlled by the [--[no]stamp](https://docs.bazel.build/versions/main/user-manual.html#flag--stamp) flag. Stamped targets are not rebuilt unless their dependencies change. | Integer | optional | `-1` |
| <aid="expand_template_rule-stamp_substitutions"></a>stamp_substitutions | Mapping of strings to substitutions.<br><br>There are overlaid on top of substitutions when stamping is enabled for the target.<br><br>Substitutions can contain $(execpath :target) and $(rootpath :target) expansions, $(MAKEVAR) expansions and {{STAMP_VAR}} expansions when stamping is enabled for the target. | <ahref="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `{}` |
| <aid="expand_template_rule-substitutions"></a>substitutions | Mapping of strings to substitutions.<br><br>Substitutions can contain $(execpath :target) and $(rootpath :target) expansions, $(MAKEVAR) expansions and {{STAMP_VAR}} expansions when stamping is enabled for the target. | <ahref="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `{}` |
| <aid="expand_template-name"></a>name | name of resulting rule | none |
| <aid="expand_template-template"></a>template | the label of a template file, or a list of strings which are lines representing the content of the template. | none |