Skip to content

Commit

Permalink
committing vendor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Aug 1, 2024
1 parent 014b38d commit bb9bbe4
Show file tree
Hide file tree
Showing 58 changed files with 18,330 additions and 857 deletions.
46 changes: 46 additions & 0 deletions docs/resources/cm_activate_instance_license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bigipnext_cm_activate_instance_license Resource - terraform-provider-bigipnext"
subcategory: ""
description: |-
Resource used for Activate/Deactivate License for Instances on Central Manager Using JWT Token
---

# bigipnext_cm_activate_instance_license (Resource)

Resource used for Activate/Deactivate License for Instances on Central Manager Using JWT Token

## Example Usage

```terraform
resource "bigipnext_cm_activate_instance_license" "tokenadd" {
instances = [{
instance_address = "10.xxx.xxx.xxx"
jwt_id = "8a3dc22e-xxxx-xxxxc-xxxx-xxxxxxxx4326"
},
{
instance_address = "10.146.194.174"
jwt_id = "8a3dc22e-xxxx-xxxxc-xxxx-xxxxxxxx4326"
}
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `instances` (Attributes List) List of instances to activate the license (see [below for nested schema](#nestedatt--instances))

### Read-Only

- `id` (String) Unique Identifier for the resource

<a id="nestedatt--instances"></a>
### Nested Schema for `instances`

Required:

- `instance_address` (String) IP Address of the instance to activate the license
- `jwt_id` (String) JWT ID to be used to activate the license
34 changes: 34 additions & 0 deletions docs/resources/cm_add_jwt_token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bigipnext_cm_add_jwt_token Resource - terraform-provider-bigipnext"
subcategory: ""
description: |-
Resource used for add/copy JWT Token on Central Manager
---

# bigipnext_cm_add_jwt_token (Resource)

Resource used for add/copy JWT Token on Central Manager

## Example Usage

```terraform
resource "bigipnext_cm_add_jwt_token" "tokenadd" {
token_name = "paid_test_jwt"
jwt_token = "eyJhbG"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `jwt_token` (String, Sensitive) JWT token to be added on Central Manager
- `token_name` (String) Nickname to be used to add the JWT token on Central Manager

### Read-Only

- `id` (String) Unique Identifier for the resource
- `order_type` (String) JWT token to be added on Central Manager
- `subscription_expiry` (String) JWT token to be added on Central Manager
61 changes: 61 additions & 0 deletions docs/resources/cm_bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bigipnext_cm_bootstrap Resource - terraform-provider-bigipnext"
subcategory: ""
description: |-
Resource used for bootstrapping Central Manager
~> NOTE This resource does not support update and delete. When doing terraform destroy it will only remove the resource from the state
---

# bigipnext_cm_bootstrap (Resource)

Resource used for bootstrapping Central Manager

~> **NOTE** This resource does not support update and delete. When doing `terraform destroy` it will only remove the resource from the state

## Example Usage

```terraform
resource "bigipnext_cm_bootstrap" "name" {
run_setup = true
bootstrap_timeout = 800
external_storage = {
storage_type = "NFS"
storage_address = "10.28.14.22"
storage_path = "/exports/backup"
cm_storage_dir = "backuppqr"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `run_setup` (Boolean) Run setup on Central Manager

### Optional

- `bootstrap_timeout` (Number) Timeout for the bootstrap operation
- `external_storage` (Attributes) External storage configuration (see [below for nested schema](#nestedatt--external_storage))

### Read-Only

- `bootstrap_status` (String) Status of the bootstrap operation
- `id` (String) ID of the resource

<a id="nestedatt--external_storage"></a>
### Nested Schema for `external_storage`

Required:

- `storage_address` (String) IP Address of the external storage
- `storage_path` (String) Directory path that is mounted on the external storage server
- `storage_type` (String) Type of external storage. Supported values are NFS and SAMBA

Optional:

- `cm_storage_dir` (String) Folder name created on the external storage server to store Central Manager data
- `password` (String) Password to access the external storage, required if storage type is SAMBA
- `username` (String) Username to access the external storage, required if storage type is SAMBA
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "bigipnext_cm_activate_instance_license" "tokenadd" {
instances = [{
instance_address = "10.xxx.xxx.xxx"
jwt_id = "8a3dc22e-xxxx-xxxxc-xxxx-xxxxxxxx4326"
},
{
instance_address = "10.146.194.174"
jwt_id = "8a3dc22e-xxxx-xxxxc-xxxx-xxxxxxxx4326"
}
]
}
4 changes: 4 additions & 0 deletions examples/resources/bigipnext_cm_add_jwt_token/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "bigipnext_cm_add_jwt_token" "tokenadd" {
token_name = "paid_test_jwt"
jwt_token = "eyJhbG"
}
10 changes: 10 additions & 0 deletions examples/resources/bigipnext_cm_bootstrap/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "bigipnext_cm_bootstrap" "name" {
run_setup = true
bootstrap_timeout = 800
external_storage = {
storage_type = "NFS"
storage_address = "10.28.14.22"
storage_path = "/exports/backup"
cm_storage_dir = "backuppqr"
}
}
49 changes: 49 additions & 0 deletions examples/resources/bigipnextcm_as3/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resource "bigipnext_cm_as3" "test2" {
as3_json = <<EOT
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"schemaVersion": "3.45.0",
"id": "example-declaration-01",
"label": "Sample 1",
"remark": "Simple HTTP application with round robin pool",
"target": {
"address": "xxx.xxx.xxx.xxxx"
},
"next-cm-tenant02": {
"class": "Tenant",
"next-cm-app02": {
"class": "Application",
"template": "http",
"serviceMain": {
"class": "Service_HTTP",
"virtualAddresses": [
"10.0.2.10"
],
"pool": "next-cm-pool02"
},
"next-cm-pool02": {
"class": "Pool",
"monitors": [
"http"
],
"members": [
{
"servicePort": 80,
"serverAddresses": [
"192.0.3.100",
"192.0.3.110"
]
}
]
}
}
}
}
}
EOT
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/hashicorp/terraform-plugin-go v0.22.1
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.7.0
gitswarm.f5net.com/terraform-providers/bigipnext v0.0.0-20240620103831-5476a6be942d
gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUei
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho=
github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
gitswarm.f5net.com/terraform-providers/bigipnext v0.0.0-20240620103831-5476a6be942d h1:lTMkeopV8v9buknrpbpdYNP9R7VjiU7HG18zFHwNsVQ=
gitswarm.f5net.com/terraform-providers/bigipnext v0.0.0-20240620103831-5476a6be942d/go.mod h1:SLwUYHgvE++OJL3tdWyNT4vbu094xMq8sQZyei0r3So=
gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2 h1:vbWm25ioA7ekMrjDFqO2I+8V33qyLiMr4XBZrG5XKTY=
gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2/go.mod h1:SLwUYHgvE++OJL3tdWyNT4vbu094xMq8sQZyei0r3So=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
Expand Down
18 changes: 9 additions & 9 deletions internal/provider/certificate_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (r *NextCMCertificateResource) Configure(ctx context.Context, req resource.
func (r *NextCMCertificateResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {
var resCfg *NextCMCertificateResourceModel
resp.Diagnostics.Append(req.Plan.Get(ctx, &resCfg)...)
if resp.Diagnostics.HasError() {
if resp.Diagnostics.HasError() { // coverage-ignore
return
}
tflog.Info(ctx, fmt.Sprintf("[CREATE] NextCMCertificateResource:%+v\n", resCfg.Name.ValueString()))
Expand All @@ -194,7 +194,7 @@ func (r *NextCMCertificateResource) Create(ctx context.Context, req resource.Cre
tflog.Info(ctx, fmt.Sprintf("[CREATE] :%+v\n", reqDraft))

draftID, err := r.client.PostCertificateCreate(reqDraft, "CREATE")
if err != nil {
if err != nil { // coverage-ignore
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to Create Certificate, got error: %s", err))
return
}
Expand All @@ -207,13 +207,13 @@ func (r *NextCMCertificateResource) Create(ctx context.Context, req resource.Cre
func (r *NextCMCertificateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {
var stateCfg *NextCMCertificateResourceModel
resp.Diagnostics.Append(req.State.Get(ctx, &stateCfg)...)
if resp.Diagnostics.HasError() {
if resp.Diagnostics.HasError() { // coverage-ignore
return
}
id := stateCfg.Id.ValueString()
tflog.Info(ctx, fmt.Sprintf("Reading Certificate : %s", id))
certData, err := r.client.GetNextCMCertificate(id)
if err != nil {
if err != nil { // coverage-ignore
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to Read Certificate, got error: %s", err))
return
}
Expand All @@ -236,7 +236,7 @@ func (r *NextCMCertificateResource) Update(ctx context.Context, req resource.Upd
var resCfg *NextCMCertificateResourceModel
resp.Diagnostics.Append(req.Plan.Get(ctx, &resCfg)...)

if resp.Diagnostics.HasError() {
if resp.Diagnostics.HasError() { // coverage-ignore
return
}
tflog.Info(ctx, fmt.Sprintf("[UPDATE]Posting Certificate: %s", resCfg.Name.ValueString()))
Expand All @@ -248,7 +248,7 @@ func (r *NextCMCertificateResource) Update(ctx context.Context, req resource.Upd
tflog.Info(ctx, fmt.Sprintf("[UPDATE] :%+v\n", reqDraft))

draftID, err := r.client.PostCertificateCreate(reqDraft, "UPDATE")
if err != nil {
if err != nil { // coverage-ignore
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to Update Certificate, got error: %s", err))
return
}
Expand All @@ -259,7 +259,7 @@ func (r *NextCMCertificateResource) Update(ctx context.Context, req resource.Upd
func (r *NextCMCertificateResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {

var stateCfg *NextCMCertificateResourceModel
if resp.Diagnostics.HasError() {
if resp.Diagnostics.HasError() { // coverage-ignore
return
}
resp.Diagnostics.Append(req.State.Get(ctx, &stateCfg)...)
Expand All @@ -268,14 +268,14 @@ func (r *NextCMCertificateResource) Delete(ctx context.Context, req resource.Del
tflog.Info(ctx, fmt.Sprintf("Deleting Certificate : %s", id))

err := r.client.DeleteNextCMCertificate(id)
if err != nil {
if err != nil { // coverage-ignore
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to Delete Certificate, got error: %s", err))
return
}
stateCfg.Id = types.StringValue("")
}

func (r *NextCMCertificateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
func (r *NextCMCertificateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { // coverage-ignore
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
}

Expand Down
Loading

0 comments on commit bb9bbe4

Please sign in to comment.