File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ func Provider() *schema.Provider {
1818 p := & schema.Provider {
1919 Schema : map [string ]* schema.Schema {
2020 "token" : {
21- Type : schema .TypeString ,
22- Optional : true ,
23- DefaultFunc : schema .EnvDefaultFunc ("GITHUB_TOKEN" , nil ),
24- Description : descriptions ["token" ],
25- ConflictsWith : []string {"app_auth" },
21+ Type : schema .TypeString ,
22+ Optional : true ,
23+ DefaultFunc : schema .EnvDefaultFunc ("GITHUB_TOKEN" , nil ),
24+ Description : descriptions ["token" ],
25+ ExactlyOneOf : []string {"app_auth" },
2626 },
2727 "owner" : {
2828 Type : schema .TypeString ,
@@ -94,11 +94,11 @@ func Provider() *schema.Provider {
9494 Description : descriptions ["parallel_requests" ],
9595 },
9696 "app_auth" : {
97- Type : schema .TypeList ,
98- Optional : true ,
99- MaxItems : 1 ,
100- Description : descriptions ["app_auth" ],
101- ConflictsWith : []string {"token" },
97+ Type : schema .TypeList ,
98+ Optional : true ,
99+ MaxItems : 1 ,
100+ Description : descriptions ["app_auth" ],
101+ ExactlyOneOf : []string {"token" },
102102 Elem : & schema.Resource {
103103 Schema : map [string ]* schema.Schema {
104104 "id" : {
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ func TestAccProviderConfigure(t *testing.T) {
245245 Steps : []resource.TestStep {
246246 {
247247 Config : config ,
248- ExpectError : regexp .MustCompile ("\" app_auth \" : conflicts with token" ),
248+ ExpectError : regexp .MustCompile ("only one of `app_auth, token` can be specified " ),
249249 },
250250 },
251251 })
@@ -270,7 +270,7 @@ func TestAccProviderConfigure(t *testing.T) {
270270 Steps : []resource.TestStep {
271271 {
272272 Config : config ,
273- ExpectError : regexp .MustCompile ("\" app_auth \" : conflicts with token" ),
273+ ExpectError : regexp .MustCompile ("only one of `app_auth, token` can be specified " ),
274274 },
275275 },
276276 })
You can’t perform that action at this time.
0 commit comments