-
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 aws_workspaces_directory.saml_properties #39060
Add aws_workspaces_directory.saml_properties #39060
Conversation
* `directory.go` (`ResourceDirectory()`): Add `saml_properties` structure to schema. (`resourceDirectoryCreate()`): Call `ModifySamlProperties` if `saml_properties` structure is present. (`resourceDirectoryRead()`): Store `directory.SamlProperties` in `saml_properties` structure. (`resourceDirectoryUpdate()`): Call `ModifySamlProperties` if `saml_properties` structure has changed. (`ExpandSAMLProperties()`): Add expander for `types.SamlProperties`. (`FlattenSAMLProperties()`): Add flattener for `types.SamlProperties`. (`SamlStatusEnumValues()`): Add helper for listing `types.SamlStatusEnum` values. * `directory_data_source.go` (`DataSourceDirectory()`): Add `saml_properties` structure to schema. (`dataSourceDirectoryRead()`): Store `directory.SamlProperties` in `saml_properties` structure. * `directory_data_source_test.go` (`testAccDirectoryDataSource_basic()`): Validate `saml_properties` structure data matches resource object. `testAccDirectoryDataSourceConfig_basic()`: Add `saml_properties` structure to reference object. * `directory_test.go` (`testAccDirectory_basic()`): Validate default values of `saml_properties` structure. (`testAccDirectory_SamlProperties()`): Validate `saml_properties` structure is correctly mutated. (`TestExpandSAMLProperties()`): Unit test expander. (`TestFlattenSAMLProperties()`): Unit test flattener. (`testAccDirectoryConfig_samlPropertiesFull()`): Helper to generate state for `testAccDirectory_SamlProperties()`. (`testAccDirectoryConfig_samlPropertiesRSPN()`): Helper to generate state for `testAccDirectory_SamlProperties()`. (`testAccDirectoryConfig_samlPropertiesUAU()`): Helper to generate state for `testAccDirectory_SamlProperties()`. (`testAccDirectoryConfig_samlPropertiesEmpty()`): Helper to generate state for `testAccDirectory_SamlProperties()`. * `workspaces_test.go` (`TestAccWorkSpaces_serial()`): Add `testAccDirectory_SamlProperties` as subtest. * `workspaces_directory.html.markdown`: Document new `saml_properties` structure.
Community NoteVoting for Prioritization
For Submitters
|
* `directory_data_source_test.go` (`testAccDirectoryDataSource_basic()`): Make `saml_properties` testing more robust. (`testAccDirectoryDataSourceConfig_basic()`): Remove use of hardcoded URI, replace with dynamic value.
With the modification to % make testacc TESTS=TestAccWorkSpacesDataSource_serial/Directory PKG=workspaces
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/workspaces/... -v -count 1 -parallel 20 -run='TestAccWorkSpacesDataSource_serial/Directory' -timeout 360m
=== RUN TestAccWorkSpacesDataSource_serial
=== PAUSE TestAccWorkSpacesDataSource_serial
=== CONT TestAccWorkSpacesDataSource_serial
=== RUN TestAccWorkSpacesDataSource_serial/Directory
=== RUN TestAccWorkSpacesDataSource_serial/Directory/basic
--- PASS: TestAccWorkSpacesDataSource_serial (781.68s)
--- PASS: TestAccWorkSpacesDataSource_serial/Directory (781.68s)
--- PASS: TestAccWorkSpacesDataSource_serial/Directory/basic (781.68s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/workspaces786.621s |
# Conflicts: # internal/service/workspaces/directory.go # internal/service/workspaces/directory_data_source.go # internal/service/workspaces/directory_test.go
…ed by blank lines'.
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.
LGTM 🚀.
% CCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccWorkSpaces_serial/^Directory$$/basic\|TestAccWorkSpacesDataSource_serial/^Directory$$/basic\|TestAccWorkSpacesDataSource_serial/^Directory$$/workspaceSamlProperties' PKG=workspaces
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/workspaces/... -v -count 1 -parallel 20 -run=TestAccWorkSpaces_serial/^Directory$/basic\|TestAccWorkSpacesDataSource_serial/^Directory$/basic\|TestAccWorkSpacesDataSource_serial/^Directory$/workspaceSamlProperties -timeout 360m
2024/10/15 13:14:56 Initializing Terraform AWS Provider...
=== RUN TestAccWorkSpacesDataSource_serial
=== PAUSE TestAccWorkSpacesDataSource_serial
=== RUN TestAccWorkSpaces_serial
=== PAUSE TestAccWorkSpaces_serial
=== CONT TestAccWorkSpacesDataSource_serial
=== CONT TestAccWorkSpaces_serial
=== RUN TestAccWorkSpacesDataSource_serial/Directory
=== RUN TestAccWorkSpaces_serial/Directory
=== RUN TestAccWorkSpacesDataSource_serial/Directory/basic
=== RUN TestAccWorkSpaces_serial/Directory/basic
--- PASS: TestAccWorkSpaces_serial (669.87s)
--- PASS: TestAccWorkSpaces_serial/Directory (669.87s)
--- PASS: TestAccWorkSpaces_serial/Directory/basic (669.87s)
--- PASS: TestAccWorkSpacesDataSource_serial (689.60s)
--- PASS: TestAccWorkSpacesDataSource_serial/Directory (689.60s)
--- PASS: TestAccWorkSpacesDataSource_serial/Directory/basic (689.60s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/workspaces 694.649s
@ablackrw Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.72.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. |
Description
Adds the
saml_properties
structure within theaws_workspaces_directory
resource and datasource to allow Terraform management of the SAML 2.0 integration in AWS Workspaces.Relations
Closes #29359
References
Setting up SAML 2.0
Output from Acceptance Testing