    public sealed class TerraformVariableValidation : IMessage<TerraformVariableValidation>, IEquatable<TerraformVariableValidation>, IDeepCloneable<TerraformVariableValidation>, IBufferMessage, IMessage

Reference documentation and code samples for the Design Center v1 API class TerraformVariableValidation.

Represents a custom validation rule defined on a Terraform input variable.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> TerraformVariableValidation

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TerraformVariableValidation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.TerraformVariableValidation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TerraformVariableValidation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.TerraformVariableValidation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TerraformVariableValidation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.TerraformVariableValidation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.DesignCenter.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1)

## Assembly

Google.Cloud.DesignCenter.V1.dll

## Constructors

### TerraformVariableValidation()

    public TerraformVariableValidation()

### TerraformVariableValidation(TerraformVariableValidation)

    public TerraformVariableValidation(TerraformVariableValidation other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.TerraformVariableValidation` |

## Properties

### Condition

    public string Condition { get; set; }

Optional. The HCL expression for the validation condition (e.g.,
"length(var.image_id) \> 4").

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ErrorMessage

    public string ErrorMessage { get; set; }

Optional. The error message displayed when the condition is false.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |