Skip to content

Commit

Permalink
add force flag to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
igiai committed Nov 6, 2024
1 parent 1704f42 commit 950c742
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/resources/smart_license.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@ This resource can manage a Smart License.

## Example Usage

```terraform
Enable Evaluation Mode
```hcl
resource "fmc_smart_license" "example" {
registration_type = "EVALUATION"
}
```

Force to re-register with the provided token
```hcl
resource "fmc_smart_license" "example" {
registration_type = "REGISTER"
token = "X2M3YmJlY..."
force = true
}
```

De-registration can be done with terraform destroy

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

Expand All @@ -30,6 +41,7 @@ resource "fmc_smart_license" "example" {
### Optional

- `domain` (String) The name of the FMC domain
- `force` (Boolean) Set to true to re-register smart license.
- `token` (String) Registration token.

### Read-Only
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/resource_fmc_smart_license.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func (r *SmartLicenseResource) Schema(ctx context.Context, req resource.SchemaRe
MarkdownDescription: helpers.NewAttributeDescription("Status of a smart license.").String,
Computed: true,
},
"force": schema.BoolAttribute{
MarkdownDescription: helpers.NewAttributeDescription("Set to true to re-register smart license.").String,
Optional: true,
},
},
}
}
Expand Down

0 comments on commit 950c742

Please sign in to comment.