Skip to content

Commit 4ef557b

Browse files
committed
deps: Update jen20/riviera
1 parent f6bee13 commit 4ef557b

18 files changed

Lines changed: 500 additions & 4 deletions

Godeps/Godeps.json

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builtin/providers/azurerm/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
129129
func registerAzureResourceProvidersWithSubscription(config *Config, client *ArmClient) error {
130130
providerClient := client.providers
131131

132-
providers := []string{"Microsoft.Network", "Microsoft.Compute", "Microsoft.Cdn", "Microsoft.Storage"}
132+
providers := []string{"Microsoft.Network", "Microsoft.Compute", "Microsoft.Cdn", "Microsoft.Storage", "Microsoft.Sql"}
133133

134134
for _, v := range providers {
135135
res, err := providerClient.Register(v)

builtin/providers/azurerm/resource_arm_sql_server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func resourceArmSqlServerCreate(d *schema.ResourceData, meta interface{}) error
6666
rivieraClient := client.rivieraClient
6767

6868
tags := d.Get("tags").(map[string]interface{})
69+
expandedTags := expandTags(tags)
6970

7071
createRequest := rivieraClient.NewRequest()
7172
createRequest.Command = &sql.CreateOrUpdateServer{
@@ -75,7 +76,7 @@ func resourceArmSqlServerCreate(d *schema.ResourceData, meta interface{}) error
7576
AdministratorLogin: azure.String(d.Get("administrator_login").(string)),
7677
AdministratorLoginPassword: azure.String(d.Get("administrator_login_password").(string)),
7778
Version: azure.String(d.Get("version").(string)),
78-
Tags: expandTags(tags),
79+
Tags: *expandedTags,
7980
}
8081

8182
createResponse, err := createRequest.Execute()

builtin/providers/azurerm/resource_arm_sql_server_test.go

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,37 @@ func TestAccAzureRMSqlServer_basic(t *testing.T) {
2929
})
3030
}
3131

32+
func TestAccAzureRMSqlServer_withTags(t *testing.T) {
33+
ri := acctest.RandInt()
34+
preConfig := fmt.Sprintf(testAccAzureRMSqlServer_withTags, ri, ri)
35+
postConfig := fmt.Sprintf(testAccAzureRMSqlServer_withTagsUpdated, ri, ri)
36+
37+
resource.Test(t, resource.TestCase{
38+
PreCheck: func() { testAccPreCheck(t) },
39+
Providers: testAccProviders,
40+
CheckDestroy: testCheckAzureRMSqlServerDestroy,
41+
Steps: []resource.TestStep{
42+
resource.TestStep{
43+
Config: preConfig,
44+
Check: resource.ComposeTestCheckFunc(
45+
testCheckAzureRMSqlServerExists("azurerm_sql_server.test"),
46+
resource.TestCheckResourceAttr(
47+
"azurerm_sql_server.test", "tags.#", "2"),
48+
),
49+
},
50+
51+
resource.TestStep{
52+
Config: postConfig,
53+
Check: resource.ComposeTestCheckFunc(
54+
testCheckAzureRMSqlServerExists("azurerm_sql_server.test"),
55+
resource.TestCheckResourceAttr(
56+
"azurerm_sql_server.test", "tags.#", "1"),
57+
),
58+
},
59+
},
60+
})
61+
}
62+
3263
func testCheckAzureRMSqlServerExists(name string) resource.TestCheckFunc {
3364
return func(s *terraform.State) error {
3465

@@ -92,3 +123,42 @@ resource "azurerm_sql_server" "test" {
92123
administrator_login_password = "thisIsDog11"
93124
}
94125
`
126+
127+
var testAccAzureRMSqlServer_withTags = `
128+
resource "azurerm_resource_group" "test" {
129+
name = "acctest_rg_%d"
130+
location = "West US"
131+
}
132+
resource "azurerm_sql_server" "test" {
133+
name = "acctestsqlserver%d"
134+
resource_group_name = "${azurerm_resource_group.test.name}"
135+
location = "West US"
136+
version = "12.0"
137+
administrator_login = "mradministrator"
138+
administrator_login_password = "thisIsDog11"
139+
140+
tags {
141+
environment = "staging"
142+
database = "test"
143+
}
144+
}
145+
`
146+
147+
var testAccAzureRMSqlServer_withTagsUpdated = `
148+
resource "azurerm_resource_group" "test" {
149+
name = "acctest_rg_%d"
150+
location = "West US"
151+
}
152+
resource "azurerm_sql_server" "test" {
153+
name = "acctestsqlserver%d"
154+
resource_group_name = "${azurerm_resource_group.test.name}"
155+
location = "West US"
156+
version = "12.0"
157+
administrator_login = "mradministrator"
158+
administrator_login_password = "thisIsDog11"
159+
160+
tags {
161+
environment = "production"
162+
}
163+
}
164+
`

vendor/github.com/jen20/riviera/sql/api.go

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/jen20/riviera/sql/create_elastic_database_pool.go

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/jen20/riviera/sql/create_or_update_database.go

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/jen20/riviera/sql/create_or_update_firewall_rule.go

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/jen20/riviera/sql/create_or_update_server.go

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/jen20/riviera/sql/delete_database.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)