Skip to content

Commit

Permalink
fixing cipher group documentation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Oct 20, 2023
1 parent 62138a9 commit 9123f28
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
25 changes: 24 additions & 1 deletion bigip/resource_bigip_ltm_cipher_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ func resourceBigipLtmCipherGroup() *schema.Resource {
"allow": {
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Description: "Specifies the configuration of the allowed groups of ciphers. You can select a cipher rule from the Available Cipher Rules list",
},
"require": {
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Description: "Specifies the configuration of the restrict groups of ciphers. You can select a cipher rule from the Available Cipher Rules list",
},
Expand Down Expand Up @@ -134,10 +136,31 @@ func resourceBigipLtmCipherGroupUpdate(ctx context.Context, d *schema.ResourceDa
cipherGrouptmp := &bigip.CipherGroupReq{}
cipherGrouptmp.Name = name
cipherGroupconfig := getCipherGroupConfig(d, cipherGrouptmp)
if err := client.ModifyLtmCipherGroup(name, cipherGroupconfig); err != nil {
if p, ok := d.GetOk("require"); ok {
for _, r := range p.(*schema.Set).List() {
cipherGroupconfig.Require = append(cipherGroupconfig.Require, r.(string))
}
}
type CipherGroupReqnew struct {
bigip.CipherGroupReq
Require []interface{} `json:"require"`
Allow []interface{} `json:"allow"`
}
new := &CipherGroupReqnew{}
new.Require = cipherGroupconfig.Require
new.Name = cipherGroupconfig.Name
new.Ordering = cipherGroupconfig.Ordering
new.Allow = cipherGroupconfig.Allow

if err := client.ModifyLtmCipherGroupNew(name, new); err != nil {

Check failure on line 155 in bigip/resource_bigip_ltm_cipher_group.go

View workflow job for this annotation

GitHub Actions / golint

client.ModifyLtmCipherGroupNew undefined (type *"github.com/f5devcentral/go-bigip".BigIP has no field or method ModifyLtmCipherGroupNew)) (typecheck)

Check failure on line 155 in bigip/resource_bigip_ltm_cipher_group.go

View workflow job for this annotation

GitHub Actions / golint

client.ModifyLtmCipherGroupNew undefined (type *"github.com/f5devcentral/go-bigip".BigIP has no field or method ModifyLtmCipherGroupNew) (typecheck)
return diag.FromErr(fmt.Errorf("error modifying cipher group %s: %v", name, err))
}

//
//if err := client.ModifyLtmCipherGroup(name, cipherGroupconfig); err != nil {
// return diag.FromErr(fmt.Errorf("error modifying cipher group %s: %v", name, err))
//}

return resourceBigipLtmCipherGroupRead(ctx, d, meta)
}

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/bigip_ltm_cipher_group.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: "bigip"
page_title: "BIG-IP: bigip_ltm_cipher_rule"
page_title: "BIG-IP: bigip_ltm_cipher_group"
subcategory: "Local Traffic Manager(LTM)"
description: |-
Provides details about bigip_ltm_cipher_rule resource
Provides details about bigip_ltm_cipher_group resource
---

# bigip\_ltm\_cipher\_group
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/f5devcentral/go-bigip/bigip.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions vendor/github.com/f5devcentral/go-bigip/ltm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9123f28

Please sign in to comment.