Skip to content

Commit

Permalink
Add diff suppression for hard limits on kubernetes_resource_quota (#1251
Browse files Browse the repository at this point in the history
)

Co-authored-by: John Houston <[email protected]>
  • Loading branch information
ecrousseau and jrhouston authored May 13, 2021
1 parent 8f86850 commit 9e96653
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions kubernetes/resource_kubernetes_resource_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ func resourceKubernetesResourceQuota() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"hard": {
Type: schema.TypeMap,
Description: "The set of desired hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
Optional: true,
Elem: schema.TypeString,
ValidateFunc: validateResourceList,
Type: schema.TypeMap,
Description: "The set of desired hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
Optional: true,
Elem: schema.TypeString,
ValidateFunc: validateResourceList,
DiffSuppressFunc: suppressEquivalentResourceQuantity,
},
"scopes": {
Type: schema.TypeSet,
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/resource_kubernetes_resource_quota_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func testAccKubernetesResourceQuotaConfig_basic(name string) string {
spec {
hard = {
"limits.cpu" = 2
"limits.memory" = "2Gi"
"limits.memory" = "2048Mi"
pods = 4
}
}
Expand Down

0 comments on commit 9e96653

Please sign in to comment.