mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-08 15:13:56 -06:00
6c71504073
A "Layer" is a particular service that forms part of the infrastructure for a set of applications. Some layers are application servers and others are pure infrastructure, like MySQL servers or load balancers. Although the AWS API only has one type called "Layer", it actually has a number of different "soft" types that each have slightly different validation rules and extra properties that are packed into the Attributes map. To make the validation rule differences explicit in Terraform, and to make the Terraform structure more closely resemble the OpsWorks UI than its API, we use a separate resource type per layer type, with the common code factored out into a shared struct type.
18 lines
374 B
Go
18 lines
374 B
Go
package aws
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform/helper/schema"
|
|
)
|
|
|
|
func resourceAwsOpsworksCustomLayer() *schema.Resource {
|
|
layerType := &opsworksLayerType{
|
|
TypeName: "custom",
|
|
CustomShortName: true,
|
|
|
|
// The "custom" layer type has no additional attributes
|
|
Attributes: map[string]*opsworksLayerTypeAttribute{},
|
|
}
|
|
|
|
return layerType.SchemaResource()
|
|
}
|