fix: refactor publish command
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 13s
CI Workflow / CI (pull_request) Failing after 29s
Publish / Check GoReleaser config (pull_request) Has been skipped
CI Workflow / Code coverage report (pull_request) Has been skipped
Publish / Publish provider (pull_request) Has been skipped
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 13s
CI Workflow / CI (pull_request) Failing after 29s
Publish / Check GoReleaser config (pull_request) Has been skipped
CI Workflow / Code coverage report (pull_request) Has been skipped
Publish / Publish provider (pull_request) Has been skipped
feat: add connection info fix: prevent postgresql from failing when encryption is empty
This commit is contained in:
parent
5ec2ab8c67
commit
3a2daf9c56
8 changed files with 650 additions and 425 deletions
|
|
@ -247,16 +247,20 @@ func (r *instanceResource) Create(
|
|||
}
|
||||
|
||||
func modelToCreateInstancePayload(netAcl []string, model postgresflexalpha.InstanceModel, replVal int32) postgresflex.CreateInstanceRequestPayload {
|
||||
payload := postgresflex.CreateInstanceRequestPayload{
|
||||
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
|
||||
Encryption: &postgresflex.InstanceEncryption{
|
||||
var enc postgresflex.InstanceEncryption
|
||||
if !model.Encryption.IsNull() && !model.Encryption.IsUnknown() {
|
||||
enc = postgresflex.InstanceEncryption{
|
||||
KekKeyId: model.Encryption.KekKeyId.ValueStringPointer(),
|
||||
KekKeyRingId: model.Encryption.KekKeyRingId.ValueStringPointer(),
|
||||
KekKeyVersion: model.Encryption.KekKeyVersion.ValueStringPointer(),
|
||||
ServiceAccount: model.Encryption.ServiceAccount.ValueStringPointer(),
|
||||
},
|
||||
FlavorId: model.FlavorId.ValueStringPointer(),
|
||||
Name: model.Name.ValueStringPointer(),
|
||||
}
|
||||
}
|
||||
payload := postgresflex.CreateInstanceRequestPayload{
|
||||
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
|
||||
Encryption: &enc,
|
||||
FlavorId: model.FlavorId.ValueStringPointer(),
|
||||
Name: model.Name.ValueStringPointer(),
|
||||
Network: &postgresflex.InstanceNetwork{
|
||||
AccessScope: postgresflex.InstanceNetworkGetAccessScopeAttributeType(
|
||||
model.Network.AccessScope.ValueStringPointer(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue