Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 902ea23

Browse files
committed
~ fix default func for deprecated api urls as params
1 parent cb69250 commit 902ea23

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

gcore/provider.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ func Provider() *schema.Provider {
6161
},
6262
},
6363
"gcore_platform": {
64-
Type: schema.TypeString,
65-
Optional: true,
66-
Deprecated: "Use gcore_platform_api instead",
67-
Description: "Platform URL is used for generate JWT",
68-
DefaultFunc: schema.EnvDefaultFunc("GCORE_PLATFORM", ""),
64+
Type: schema.TypeString,
65+
Optional: true,
66+
Deprecated: "Use gcore_platform_api instead",
67+
ConflictsWith: []string{"gcore_platform_api"},
68+
Description: "Platform URL is used for generate JWT",
69+
DefaultFunc: schema.EnvDefaultFunc("GCORE_PLATFORM", nil),
6970
},
7071
"gcore_platform_api": {
7172
Type: schema.TypeString,
@@ -74,11 +75,12 @@ func Provider() *schema.Provider {
7475
DefaultFunc: schema.EnvDefaultFunc("GCORE_PLATFORM_API", ""),
7576
},
7677
"gcore_api": {
77-
Type: schema.TypeString,
78-
Optional: true,
79-
Deprecated: "Use gcore_cloud_api instead",
80-
Description: "Region API",
81-
DefaultFunc: schema.EnvDefaultFunc("GCORE_API", ""),
78+
Type: schema.TypeString,
79+
Optional: true,
80+
Deprecated: "Use gcore_cloud_api instead",
81+
ConflictsWith: []string{"gcore_cloud_api"},
82+
Description: "Region API",
83+
DefaultFunc: schema.EnvDefaultFunc("GCORE_API", nil),
8284
},
8385
"gcore_cloud_api": {
8486
Type: schema.TypeString,

0 commit comments

Comments
 (0)