mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
providers/aws: compile
This commit is contained in:
parent
175e455999
commit
5dbfed31b6
@ -4,6 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/config"
|
||||
"github.com/hashicorp/terraform/helper/multierror"
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
"github.com/mitchellh/goamz/ec2"
|
||||
)
|
||||
@ -18,6 +19,11 @@ func (p *ResourceProvider) Validate(c *terraform.ResourceConfig) ([]string, []er
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (p *ResourceProvider) ValidateResource(
|
||||
t string, c *terraform.ResourceConfig) ([]string, []error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (p *ResourceProvider) Configure(c *terraform.ResourceConfig) error {
|
||||
if _, err := config.Decode(&p.Config, c.Config); err != nil {
|
||||
return err
|
||||
@ -44,7 +50,7 @@ func (p *ResourceProvider) Configure(c *terraform.ResourceConfig) error {
|
||||
}
|
||||
|
||||
if len(errs) > 0 {
|
||||
return &terraform.MultiError{Errors: errs}
|
||||
return &multierror.Error{Errors: errs}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -109,18 +109,18 @@ func resource_aws_instance_diff(
|
||||
c *terraform.ResourceConfig,
|
||||
meta interface{}) (*terraform.ResourceDiff, error) {
|
||||
b := &diff.ResourceBuilder{
|
||||
CreateComputedAttrs: []string{
|
||||
Attrs: map[string]diff.AttrType{
|
||||
"ami": diff.AttrTypeCreate,
|
||||
"availability_zone": diff.AttrTypeCreate,
|
||||
"instance_type": diff.AttrTypeCreate,
|
||||
},
|
||||
|
||||
ComputedAttrs: []string{
|
||||
"public_dns",
|
||||
"public_ip",
|
||||
"private_dns",
|
||||
"private_ip",
|
||||
},
|
||||
|
||||
RequiresNewAttrs: []string{
|
||||
"ami",
|
||||
"availability_zone",
|
||||
"instance_type",
|
||||
},
|
||||
}
|
||||
|
||||
return b.Diff(s, c)
|
||||
|
Loading…
Reference in New Issue
Block a user