terraform/builtin/providers/aws/resource_provider.go

39 lines
770 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-07 05:17:38 +02:00
func (p *ResourceProvider) Configure(map[string]interface{}) error {
return nil
}
func (p *ResourceProvider) Diff(
s *terraform.ResourceState,
c map[string]interface{}) (*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",
},
}
}