Skip to content

Commit c7f2591

Browse files
author
Sander van Harmelen
authored
Merge pull request #55 from terraform-providers/go1.11-upgrade-2019-01-07
[AUTOMATED] Upgrade to Go 1.11
2 parents ec25df7 + 83b7709 commit c7f2591

File tree

50 files changed

+276
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+276
-276
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
- docker
55
language: go
66
go:
7-
- 1.11.x
7+
- "1.11.x"
88

99
script:
1010
- make vet

cloudstack/provider.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,46 @@ import (
1212
func Provider() terraform.ResourceProvider {
1313
return &schema.Provider{
1414
Schema: map[string]*schema.Schema{
15-
"api_url": &schema.Schema{
15+
"api_url": {
1616
Type: schema.TypeString,
1717
Optional: true,
1818
DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_API_URL", nil),
1919
ConflictsWith: []string{"config", "profile"},
2020
},
2121

22-
"api_key": &schema.Schema{
22+
"api_key": {
2323
Type: schema.TypeString,
2424
Optional: true,
2525
DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_API_KEY", nil),
2626
ConflictsWith: []string{"config", "profile"},
2727
},
2828

29-
"secret_key": &schema.Schema{
29+
"secret_key": {
3030
Type: schema.TypeString,
3131
Optional: true,
3232
DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_SECRET_KEY", nil),
3333
ConflictsWith: []string{"config", "profile"},
3434
},
3535

36-
"config": &schema.Schema{
36+
"config": {
3737
Type: schema.TypeString,
3838
Optional: true,
3939
ConflictsWith: []string{"api_url", "api_key", "secret_key"},
4040
},
4141

42-
"profile": &schema.Schema{
42+
"profile": {
4343
Type: schema.TypeString,
4444
Optional: true,
4545
ConflictsWith: []string{"api_url", "api_key", "secret_key"},
4646
},
4747

48-
"http_get_only": &schema.Schema{
48+
"http_get_only": {
4949
Type: schema.TypeBool,
5050
Required: true,
5151
DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_HTTP_GET_ONLY", false),
5252
},
5353

54-
"timeout": &schema.Schema{
54+
"timeout": {
5555
Type: schema.TypeInt,
5656
Required: true,
5757
DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_TIMEOUT", 900),

cloudstack/resource_cloudstack_affinity_group.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ func resourceCloudStackAffinityGroup() *schema.Resource {
1919
},
2020

2121
Schema: map[string]*schema.Schema{
22-
"name": &schema.Schema{
22+
"name": {
2323
Type: schema.TypeString,
2424
Required: true,
2525
ForceNew: true,
2626
},
2727

28-
"description": &schema.Schema{
28+
"description": {
2929
Type: schema.TypeString,
3030
Optional: true,
3131
Computed: true,
3232
ForceNew: true,
3333
},
3434

35-
"type": &schema.Schema{
35+
"type": {
3636
Type: schema.TypeString,
3737
Required: true,
3838
ForceNew: true,
3939
},
4040

41-
"project": &schema.Schema{
41+
"project": {
4242
Type: schema.TypeString,
4343
Optional: true,
4444
ForceNew: true,

cloudstack/resource_cloudstack_affinity_group_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccCloudStackAffinityGroup_basic(t *testing.T) {
1717
Providers: testAccProviders,
1818
CheckDestroy: testAccCheckCloudStackAffinityGroupDestroy,
1919
Steps: []resource.TestStep{
20-
resource.TestStep{
20+
{
2121
Config: testAccCloudStackAffinityGroup,
2222
Check: resource.ComposeTestCheckFunc(
2323
testAccCheckCloudStackAffinityGroupExists("cloudstack_affinity_group.foo", &affinityGroup),
@@ -34,11 +34,11 @@ func TestAccCloudStackAffinityGroup_import(t *testing.T) {
3434
Providers: testAccProviders,
3535
CheckDestroy: testAccCheckCloudStackAffinityGroupDestroy,
3636
Steps: []resource.TestStep{
37-
resource.TestStep{
37+
{
3838
Config: testAccCloudStackAffinityGroup,
3939
},
4040

41-
resource.TestStep{
41+
{
4242
ResourceName: "cloudstack_affinity_group.foo",
4343
ImportState: true,
4444
ImportStateVerify: true,

cloudstack/resource_cloudstack_disk.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,54 +19,54 @@ func resourceCloudStackDisk() *schema.Resource {
1919
},
2020

2121
Schema: map[string]*schema.Schema{
22-
"name": &schema.Schema{
22+
"name": {
2323
Type: schema.TypeString,
2424
Required: true,
2525
ForceNew: true,
2626
},
2727

28-
"attach": &schema.Schema{
28+
"attach": {
2929
Type: schema.TypeBool,
3030
Optional: true,
3131
Default: false,
3232
},
3333

34-
"device_id": &schema.Schema{
34+
"device_id": {
3535
Type: schema.TypeInt,
3636
Optional: true,
3737
Computed: true,
3838
},
3939

40-
"disk_offering": &schema.Schema{
40+
"disk_offering": {
4141
Type: schema.TypeString,
4242
Optional: true,
4343
},
4444

45-
"size": &schema.Schema{
45+
"size": {
4646
Type: schema.TypeInt,
4747
Optional: true,
4848
Computed: true,
4949
},
5050

51-
"shrink_ok": &schema.Schema{
51+
"shrink_ok": {
5252
Type: schema.TypeBool,
5353
Optional: true,
5454
Default: false,
5555
},
5656

57-
"virtual_machine_id": &schema.Schema{
57+
"virtual_machine_id": {
5858
Type: schema.TypeString,
5959
Optional: true,
6060
},
6161

62-
"project": &schema.Schema{
62+
"project": {
6363
Type: schema.TypeString,
6464
Optional: true,
6565
Computed: true,
6666
ForceNew: true,
6767
},
6868

69-
"zone": &schema.Schema{
69+
"zone": {
7070
Type: schema.TypeString,
7171
Required: true,
7272
ForceNew: true,

cloudstack/resource_cloudstack_disk_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccCloudStackDisk_basic(t *testing.T) {
1717
Providers: testAccProviders,
1818
CheckDestroy: testAccCheckCloudStackDiskDestroy,
1919
Steps: []resource.TestStep{
20-
resource.TestStep{
20+
{
2121
Config: testAccCloudStackDisk_basic,
2222
Check: resource.ComposeTestCheckFunc(
2323
testAccCheckCloudStackDiskExists(
@@ -38,7 +38,7 @@ func TestAccCloudStackDisk_update(t *testing.T) {
3838
Providers: testAccProviders,
3939
CheckDestroy: testAccCheckCloudStackDiskDestroy,
4040
Steps: []resource.TestStep{
41-
resource.TestStep{
41+
{
4242
Config: testAccCloudStackDisk_update,
4343
Check: resource.ComposeTestCheckFunc(
4444
testAccCheckCloudStackDiskExists(
@@ -47,7 +47,7 @@ func TestAccCloudStackDisk_update(t *testing.T) {
4747
),
4848
},
4949

50-
resource.TestStep{
50+
{
5151
Config: testAccCloudStackDisk_resize,
5252
Check: resource.ComposeTestCheckFunc(
5353
testAccCheckCloudStackDiskExists(
@@ -69,7 +69,7 @@ func TestAccCloudStackDisk_deviceID(t *testing.T) {
6969
Providers: testAccProviders,
7070
CheckDestroy: testAccCheckCloudStackDiskDestroy,
7171
Steps: []resource.TestStep{
72-
resource.TestStep{
72+
{
7373
Config: testAccCloudStackDisk_deviceID,
7474
Check: resource.ComposeTestCheckFunc(
7575
testAccCheckCloudStackDiskExists(
@@ -89,11 +89,11 @@ func TestAccCloudStackDisk_import(t *testing.T) {
8989
Providers: testAccProviders,
9090
CheckDestroy: testAccCheckCloudStackDiskDestroy,
9191
Steps: []resource.TestStep{
92-
resource.TestStep{
92+
{
9393
Config: testAccCloudStackDisk_basic,
9494
},
9595

96-
resource.TestStep{
96+
{
9797
ResourceName: "cloudstack_disk.foo",
9898
ImportState: true,
9999
ImportStateVerify: true,

cloudstack/resource_cloudstack_egress_firewall.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,63 +20,63 @@ func resourceCloudStackEgressFirewall() *schema.Resource {
2020
Delete: resourceCloudStackEgressFirewallDelete,
2121

2222
Schema: map[string]*schema.Schema{
23-
"network_id": &schema.Schema{
23+
"network_id": {
2424
Type: schema.TypeString,
2525
Required: true,
2626
ForceNew: true,
2727
},
2828

29-
"managed": &schema.Schema{
29+
"managed": {
3030
Type: schema.TypeBool,
3131
Optional: true,
3232
Default: false,
3333
},
3434

35-
"rule": &schema.Schema{
35+
"rule": {
3636
Type: schema.TypeSet,
3737
Optional: true,
3838
Elem: &schema.Resource{
3939
Schema: map[string]*schema.Schema{
40-
"cidr_list": &schema.Schema{
40+
"cidr_list": {
4141
Type: schema.TypeSet,
4242
Required: true,
4343
Elem: &schema.Schema{Type: schema.TypeString},
4444
Set: schema.HashString,
4545
},
4646

47-
"protocol": &schema.Schema{
47+
"protocol": {
4848
Type: schema.TypeString,
4949
Required: true,
5050
},
5151

52-
"icmp_type": &schema.Schema{
52+
"icmp_type": {
5353
Type: schema.TypeInt,
5454
Optional: true,
5555
Computed: true,
5656
},
5757

58-
"icmp_code": &schema.Schema{
58+
"icmp_code": {
5959
Type: schema.TypeInt,
6060
Optional: true,
6161
Computed: true,
6262
},
6363

64-
"ports": &schema.Schema{
64+
"ports": {
6565
Type: schema.TypeSet,
6666
Optional: true,
6767
Elem: &schema.Schema{Type: schema.TypeString},
6868
Set: schema.HashString,
6969
},
7070

71-
"uuids": &schema.Schema{
71+
"uuids": {
7272
Type: schema.TypeMap,
7373
Computed: true,
7474
},
7575
},
7676
},
7777
},
7878

79-
"parallelism": &schema.Schema{
79+
"parallelism": {
8080
Type: schema.TypeInt,
8181
Optional: true,
8282
Default: 2,

cloudstack/resource_cloudstack_egress_firewall_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccCloudStackEgressFirewall_basic(t *testing.T) {
1616
Providers: testAccProviders,
1717
CheckDestroy: testAccCheckCloudStackEgressFirewallDestroy,
1818
Steps: []resource.TestStep{
19-
resource.TestStep{
19+
{
2020
Config: testAccCloudStackEgressFirewall_basic,
2121
Check: resource.ComposeTestCheckFunc(
2222
testAccCheckCloudStackEgressFirewallRulesExist("cloudstack_egress_firewall.foo"),
@@ -40,7 +40,7 @@ func TestAccCloudStackEgressFirewall_update(t *testing.T) {
4040
Providers: testAccProviders,
4141
CheckDestroy: testAccCheckCloudStackEgressFirewallDestroy,
4242
Steps: []resource.TestStep{
43-
resource.TestStep{
43+
{
4444
Config: testAccCloudStackEgressFirewall_basic,
4545
Check: resource.ComposeTestCheckFunc(
4646
testAccCheckCloudStackEgressFirewallRulesExist("cloudstack_egress_firewall.foo"),
@@ -55,7 +55,7 @@ func TestAccCloudStackEgressFirewall_update(t *testing.T) {
5555
),
5656
},
5757

58-
resource.TestStep{
58+
{
5959
Config: testAccCloudStackEgressFirewall_update,
6060
Check: resource.ComposeTestCheckFunc(
6161
testAccCheckCloudStackEgressFirewallRulesExist("cloudstack_egress_firewall.foo"),

0 commit comments

Comments
 (0)