From 3d637e30e7972bac3f77f4c0c4a2decac0b664bc Mon Sep 17 00:00:00 2001 From: Chris Pinola Date: Wed, 20 Nov 2024 18:16:15 -0500 Subject: [PATCH] Attempt to read team mapping from AuthN response --- datadog/resource_datadog_authn_mapping.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datadog/resource_datadog_authn_mapping.go b/datadog/resource_datadog_authn_mapping.go index 5ab937d73..fad712628 100644 --- a/datadog/resource_datadog_authn_mapping.go +++ b/datadog/resource_datadog_authn_mapping.go @@ -145,7 +145,9 @@ func updateAuthNMappingState(d *schema.ResourceData, authNMapping *datadogV2.Aut authNMappingAttributes := authNMapping.GetAttributes() authNMappingRelations := authNMapping.GetRelationships() authNMappingRoleRelation := authNMappingRelations.GetRole() + authNMappingTeamRelation := authNMappingRelations.GetTeam() authNRole := authNMappingRoleRelation.GetData() + authNTeam := authNMappingTeamRelation.GetData() if err := d.Set("key", authNMappingAttributes.GetAttributeKey()); err != nil { return diag.FromErr(err) @@ -158,6 +160,11 @@ func updateAuthNMappingState(d *schema.ResourceData, authNMapping *datadogV2.Aut if err := d.Set("role", authNRole.GetId()); err != nil { return diag.FromErr(err) } + + if err := d.Set("team", authNTeam.GetId()); err != nil { + return diag.FromErr(err) + } + return nil }