Skip to content

Commit

Permalink
Merge pull request #726 from Juniper/bug-723/fix-acceptable-storage-s…
Browse files Browse the repository at this point in the history
…chema-paths

only allow string and int storage schema paths
  • Loading branch information
rajagopalans authored Jul 17, 2024
2 parents a556693 + 3dfe807 commit aada19a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
4 changes: 2 additions & 2 deletions apstra/analytics/telemetry_service_registry_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ func (o TelemetryServiceRegistryEntry) ResourceAttributes() map[string]resourceS
Required: true,
},
"storage_schema_path": resourceSchema.StringAttribute{
MarkdownDescription: "Storage Schema Path. Must be one of:\n - " + strings.Join(utils.AllStorageSchemaPaths(), "\n - ") + "\n",
MarkdownDescription: "Storage Schema Path. Must be one of:\n - " + strings.Join([]string{utils.StringersToFriendlyString(apstra.StorageSchemaPathIBA_STRING_DATA), utils.StringersToFriendlyString(apstra.StorageSchemaPathIBA_INTEGER_DATA)}, "\n - ") + "\n",
Required: true,
Validators: []validator.String{
stringvalidator.LengthAtLeast(1),
stringvalidator.OneOf(utils.AllStorageSchemaPaths()...),
stringvalidator.OneOf(utils.StringersToFriendlyString(apstra.StorageSchemaPathIBA_STRING_DATA), utils.StringersToFriendlyString(apstra.StorageSchemaPathIBA_INTEGER_DATA)),
},
},
"description": resourceSchema.StringAttribute{
Expand Down
20 changes: 1 addition & 19 deletions docs/resources/telemetry_service_registry_entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,26 +94,8 @@ output "r" {
- `application_schema` (String) Application Schema expressed in JSON
- `name` (String) Service Name. Used to identify the Service.
- `storage_schema_path` (String) Storage Schema Path. Must be one of:
- arp
- bgp
- cpp_graph
- environment
- generic
- graph
- hostname
- iba_integer_data
- iba_string_data
- interface
- interface_counters
- lag
- lldp
- mac
- mlag
- nsxt
- optical_xcvr
- route
- route_lookup
- xcvr
- iba_integer_data

### Optional

Expand Down

0 comments on commit aada19a

Please sign in to comment.