Skip to content

Commit

Permalink
megaport_mcr: set term attribute if mcr is v1.x
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitrios Karagiannis <[email protected]>
  • Loading branch information
alkar committed Feb 12, 2020
1 parent 488a951 commit 9a64786
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions megaport/resource_megaport_mcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ func resourceMegaportMcrRead(d *schema.ResourceData, m interface{}) error {
if err := d.Set("mcr_version", p.McrVersion()); err != nil {
return err
}
if p.McrVersion() == 1 {
if err := d.Set("term", int(p.ContractTermMonths)); err != nil {
return err
}
}
if err := d.Set("location_id", int(p.LocationId)); err != nil {
return err
}
Expand Down

0 comments on commit 9a64786

Please sign in to comment.