terraform/builtin/providers/aws/resource_provider.go

43 lines
881 B
Go
Raw Normal View History

2014-05-30 02:28:38 +02:00
package aws
import (
"github.com/hashicorp/terraform/terraform"
)
2014-05-30 02:28:38 +02:00
type ResourceProvider struct {
}
2014-06-13 07:39:29 +02:00
func (p *ResourceProvider) Validate(*terraform.ResourceConfig) ([]string, []error) {
return nil, nil
}
2014-06-13 07:15:36 +02:00
func (p *ResourceProvider) Configure(*terraform.ResourceConfig) error {
2014-06-07 05:17:38 +02:00
return nil
}
func (p *ResourceProvider) Diff(
s *terraform.ResourceState,
2014-06-13 07:15:36 +02:00
c *terraform.ResourceConfig) (*terraform.ResourceDiff, error) {
2014-06-10 20:34:14 +02:00
return &terraform.ResourceDiff{
Attributes: map[string]*terraform.ResourceAttrDiff{
"id": &terraform.ResourceAttrDiff{
Old: "",
NewComputed: true,
RequiresNew: true,
},
"created": &terraform.ResourceAttrDiff{
Old: "false",
New: "true",
},
},
}, nil
2014-05-30 02:28:38 +02:00
}
func (p *ResourceProvider) Resources() []terraform.ResourceType {
2014-06-10 20:34:14 +02:00
return []terraform.ResourceType{
terraform.ResourceType{
Name: "aws_instance",
},
}
}