Beispiel #1
0
var ec2EbsBlockDevice = NestedResource{
	Description: "Elastic Block Store Block Device",
	Properties: Properties{
		"DeleteOnTermination": Schema{
			Type:    ValueBool,
			Default: true,
		},

		"Encrypted": Schema{
			Type: ValueBool,
		},

		"Iops": Schema{
			Type:         ValueNumber,
			Required:     constraints.PropertyIs("VolumeType", "io1"),
			Conflicts:    constraints.PropertyNot("VolumeType", "io1"),
			ValidateFunc: IntegerRangeValidate(100, 2000),
		},

		"SnapshotId": Schema{
			Type: SnapshotID,
			// TODO: Required: Conditional If you specify both SnapshotId and VolumeSize, VolumeSize must be equal or greater than the size of the snapshot.
		},

		"VolumeSize": Schema{
			Type:         ValueNumber,
			ValidateFunc: IntegerRangeValidate(1, 1024),
			// TODO: If the volume type is io1, the minimum value is 10.
			// TODO: Required: Conditional If you specify both SnapshotId and VolumeSize, VolumeSize must be equal or greater than the size of the snapshot.
		},
Beispiel #2
0
			Default:   "Average",
			Conflicts: constraints.PropertyIs("PolicyType", "SimpleScaling"),
		},

		"MinAdjustmentMagnitude": Schema{
			Type: ValueNumber,
		},

		"MinAdjustmentStep": Schema{
			Deprecated: deprecations.Deprecated("MinAdjustmentStep is deprecated, use the MinAdjustmentMagnitude property instead."),
		},

		"PolicyType": Schema{
			Type:    policyType,
			Default: "SimpleScaling",
		},

		"ScalingAdjustment": Schema{
			Type:      ValueNumber,
			Required:  constraints.PropertyIs("PolicyType", "SimpleScaling"),
			Conflicts: constraints.Not(constraints.PropertyIs("PolicyType", "SimpleScaling")),
		},

		"StepAdjustments": Schema{
			Type:      Multiple(stepAdjustment),
			Required:  constraints.PropertyIs("PolicyType", "StepScaling"),
			Conflicts: constraints.PropertyNot("PolicyType", "StepScaling"),
		},
	},
}