2014-05-30 02:28:38 +02:00
|
|
|
package aws
|
|
|
|
|
2014-06-03 23:26:31 +02:00
|
|
|
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
|
|
|
}
|
2014-06-03 23:26:31 +02:00
|
|
|
|
|
|
|
func (p *ResourceProvider) Resources() []terraform.ResourceType {
|
2014-06-10 20:34:14 +02:00
|
|
|
return []terraform.ResourceType{
|
|
|
|
terraform.ResourceType{
|
|
|
|
Name: "aws_instance",
|
|
|
|
},
|
|
|
|
}
|
2014-06-03 23:26:31 +02:00
|
|
|
}
|