diff --git a/docs/resources/quality_forms_survey.md b/docs/resources/quality_forms_survey.md index e8fe1cb30..ad78779e0 100644 --- a/docs/resources/quality_forms_survey.md +++ b/docs/resources/quality_forms_survey.md @@ -158,6 +158,10 @@ Optional: - `assistance_conditions` (Block Set) Options from which to choose an answer for this question. (see [below for nested schema](#nestedblock--question_groups--questions--answer_options--assistance_conditions)) +Read-Only: + +- `id` (String) The ID for the answer option. + ### Nested Schema for `question_groups.questions.answer_options.assistance_conditions` diff --git a/genesyscloud/resource_genesyscloud_quality_forms_survey.go b/genesyscloud/resource_genesyscloud_quality_forms_survey.go index a388e523e..09acdfaa4 100644 --- a/genesyscloud/resource_genesyscloud_quality_forms_survey.go +++ b/genesyscloud/resource_genesyscloud_quality_forms_survey.go @@ -151,6 +151,11 @@ var ( surveyFormAnswerOptions = &schema.Resource{ Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Description: "The ID for the answer option.", + Computed: true, + }, "text": { Type: schema.TypeString, Required: true, @@ -211,9 +216,10 @@ func getAllSurveyForms(_ context.Context, clientConfig *platformclientv2.Configu func SurveyFormExporter() *resourceExporter.ResourceExporter { return &resourceExporter.ResourceExporter{ - GetResourcesFunc: provider.GetAllWithPooledClient(getAllSurveyForms), - RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references - AllowZeroValues: []string{"question_groups.questions.answer_options.value"}, + GetResourcesFunc: provider.GetAllWithPooledClient(getAllSurveyForms), + RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references + AllowZeroValues: []string{"question_groups.questions.answer_options.value"}, + ExcludedAttributes: []string{"question_groups.questions.answer_options.id"}, } } @@ -569,7 +575,7 @@ func flattenSurveyQuestions(questions *[]platformclientv2.Surveyquestion) []inte return nil } - questionList := []interface{}{} + var questionList []interface{} for _, question := range *questions { questionMap := make(map[string]interface{})