Skip to content

Commit

Permalink
Merge pull request petoju#64 from terraform-providers/go1.11-upgrade-…
Browse files Browse the repository at this point in the history
…2019-01-07

[AUTOMATED] Upgrade to Go 1.11
  • Loading branch information
bflad authored Jan 8, 2019
2 parents ffcbe5a + 1bcbc84 commit dec493d
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sudo: required
language: go

go:
- 1.10.x
- "1.11.x"

env:
- DB=mysql:5.6 DB_EXTRA=''
Expand Down
8 changes: 4 additions & 4 deletions mysql/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type MySQLConfiguration struct {
func Provider() terraform.ResourceProvider {
return &schema.Provider{
Schema: map[string]*schema.Schema{
"endpoint": &schema.Schema{
"endpoint": {
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("MYSQL_ENDPOINT", nil),
Expand All @@ -39,19 +39,19 @@ func Provider() terraform.ResourceProvider {
},
},

"username": &schema.Schema{
"username": {
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("MYSQL_USERNAME", nil),
},

"password": &schema.Schema{
"password": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("MYSQL_PASSWORD", nil),
},

"tls": &schema.Schema{
"tls": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("MYSQL_TLS_CONFIG", "false"),
Expand Down
6 changes: 3 additions & 3 deletions mysql/resource_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ func resourceDatabase() *schema.Resource {
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
"name": &schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"default_character_set": &schema.Schema{
"default_character_set": {
Type: schema.TypeString,
Optional: true,
Default: "utf8",
},

"default_collation": &schema.Schema{
"default_collation": {
Type: schema.TypeString,
Optional: true,
Default: "utf8_general_ci",
Expand Down
2 changes: 1 addition & 1 deletion mysql/resource_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAccDatabase(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccDatabaseCheckDestroy(dbName),
Steps: []resource.TestStep{
resource.TestStep{
{
Config: testAccDatabaseConfig_basic(dbName),
Check: testAccDatabaseCheck_basic(
"mysql_database.test", dbName,
Expand Down
18 changes: 9 additions & 9 deletions mysql/resource_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,50 @@ func resourceGrant() *schema.Resource {
Delete: DeleteGrant,

Schema: map[string]*schema.Schema{
"user": &schema.Schema{
"user": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ConflictsWith: []string{"role"},
},

"role": &schema.Schema{
"role": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ConflictsWith: []string{"user", "host"},
},

"host": &schema.Schema{
"host": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: "localhost",
ConflictsWith: []string{"role"},
},

"database": &schema.Schema{
"database": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"table": &schema.Schema{
"table": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: "*",
},

"privileges": &schema.Schema{
"privileges": {
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},

"roles": &schema.Schema{
"roles": {
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Expand All @@ -72,14 +72,14 @@ func resourceGrant() *schema.Resource {
Set: schema.HashString,
},

"grant": &schema.Schema{
"grant": {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Default: false,
},

"tls_option": &schema.Schema{
"tls_option": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Expand Down
2 changes: 1 addition & 1 deletion mysql/resource_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func resourceRole() *schema.Resource {
Delete: DeleteRole,

Schema: map[string]*schema.Schema{
"name": &schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down
12 changes: 6 additions & 6 deletions mysql/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,42 @@ func resourceUser() *schema.Resource {
Delete: DeleteUser,

Schema: map[string]*schema.Schema{
"user": &schema.Schema{
"user": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"host": &schema.Schema{
"host": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: "localhost",
},

"plaintext_password": &schema.Schema{
"plaintext_password": {
Type: schema.TypeString,
Optional: true,
Sensitive: true,
StateFunc: hashSum,
},

"password": &schema.Schema{
"password": {
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{"plaintext_password"},
Sensitive: true,
Deprecated: "Please use plaintext_password instead",
},

"auth_plugin": &schema.Schema{
"auth_plugin": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ConflictsWith: []string{"plaintext_password", "password"},
},

"tls_option": &schema.Schema{
"tls_option": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Expand Down
4 changes: 2 additions & 2 deletions mysql/resource_user_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ func resourceUserPassword() *schema.Resource {
Read: ReadUserPassword,
Delete: DeleteUserPassword,
Schema: map[string]*schema.Schema{
"user": &schema.Schema{
"user": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"host": &schema.Schema{
"host": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Expand Down
2 changes: 1 addition & 1 deletion mysql/resource_user_password_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func TestAccUserPassword_basic(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccUserCheckDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: testAccUserPasswordConfig_basic,
Check: resource.ComposeTestCheckFunc(
testAccUserExists("mysql_user.test"),
Expand Down
12 changes: 6 additions & 6 deletions mysql/resource_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestAccUser_basic(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccUserCheckDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: testAccUserConfig_basic,
Check: resource.ComposeTestCheckFunc(
testAccUserExists("mysql_user.test"),
Expand All @@ -26,7 +26,7 @@ func TestAccUser_basic(t *testing.T) {
resource.TestCheckResourceAttr("mysql_user.test", "tls_option", "NONE"),
),
},
resource.TestStep{
{
Config: testAccUserConfig_ssl,
Check: resource.ComposeTestCheckFunc(
testAccUserExists("mysql_user.test"),
Expand All @@ -36,7 +36,7 @@ func TestAccUser_basic(t *testing.T) {
resource.TestCheckResourceAttr("mysql_user.test", "tls_option", "SSL"),
),
},
resource.TestStep{
{
Config: testAccUserConfig_newPass,
Check: resource.ComposeTestCheckFunc(
testAccUserExists("mysql_user.test"),
Expand All @@ -56,7 +56,7 @@ func TestAccUser_auth(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccUserCheckDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: testAccUserConfig_auth_iam_plugin,
Check: resource.ComposeTestCheckFunc(
testAccUserAuthExists("mysql_user.test"),
Expand All @@ -75,7 +75,7 @@ func TestAccUser_deprecated(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccUserCheckDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: testAccUserConfig_deprecated,
Check: resource.ComposeTestCheckFunc(
testAccUserExists("mysql_user.test"),
Expand All @@ -84,7 +84,7 @@ func TestAccUser_deprecated(t *testing.T) {
resource.TestCheckResourceAttr("mysql_user.test", "password", "password"),
),
},
resource.TestStep{
{
Config: testAccUserConfig_deprecated_newPass,
Check: resource.ComposeTestCheckFunc(
testAccUserExists("mysql_user.test"),
Expand Down

0 comments on commit dec493d

Please sign in to comment.