providers/aws: instance_tenancy is computed, set
This commit is contained in:
parent
cfa5a3fe58
commit
35f4201b9e
|
@ -31,6 +31,7 @@ func resourceAwsVpc() *schema.Resource {
|
|||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"enable_dns_hostnames": &schema.Schema{
|
||||
|
@ -140,6 +141,7 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error {
|
|||
vpcid := d.Id()
|
||||
d.Set("cidr_block", vpc.CidrBlock)
|
||||
d.Set("dhcp_options_id", vpc.DhcpOptionsId)
|
||||
d.Set("instance_tenancy", vpc.InstanceTenancy)
|
||||
|
||||
// Tags
|
||||
d.Set("tags", tagsToMap(vpc.Tags))
|
||||
|
|
|
@ -289,7 +289,14 @@ func testIDOnlyRefresh(opts terraform.ContextOpts, r *terraform.ResourceState) e
|
|||
}
|
||||
|
||||
// Verify attribute equivalence.
|
||||
actual := state.RootModule().Resources[name].Primary.Attributes
|
||||
actualR := state.RootModule().Resources[name]
|
||||
if actualR == nil {
|
||||
return fmt.Errorf("Resource gone!")
|
||||
}
|
||||
if actualR.Primary == nil {
|
||||
return fmt.Errorf("Resource has no primary instance")
|
||||
}
|
||||
actual := actualR.Primary.Attributes
|
||||
expected := r.Primary.Attributes
|
||||
if !reflect.DeepEqual(actual, expected) {
|
||||
// Determine only the different attributes
|
||||
|
|
Loading…
Reference in New Issue