Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meaning of DeployTimeConstant flag? #32

Closed
rjmholt opened this issue Nov 20, 2020 · 2 comments
Closed

Meaning of DeployTimeConstant flag? #32

rjmholt opened this issue Nov 20, 2020 · 2 comments

Comments

@rjmholt
Copy link

rjmholt commented Nov 20, 2020

I'm just looking at the ObjectPropertyFlags on various types and I feel like most of them are relatively self-explanatory (although if you've got time I'd love a description of all of them), but I'm curious about DeployTimeConstant -- what does that signify?

For reference I'm talking about this enum:

[Flags]
public enum ObjectPropertyFlags
{
None = 0,
Required = 1 << 0,
ReadOnly = 1 << 1,
WriteOnly = 1 << 2,
DeployTimeConstant = 1 << 3,
}

@majastrz
Copy link
Member

In our runtime, expressions are evaluated at the beginning of the deployment and during the deployment of each individual resource. The latter part is used to evaluate functions like listKeys() or reference() because the return value may depend on resources that were deployed by the same template.

If a property of a resource has the DeployTimeConstant flag, it means that expressions containing those functions cannot be assigned to the property. In other words, the expression has to evaluate upfront without dependencies on other resources and remains a constant during the deployment of the resource.

@anthony-c-martin
Copy link
Member

Closing this out - feel free to raise a new issue if you've got any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants