Update website/docs/language/expressions/custom-conditions.mdx

Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
laura-update-pre-post-conditions
Laura Pacilio 4 years ago committed by GitHub
parent d69cb58ff5
commit 6b986c94bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -167,7 +167,7 @@ output "api_base_url" {
You can often implement a validation check as either a postcondition of the resource producing the data or as a precondition of a resource or output value using the data. To decide which is most appropriate, consider whether the check is representing either an assumption or a guarantee.
| Type | Definition | Expression to Use |
| Type | Definition | Condition Type to Use |
| -----|------------|--------------|
| Assumption | A condition that must be true in order for the configuration of a particular resource to be usable. For example, an `aws_instance` configuration can have the assumption that the given AMI will always be configured for the `x86_64` CPU architecture. | Preconditions, so that future maintainers can find them close to the other expressions that rely on that condition. This lets them understand more about what that resource is intended to allow.|
| Guarantee | A characteristic or behavior of an object that the rest of the configuration should be able to rely on. For example, an `aws_instance` configuration can have the guarantee that an EC2 instance will be running in a network that assigns it a private DNS record. | Postconditions, so that future maintainers can find them close to the resource configuration that is responsible for implementing those guarantees. This lets them more easily determine which behaviors they should preserve when changing the configuration. |

Loading…
Cancel
Save