File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ func dataSourcePagerDutyTeam() *schema.Resource {
29
29
Type : schema .TypeString ,
30
30
Optional : true ,
31
31
},
32
+ "default_role" : {
33
+ Type : schema .TypeString ,
34
+ Optional : true ,
35
+ },
32
36
},
33
37
}
34
38
}
@@ -79,6 +83,7 @@ func dataSourcePagerDutyTeamRead(d *schema.ResourceData, meta interface{}) error
79
83
d .Set ("name" , found .Name )
80
84
d .Set ("description" , found .Description )
81
85
d .Set ("parent" , found .Parent )
86
+ d .Set ("default_role" , found .DefaultRole )
82
87
83
88
return nil
84
89
})
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ func resourcePagerDutyTeam() *schema.Resource {
37
37
Type : schema .TypeString ,
38
38
Optional : true ,
39
39
},
40
+ "default_role" : {
41
+ Type : schema .TypeString ,
42
+ Optional : true ,
43
+ },
40
44
},
41
45
}
42
46
}
@@ -55,6 +59,9 @@ func buildTeamStruct(d *schema.ResourceData) *pagerduty.Team {
55
59
Type : "team_reference" ,
56
60
}
57
61
}
62
+ if attr , ok := d .GetOk ("default_role" ); ok {
63
+ team .DefaultRole = attr .(string )
64
+ }
58
65
return team
59
66
}
60
67
@@ -115,6 +122,7 @@ func resourcePagerDutyTeamRead(d *schema.ResourceData, meta interface{}) error {
115
122
d .Set ("name" , team .Name )
116
123
d .Set ("description" , team .Description )
117
124
d .Set ("html_url" , team .HTMLURL )
125
+ d .Set ("default_role" , team .DefaultRole )
118
126
}
119
127
return nil
120
128
})
You can’t perform that action at this time.
0 commit comments