Add support for base64-encoded application logos #2522
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for uploading application logos using base64-encoded data instead of requiring local file paths. This enhancement provides better flexibility for automation and CI/CD workflows where managing local files is cumbersome.
Changes
Core Implementation
logo_base64field to all app resource schemasLogoBase64IsValid()function to validate base64 data and enforce 1MB size limitUploadApplicationLogoFromBase64()insdk/v2_application.gologoandlogo_base64mutually exclusive usingConflictsWithResources Updated
All 9 app resources now support
logo_base64:okta_app_bookmarkokta_app_auto_loginokta_app_basic_authokta_app_shared_credentialsokta_app_swaokta_app_three_fieldokta_app_secure_password_storeokta_app_oauthokta_app_samlDocumentation
logo_base64field for all app resourcesUsage Example
Before (File Path):
After (Base64):
Testing
go buildgo fmtmake docsChecklist
Following the contributing guidelines:
go fmtConflictsWithlogofield)Benefits
filebase64()function directlylogofield continues to work as beforeNotes
This is my first contribution to the Okta Terraform provider. I've done my best to follow all contributing guidelines and would appreciate any feedback or suggestions for improvements!