Skip to content

Commit e22cb70

Browse files
authored
make host_group description required (#26)
* make host_group description required due to the api being unable to make a description null, we need to require a description to provide idempotence * update docs * skip test
1 parent 3f5f586 commit e22cb70

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
if: |
5858
(github.event_name == 'pull_request_target' &&
5959
github.event.label.name == 'ok-to-test') ||
60-
contains(fromJson('["push", "pull_request", "workflow_dispatch", "schedule"]'), github.event_name)
60+
contains(fromJson('["push", "workflow_dispatch", "schedule"]'), github.event_name)
6161
name: Terraform Provider Acceptance Tests
6262
needs: build
6363
runs-on: ubuntu-latest

docs/resources/host_group.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ output "host_group" {
5757

5858
### Required
5959

60+
- `description` (String) Description of the host group.
6061
- `name` (String) Name of the host group.
6162
- `type` (String) The host group type, case sensitive. (dynamic, static, staticByID)
6263

6364
### Optional
6465

6566
- `assignment_rule` (String) The assignment rule for dynamic host groups.
66-
- `description` (String) Description of the host group.
6767

6868
### Read-Only
6969

internal/provider/host_group_resource.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,11 @@ func (r *hostGroupResource) Schema(
166166
},
167167
},
168168
"description": schema.StringAttribute{
169-
Optional: true,
169+
Required: true,
170170
Description: "Description of the host group.",
171+
Validators: []validator.String{
172+
stringvalidator.LengthAtLeast(1),
173+
},
171174
},
172175
},
173176
}

0 commit comments

Comments
 (0)