Skip to content

Adding missing code to handle dataguard creation with external HSM #2311

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions internal/service/database/database_database_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,17 @@ func (s *DatabaseDatabaseResourceCrud) mapToCreateStandbyDetails(fieldKeyFormat
result.SourceDatabaseId = &tmp
}

if sourceEncryptionKeyLocationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_encryption_key_location_details")); ok {
if tmpList := sourceEncryptionKeyLocationDetails.([]interface{}); len(tmpList) > 0 {
fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "source_encryption_key_location_details"), 0)
tmp, err := s.mapToEncryptionKeyLocationDetails(fieldKeyFormatNextLevel)
if err != nil {
return result, fmt.Errorf("unable to convert source_encryption_key_location_details, encountered error: %v", err)
}
result.SourceEncryptionKeyLocationDetails = tmp
}
}

if sourceTdeWalletPassword, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_tde_wallet_password")); ok {
tmp := sourceTdeWalletPassword.(string)
result.SourceTdeWalletPassword = &tmp
Expand Down