Skip to content

Commit

Permalink
fix intentions
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Oct 4, 2023
1 parent 56cc862 commit 28bd93e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions consul/resource_consul_config_entry_service_intentions.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ func (s *serviceIntentions) Decode(d *schema.ResourceData) (consulapi.ConfigEntr
}
verifyClaims = append(verifyClaims, verifyClaim)
}
provider.VerifyClaims = verifyClaims
}
providerList = append(providerList, provider)
providers = append(providers, provider)
}
jwtReq.Providers = providers
configEntry.JWT = jwtReq
Expand All @@ -323,6 +324,7 @@ func (s *serviceIntentions) Decode(d *schema.ResourceData) (consulapi.ConfigEntr
sourcesIntentions := make([]*consulapi.SourceIntention, 0)
for _, sr := range sourcesList {
var sourceIntention *consulapi.SourceIntention
sourceIntention = new(consulapi.SourceIntention)
sourceMap := sr.(map[string]interface{})
if sourceMap["name"] != nil {
sourceIntention.Name = sourceMap["name"].(string)
Expand Down Expand Up @@ -432,8 +434,8 @@ func (s *serviceIntentions) Decode(d *schema.ResourceData) (consulapi.ConfigEntr
}
if sourceMap["legacy_meta"] != nil {
legacyMeta := make(map[string]string)
for k, v := range sourceMap["legacy_meta"].(map[string]string) {
legacyMeta[k] = v
for k, v := range sourceMap["legacy_meta"].(map[string]interface{}) {
legacyMeta[k] = v.(string)
}
sourceIntention.LegacyMeta = legacyMeta
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ func TestAccConsulConfigEntryServiceIntentionsCETest(t *testing.T) {
}

const testConsulConfigEntryServiceIntentionsCE = `
resource
`

0 comments on commit 28bd93e

Please sign in to comment.