-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
add quicksight data set resource #21971
add quicksight data set resource #21971
Conversation
@lacernetic do you have an plan date when this will bw completed? |
Current plan is to have this merged in by early February! |
"logical_table_map": { | ||
Type: schema.TypeList, | ||
Optional: true, | ||
Computed: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, the default is being created consistently with the same value, in which case we should specify the outputted value as a Default
for this attribute. (terraform-plugin-sdk reference)
Otherwise, you are correct that we'll need to resort to Computed: true
to prevent the non-empty plan in acceptance testing.
Type: schema.TypeList, | ||
Optional: true, | ||
MaxItems: 1, | ||
ExactlyOneOf: []string{"custom_sql", "relational_table", "s3_source"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExactlyOneOf: []string{"custom_sql", "relational_table", "s3_source"}, |
Trying to implement this myself: I have learned that both ConflictsWith
and ExactlyOneOf
are only supported for schema of TypeList
with MaxItems: 1
!
I will have to ask around, but I believe this means that we can't do any provider-level check to ensure that only one attribute of a list element is present within that element. As such, we can exclude ExactlyOneOf
from physical_table_map
here.
MaxItems: 32, | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"physical_table_map_id": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"physical_table_map_id": { | |
"physical_table_id": { |
The ID here is referring to the unique key identifying each individual PhysicalTable
-- so I think it makes more sense to remove "map" here.
Additionally, I believe that it is this ID that is being referenced in logical_table_map.0.source
as physical_table_id
-- so it would be clean for those to match.
MaxItems: 1000, | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"field_folders_id": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"field_folders_id": { | |
"field_folder_id": { |
Similarly to the instance of using physical_table_map_id
above, the ID here refers to the unique key for an individual field folder.
ValidateFunc: validation.StringLenBetween(0, 256), | ||
}, | ||
|
||
"schema": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"schema" should have a ValidateFunc to ensure it is no longer than 64 characters (API reference)
} | ||
|
||
if v, ok := tfMap["principals"].([]interface{}); ok { | ||
columnLevelPermissionRule.ColumnNames = flex.ExpandStringList(v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
columnLevelPermissionRule.ColumnNames = flex.ExpandStringList(v) | |
columnLevelPermissionRule.Principals = flex.ExpandStringList(v) |
Hi @lacernetic! I've gone ahead and made some more comments and suggestions here. I think the main blocker to testing / progress at this point is the error you identified in However, I have noted during my own experimentation that Therefore, As a result, I do not think we will be able to make use of either For now certainly: we should abandoned the Thanks again for your contribution and work on this! |
@zhelding I just uploaded my changes for physical_table_map as a set. However when I run the code I get an error:
I did some checking around the only difference between the original table and the flatten version is that one of them has default upload_settings (set by AWS) while the other does not. Upload settings is marked as computed so I'm not sure why these are being counted in the test. Any thoughts? |
Hi @lacernetic! I'm hoping to dig into this come Monday -- but for now: I think the test output you posted is showing drift detected in |
From my experience this "change in plan" usually happens when the flatten function in read expects something different from what is being set in create. However I checked both what things and both are outputting the same value given from the test. Definitely more than stuck on this one :( |
Hi @lacernetic. I consulted with @YakDriver on this, and unfortunately we concluded that the AWS API is simply not behaving as expected here. The input of the Either the API ought to be accepting the Regrettably, this seems to be a blocking issue for this resource: the We have gone ahead and submitted a support ticket to AWS re: this unexpected API behavior. Hopefully, AWS can either patch their API or update their documentation -- and then we can resume work on this resource. Thanks so much for your continued patience and contributions. I recognize it's a pain to have work stall like this, so we greatly appreciate you sticking with the process! |
@zhelding Is there an estimated time on when AWS will get back to us on this ticket? |
Hi @lacernetic. Sorry for the delayed reply here. We have been coordinating with our Solutions Architect and AWS Support on our end, and they have acknowledged the issue; however, they are unable to provide a timeline as to when it might be resolved. I will continued to chase that up as time passes. Thank you very much for your patience. |
Awesome thanks for the update!! I expected for this to be a long process so no worries here! |
Hi @zhelding !! Are there any updates from AWS on the timeline of fixing this issue? |
Edit: The potential options have been expanded and re-ordered. Quick research update. I'm unable to push to the remote for this PR, so I've started a working branch with updates (see the diff here f_quicksight_data_set_resource...f-aws_quicksight_data_set). After bringing the changes up to date with Handling these optional/computed attributes properly, especially when deeply nested inside a required attribute, is a difficult design to get right. The following list describes some potential paths forward:
Once we have more information from the AWS support case I'll update here on the direction we intend to pursue. |
After thinking on this more, I suggest we proceed with the first option above (skip writing If the AWS response from the support case indicates default values are always consistent when |
This work has been completed and merged with #30349. To round out the discussion on |
This functionality has been released in v4.62.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Relates: #10990
Output from acceptance testing:
NOTES FOR REVIEWER: