diff --git a/consul/resource_consul_config_entry_service_intentions.go b/consul/resource_consul_config_entry_service_intentions.go index 39fa0ff4..213495f0 100644 --- a/consul/resource_consul_config_entry_service_intentions.go +++ b/consul/resource_consul_config_entry_service_intentions.go @@ -478,7 +478,6 @@ func (s *serviceIntentions) Write(ce consulapi.ConfigEntry, d *schema.ResourceDa for _, jwtProvider := range si.JWT.Providers { jwtProviderMap := make(map[string]interface{}) jwtProviderMap["name"] = jwtProvider.Name - jwtProviderMap["verify_claims"] = make([]map[string]interface{}, 0) verifyClaims := make([]map[string]interface{}, 0) for _, vc := range jwtProvider.VerifyClaims { vcMap := make(map[string]interface{}) @@ -490,6 +489,7 @@ func (s *serviceIntentions) Write(ce consulapi.ConfigEntry, d *schema.ResourceDa vcMap["value"] = vc.Value verifyClaims = append(verifyClaims, vcMap) } + jwtProviderMap["verify_claims"] = verifyClaims jwtProviders = append(jwtProviders, jwtProviderMap) } jwt[0]["providers"] = jwtProviders diff --git a/consul/resource_consul_config_entry_service_intentions_ce_test.go b/consul/resource_consul_config_entry_service_intentions_ce_test.go index a8cb33c6..a7b515f7 100644 --- a/consul/resource_consul_config_entry_service_intentions_ce_test.go +++ b/consul/resource_consul_config_entry_service_intentions_ce_test.go @@ -32,6 +32,7 @@ resource "consul_config_entry" "jwt_provider" { kind = "jwt-provider" config_json = jsonencode({ + ClockSkewSeconds = 30 Issuer = "test-issuer" JSONWebKeySet = { Remote = {