Skip to content

Commit 3b5529f

Browse files
committed
remove error causing conflicts with attributes
1 parent c2d99d7 commit 3b5529f

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

redshift/provider.go

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ func Provider() *schema.Provider {
2323
Type: schema.TypeString,
2424
Description: "Name of Redshift server address to connect to.",
2525
Optional: true,
26-
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_HOST", ""),
26+
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_HOST", nil),
2727
ConflictsWith: []string{"data_api"},
2828
},
2929
"username": {
30-
Type: schema.TypeString,
31-
Optional: true,
32-
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_USER", "root"),
33-
Description: "Redshift user name to connect as.",
34-
ConflictsWith: []string{"data_api"},
30+
Type: schema.TypeString,
31+
Optional: true,
32+
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_USER", "root"),
33+
Description: "Redshift user name to connect as.",
3534
},
3635
"password": {
3736
Type: schema.TypeString,
@@ -41,15 +40,13 @@ func Provider() *schema.Provider {
4140
Sensitive: true,
4241
ConflictsWith: []string{
4342
"temporary_credentials",
44-
"data_api",
4543
},
4644
},
4745
"port": {
48-
Type: schema.TypeInt,
49-
Description: "The Redshift port number to connect to at the server host.",
50-
Optional: true,
51-
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_PORT", 5439),
52-
ConflictsWith: []string{"data_api"},
46+
Type: schema.TypeInt,
47+
Description: "The Redshift port number to connect to at the server host.",
48+
Optional: true,
49+
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_PORT", 5439),
5350
},
5451
"sslmode": {
5552
Type: schema.TypeString,
@@ -62,7 +59,6 @@ func Provider() *schema.Provider {
6259
"verify-ca",
6360
"verify-full",
6461
}, false),
65-
ConflictsWith: []string{"data_api"},
6662
},
6763
"database": {
6864
Type: schema.TypeString,
@@ -71,12 +67,11 @@ func Provider() *schema.Provider {
7167
DefaultFunc: schema.EnvDefaultFunc("REDSHIFT_DATABASE", "redshift"),
7268
},
7369
"max_connections": {
74-
Type: schema.TypeInt,
75-
Optional: true,
76-
Default: defaultProviderMaxOpenConnections,
77-
Description: "Maximum number of connections to establish to the database. Zero means unlimited.",
78-
ValidateFunc: validation.IntAtLeast(-1),
79-
ConflictsWith: []string{"data_api"},
70+
Type: schema.TypeInt,
71+
Optional: true,
72+
Default: defaultProviderMaxOpenConnections,
73+
Description: "Maximum number of connections to establish to the database. Zero means unlimited.",
74+
ValidateFunc: validation.IntAtLeast(-1),
8075
},
8176
"data_api": {
8277
Type: schema.TypeList,
@@ -85,12 +80,7 @@ func Provider() *schema.Provider {
8580
MaxItems: 1,
8681
ConflictsWith: []string{
8782
"host",
88-
"username",
8983
"password",
90-
"port",
91-
"sslmode",
92-
"max_connections",
93-
"temporary_credentials",
9484
},
9585
Elem: &schema.Resource{
9686
Schema: map[string]*schema.Schema{

0 commit comments

Comments
 (0)