Skip to content

Commit 13bf96c

Browse files
uibmhkantare
authored andcommitted
vpc-go-sdk migration to 0.14.0
1 parent 6c8aa91 commit 13bf96c

File tree

5 files changed

+13
-20
lines changed

5 files changed

+13
-20
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/IBM/scc-go-sdk v1.3.3
2525
github.com/IBM/schematics-go-sdk v0.1.3
2626
github.com/IBM/secrets-manager-go-sdk v0.1.19
27-
github.com/IBM/vpc-go-sdk v0.13.0
27+
github.com/IBM/vpc-go-sdk v0.14.0
2828
github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56 // indirect
2929
github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5
3030
github.com/Shopify/sarama v1.29.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ github.com/IBM/schematics-go-sdk v0.1.3 h1:8/2+aOlhdj5BX3bddtYiLRts5kBo8zT9hcOWq
9595
github.com/IBM/schematics-go-sdk v0.1.3/go.mod h1:tKRsoiYvm6l/7ZV/L1aY84PnQZExrXIJBowwSE7oBg4=
9696
github.com/IBM/secrets-manager-go-sdk v0.1.19 h1:0GPs5EoTaWNsjo4QPj64GNxlWfN8VHJy4RDFLqddSe8=
9797
github.com/IBM/secrets-manager-go-sdk v0.1.19/go.mod h1:eO3dBhzPrHkkt+yPex/jB2xD6qHZxBko+Aw+0tfqHeA=
98-
github.com/IBM/vpc-go-sdk v0.13.0 h1:wpnFiNCEODLojZua/uR1C47OXZYHXDpJz3/YF7LvlVw=
99-
github.com/IBM/vpc-go-sdk v0.13.0/go.mod h1:B3Pgkwb0tQqTeIojR1MFLp96qW7cKnWyJ74jbAJgdbk=
98+
github.com/IBM/vpc-go-sdk v0.14.0 h1:2uIhMiNiAJC8XiNkjhiMeMGBJlPU0jqE8KON2fvfSZI=
99+
github.com/IBM/vpc-go-sdk v0.14.0/go.mod h1:mIUjxBs5viRWIiCqfO/W4HPJ7aC6M+26mR4p5gaVls8=
100100
github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56 h1:vuquMR410psHNax14XKNWa0Ae/kYgWJcXi0IFuX60N0=
101101
github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56/go.mod h1:Zb3OT4l0mf7P/GOs2w2Ilj5sdm5Whoq3pa24dAEBHFc=
102102
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=

ibm/data_source_ibm_is_ssh_key.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ func keyGetByName(d *schema.ResourceData, meta interface{}, name string) error {
101101
}
102102
listKeysOptions := &vpcv1.ListKeysOptions{}
103103

104-
resourceGroup := ""
105-
if rg, ok := d.GetOk("resource_group"); ok {
106-
resourceGroup = rg.(string)
107-
listKeysOptions.ResourceGroupID = &resourceGroup
108-
}
109-
110104
start := ""
111105
allrecs := []vpcv1.Key{}
112106
for {

ibm/resource_ibm_is_vpn_gateway_connections.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,15 @@ func vpngwconCreate(d *schema.ResourceData, meta interface{}, name, gatewayID, p
318318

319319
if ikePolicy, ok := d.GetOk(isVPNGatewayConnectionIKEPolicy); ok {
320320
ikePolicyIdentity = ikePolicy.(string)
321-
vpnGatewayConnectionPrototypeModel.IkePolicy = &vpcv1.IkePolicyIdentity{
321+
vpnGatewayConnectionPrototypeModel.IkePolicy = &vpcv1.VPNGatewayConnectionIkePolicyPrototype{
322322
ID: &ikePolicyIdentity,
323323
}
324324
} else {
325325
vpnGatewayConnectionPrototypeModel.IkePolicy = nil
326326
}
327327
if ipsecPolicy, ok := d.GetOk(isVPNGatewayConnectionIPSECPolicy); ok {
328328
ipsecPolicyIdentity = ipsecPolicy.(string)
329-
vpnGatewayConnectionPrototypeModel.IpsecPolicy = &vpcv1.IPsecPolicyIdentity{
329+
vpnGatewayConnectionPrototypeModel.IpsecPolicy = &vpcv1.VPNGatewayConnectionIPsecPolicyPrototype{
330330
ID: &ipsecPolicyIdentity,
331331
}
332332
} else {
@@ -495,18 +495,18 @@ func vpngwconUpdate(d *schema.ResourceData, meta interface{}, gID, gConnID strin
495495
interval := int64(d.Get(isVPNGatewayConnectionDeadPeerDetectionInterval).(int))
496496
timeout := int64(d.Get(isVPNGatewayConnectionDeadPeerDetectionTimeout).(int))
497497

498-
// Construct an instance of the VPNGatewayConnectionDpdPrototype model
499-
vpnGatewayConnectionDpdPrototypeModel := new(vpcv1.VPNGatewayConnectionDpdPrototype)
500-
vpnGatewayConnectionDpdPrototypeModel.Action = &action
501-
vpnGatewayConnectionDpdPrototypeModel.Interval = &interval
502-
vpnGatewayConnectionDpdPrototypeModel.Timeout = &timeout
503-
vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel
498+
// Construct an instance of the VPNGatewayConnectionDpdPatch model
499+
vpnGatewayConnectionDpdPatchModel := new(vpcv1.VPNGatewayConnectionDpdPatch)
500+
vpnGatewayConnectionDpdPatchModel.Action = &action
501+
vpnGatewayConnectionDpdPatchModel.Interval = &interval
502+
vpnGatewayConnectionDpdPatchModel.Timeout = &timeout
503+
vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPatchModel
504504
hasChanged = true
505505
}
506506

507507
if d.HasChange(isVPNGatewayConnectionIKEPolicy) {
508508
ikePolicyIdentity := d.Get(isVPNGatewayConnectionIKEPolicy).(string)
509-
vpnGatewayConnectionPatchModel.IkePolicy = &vpcv1.IkePolicyIdentity{
509+
vpnGatewayConnectionPatchModel.IkePolicy = &vpcv1.VPNGatewayConnectionIkePolicyPatch{
510510
ID: &ikePolicyIdentity,
511511
}
512512
hasChanged = true
@@ -516,7 +516,7 @@ func vpngwconUpdate(d *schema.ResourceData, meta interface{}, gID, gConnID strin
516516

517517
if d.HasChange(isVPNGatewayConnectionIPSECPolicy) {
518518
ipsecPolicyIdentity := d.Get(isVPNGatewayConnectionIPSECPolicy).(string)
519-
vpnGatewayConnectionPatchModel.IpsecPolicy = &vpcv1.IPsecPolicyIdentity{
519+
vpnGatewayConnectionPatchModel.IpsecPolicy = &vpcv1.VPNGatewayConnectionIPsecPolicyPatch{
520520
ID: &ipsecPolicyIdentity,
521521
}
522522
hasChanged = true

website/docs/d/is_ssh_key.html.markdown

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ data "ibm_is_ssh_key" "ds_key" {
2323
Review the argument references that you can specify for your data source.
2424

2525
- `name` - (Required, String) The name of the SSH key.
26-
- `resource_group` - (Optional, string) The ID of resource group of the Key.
2726

2827
## Attribute reference
2928
In addition to all argument reference list, you can access the following attribute references after your data source is created.

0 commit comments

Comments
 (0)