export 'region' from 'Read' operations
This commit is contained in:
parent
46a7949c9d
commit
2214331b3c
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue