@@ -27,12 +27,12 @@ const (
27
27
func Provider () * schema.Provider {
28
28
return & schema.Provider {
29
29
Schema : map [string ]* schema.Schema {
30
- "user_name" : & schema. Schema {
30
+ "user_name" : {
31
31
Type : schema .TypeString ,
32
32
Optional : true ,
33
33
DefaultFunc : schema .EnvDefaultFunc ("GCORE_USERNAME" , "" ),
34
34
},
35
- "password" : & schema. Schema {
35
+ "password" : {
36
36
Type : schema .TypeString ,
37
37
Optional : true ,
38
38
DefaultFunc : schema .EnvDefaultFunc ("GCORE_PASSWORD" , "" ),
@@ -50,37 +50,37 @@ func Provider() *schema.Provider {
50
50
Description : "Should be set to true when you are gonna to use storage resource with permanent API-token only." ,
51
51
DefaultFunc : schema .EnvDefaultFunc ("GCORE_PERMANENT_TOKEN" , "" ),
52
52
},
53
- "gcore_platform" : & schema. Schema {
53
+ "gcore_platform" : {
54
54
Type : schema .TypeString ,
55
55
Optional : true ,
56
56
Description : "Platform ulr is used for generate jwt" ,
57
- DefaultFunc : schema .EnvDefaultFunc ("GCORE_PLATFORM" , "" ),
57
+ DefaultFunc : schema .EnvDefaultFunc ("GCORE_PLATFORM" , "https://api.gcdn.co " ),
58
58
},
59
- "gcore_api" : & schema. Schema {
59
+ "gcore_api" : {
60
60
Type : schema .TypeString ,
61
61
Optional : true ,
62
62
Description : "Region API" ,
63
- DefaultFunc : schema .EnvDefaultFunc ("GCORE_API" , "" ),
63
+ DefaultFunc : schema .EnvDefaultFunc ("GCORE_API" , "https://api.cloud.gcorelabs.com " ),
64
64
},
65
- "gcore_cdn_api" : & schema. Schema {
65
+ "gcore_cdn_api" : {
66
66
Type : schema .TypeString ,
67
67
Optional : true ,
68
68
Description : "CDN API" ,
69
69
DefaultFunc : schema .EnvDefaultFunc ("GCORE_CDN_API" , "" ),
70
70
},
71
- "gcore_storage_api" : & schema. Schema {
71
+ "gcore_storage_api" : {
72
72
Type : schema .TypeString ,
73
73
Optional : true ,
74
74
Description : "Storage API" ,
75
- DefaultFunc : schema .EnvDefaultFunc ("GCORE_STORAGE_API" , "" ),
75
+ DefaultFunc : schema .EnvDefaultFunc ("GCORE_STORAGE_API" , "https://storage.gcorelabs.com/api " ),
76
76
},
77
77
"gcore_dns_api" : {
78
78
Type : schema .TypeString ,
79
79
Optional : true ,
80
80
Description : "DNS API" ,
81
- DefaultFunc : schema .EnvDefaultFunc ("GCORE_DNS_API" , "" ),
81
+ DefaultFunc : schema .EnvDefaultFunc ("GCORE_DNS_API" , "https://dnsapi.gcorelabs.com " ),
82
82
},
83
- "gcore_client_id" : & schema. Schema {
83
+ "gcore_client_id" : {
84
84
Type : schema .TypeString ,
85
85
Optional : true ,
86
86
Description : "Client id" ,
@@ -143,7 +143,7 @@ func Provider() *schema.Provider {
143
143
}
144
144
}
145
145
146
- func providerConfigure (ctx context.Context , d * schema.ResourceData ) (interface {}, diag.Diagnostics ) {
146
+ func providerConfigure (_ context.Context , d * schema.ResourceData ) (interface {}, diag.Diagnostics ) {
147
147
username := d .Get ("user_name" ).(string )
148
148
password := d .Get ("password" ).(string )
149
149
permanentToken := d .Get (ProviderOptPermanentToken ).(string )
0 commit comments