diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index 38c3b9af7..660679a0b 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -198,6 +198,7 @@ func resourceComputeInstanceV2Read(d *schema.ResourceData, meta interface{}) err log.Printf("[DEBUG] Retreived Server %s: %+v", d.Id(), server) + d.Set("region", d.Get("region").(string)) d.Set("name", server.Name) d.Set("access_ip_v4", server.AccessIPv4) d.Set("access_ip_v6", server.AccessIPv6) diff --git a/builtin/providers/openstack/resource_openstack_compute_keypair_v2.go b/builtin/providers/openstack/resource_openstack_compute_keypair_v2.go index 6fdaef631..e2d189a07 100644 --- a/builtin/providers/openstack/resource_openstack_compute_keypair_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_keypair_v2.go @@ -74,6 +74,7 @@ func resourceComputeKeypairV2Read(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("Error retrieving OpenStack keypair: %s", err) } + d.Set("region", d.Get("region").(string)) d.Set("name", kp.Name) d.Set("public_key", kp.PublicKey) diff --git a/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go b/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go index d6802e99d..c89686575 100644 --- a/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go @@ -76,6 +76,7 @@ func resourceComputeSecGroupV2Read(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("Error retrieving OpenStack security group: %s", err) } + d.Set("region", d.Get("region").(string)) d.Set("name", sg.Name) d.Set("description", sg.Description) diff --git a/builtin/providers/openstack/resource_openstack_compute_secgrouprule_v2.go b/builtin/providers/openstack/resource_openstack_compute_secgrouprule_v2.go index 9a890d673..fce40e621 100644 --- a/builtin/providers/openstack/resource_openstack_compute_secgrouprule_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_secgrouprule_v2.go @@ -80,6 +80,7 @@ func resourceComputeSecGroupRuleV2Create(d *schema.ResourceData, meta interface{ } d.SetId(sgr.ID) + d.Set("region", d.Get("region").(string)) d.Set("group_id", sgr.ParentGroupID) d.Set("from_port", sgr.FromPort) d.Set("to_port", sgr.ToPort) diff --git a/builtin/providers/openstack/resource_openstack_lb_member_v1.go b/builtin/providers/openstack/resource_openstack_lb_member_v1.go index 0a6f478b7..6fab4df80 100644 --- a/builtin/providers/openstack/resource_openstack_lb_member_v1.go +++ b/builtin/providers/openstack/resource_openstack_lb_member_v1.go @@ -97,6 +97,7 @@ func resourceLBMemberV1Read(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Retreived OpenStack LB Member %s: %+v", d.Id(), p) + d.Set("region", d.Get("region").(string)) d.Set("address", p.Address) d.Set("port", p.ProtocolPort) d.Set("pool_id", p.PoolID) diff --git a/builtin/providers/openstack/resource_openstack_lb_monitor_v1.go b/builtin/providers/openstack/resource_openstack_lb_monitor_v1.go index 9d82e7e26..7883aa7dc 100644 --- a/builtin/providers/openstack/resource_openstack_lb_monitor_v1.go +++ b/builtin/providers/openstack/resource_openstack_lb_monitor_v1.go @@ -131,6 +131,7 @@ func resourceLBMonitorV1Read(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Retreived OpenStack LB Monitor %s: %+v", d.Id(), m) + d.Set("region", d.Get("region").(string)) d.Set("type", m.Type) d.Set("delay", m.Delay) d.Set("timeout", m.Timeout) diff --git a/builtin/providers/openstack/resource_openstack_lb_pool_v1.go b/builtin/providers/openstack/resource_openstack_lb_pool_v1.go index c5275c6e8..219608eaf 100644 --- a/builtin/providers/openstack/resource_openstack_lb_pool_v1.go +++ b/builtin/providers/openstack/resource_openstack_lb_pool_v1.go @@ -118,6 +118,7 @@ func resourceLBPoolV1Read(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Retreived OpenStack LB Pool %s: %+v", d.Id(), p) + d.Set("region", d.Get("region").(string)) d.Set("name", p.Name) d.Set("protocol", p.Protocol) d.Set("subnet_id", p.SubnetID) diff --git a/builtin/providers/openstack/resource_openstack_lb_vip_v1.go b/builtin/providers/openstack/resource_openstack_lb_vip_v1.go index 9c49b3276..83ba829c5 100644 --- a/builtin/providers/openstack/resource_openstack_lb_vip_v1.go +++ b/builtin/providers/openstack/resource_openstack_lb_vip_v1.go @@ -143,6 +143,7 @@ func resourceLBVipV1Read(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Retreived OpenStack LB VIP %s: %+v", d.Id(), p) + d.Set("region", d.Get("region").(string)) d.Set("name", p.Name) d.Set("subnet_id", p.SubnetID) d.Set("protocol", p.Protocol) diff --git a/builtin/providers/openstack/resource_openstack_networking_network_v2.go b/builtin/providers/openstack/resource_openstack_networking_network_v2.go index 3c33315c7..ebb95efa4 100644 --- a/builtin/providers/openstack/resource_openstack_networking_network_v2.go +++ b/builtin/providers/openstack/resource_openstack_networking_network_v2.go @@ -109,6 +109,8 @@ func resourceNetworkingNetworkV2Read(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Retreived Network %s: %+v", d.Id(), n) + d.Set("region", d.Get("region").(string)) + if _, exists := d.GetOk("name"); exists { if d.HasChange("name") { d.Set("name", n.Name) diff --git a/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go b/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go index af25c4497..d84f532db 100644 --- a/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go +++ b/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go @@ -166,6 +166,7 @@ func resourceNetworkingSubnetV2Read(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] Retreived Subnet %s: %+v", d.Id(), s) + d.Set("region", d.Get("region").(string)) d.Set("newtork_id", s.NetworkID) d.Set("cidr", s.CIDR) d.Set("ip_version", s.IPVersion)