Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove location validator, this is handled via the api #2931

Merged
merged 2 commits into from
Aug 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions ibm/resource_ibm_satellite_location.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ func resourceIBMSatelliteLocation() *schema.Resource {
}
return o == n
},
Description: "The IBM Cloud metro from which the Satellite location is managed",
ValidateFunc: InvokeValidator("ibm_satellite_location", sateLocZone),
Description: "The IBM Cloud metro from which the Satellite location is managed",
},
"description": {
Type: schema.TypeString,
Expand Down Expand Up @@ -185,8 +184,6 @@ func resourceIBMSatelliteLocation() *schema.Resource {
}

func resourceIBMSatelliteLocationValidator() *ResourceValidator {
managedFromAllowedValues := "wdc, lon, fra, wdc04, lon04, fra02"

validateSchema := make([]ValidateSchema, 0)
validateSchema = append(validateSchema,
ValidateSchema{
Expand All @@ -197,13 +194,6 @@ func resourceIBMSatelliteLocationValidator() *ResourceValidator {
Regexp: `^[A-Za-z0-9:_ .-]+$`,
MinValueLength: 1,
MaxValueLength: 128})
validateSchema = append(validateSchema,
ValidateSchema{
Identifier: sateLocZone,
ValidateFunctionIdentifier: ValidateAllowedStringValue,
Type: TypeString,
Optional: false,
AllowedValues: managedFromAllowedValues})

ibmSatelliteLocationValidator := ResourceValidator{ResourceName: "ibm_satellite_location", Schema: validateSchema}
return &ibmSatelliteLocationValidator
Expand Down