-
Notifications
You must be signed in to change notification settings - Fork 122
Add write-only password support to elasticsearch_security_user resource #1419
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
…able Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
…ons, fix password_wo version logic Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
All PR review comments have been addressed. Latest commit: 4832692 |
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
PR comment addressed. Commit: 25b0fb7 |
|
@copilot |
Co-authored-by: tobio <444668+tobio@users.noreply.github.com>
Fixed Go formatting by removing trailing whitespace. |
Migration Plan: elasticsearch_security_user to Plugin Framework + Write-Only Attributes
Phase 1: Migrate from SDKv2 to Plugin Framework ✅
internal/elasticsearch/security/user/system_userpatternuser_test.gotouser/acc_test.goTestAccResourceSecurityUserFromSDKtest for seamless migrationprovider/plugin_framework.goprovider/provider.gouser_shared.gofor data source compatibilityuser.goanduser_test.gofilesPhase 2: Add Write-Only Attribute Support ✅
password_woandpassword_wo_versionattributes to schemapassword_woandpassword_wo_versionTestAccResourceSecurityUserWithPasswordWoacceptance testPhase 3: Address PR Review Feedback ✅
ConflictsWith,PreferWriteOnlyAttribute, andAlsoRequiresvalidatorsSizeAtLeast(1)validator for rolesPutUserandDeleteUserto return Framework diagnostics directlypassword_wofrom config instead of plan (per Terraform write-only guidelines)Summary
Successfully migrated
elasticsearch_security_userresource from Terraform SDKv2 to Plugin Framework and added write-only password support for ephemeral resources.Key Features:
password_woandpassword_wo_versionattributes allow using ephemeral resources (like Vault secrets) without storing passwords in statePutUserandDeleteUserfunctionspassword_wofrom config rather than planTesting:
Original prompt
elasticsearch_security_user#1295💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.