Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change service config block to TypeList with MaxItems of 1 #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eamonnotoole
Copy link
Contributor

Currently the Terraform SDK doesn't support the use of TypeSet with
elements that have nested configuration blocks:
hashicorp/terraform-plugin-sdk#616

The workaround is to instead use a TypeList with a MaxItems of 1. We've
changed convertToTypeSet to convertToTypeList and made this change.
We've also had to modify client.GetServiceSettingsMap to expect a
[]interface{} as opposed to *schema.TypeSet

We've added a TODO about this so that when the SDK supports nested
resources in TypeSet then we can revert to TypeSet.

Currently the Terraform SDK doesn't support the use of TypeSet with
elements that have nested configuration blocks:
hashicorp/terraform-plugin-sdk#616

The workaround is to instead use a TypeList with a MaxItems of 1.  We've
changed convertToTypeSet to convertToTypeList and made this change.
We've also had to modify client.GetServiceSettingsMap to expect a
[]interface{} as opposed to *schema.TypeSet

We've added a TODO about this so that when the SDK supports nested
resources in TypeSet then we can revert to TypeSet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant