Skip to content

Commit

Permalink
Fix ssh_certificate_type not set on project update (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
somerandow authored Oct 13, 2022
1 parent 7fe0c3f commit 3b99d9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions oktapam/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func resourceProjectUpdate(ctx context.Context, d *schema.ResourceData, m interf
attributes.SSHSessionRecording,
attributes.GatewaySelector,
attributes.UserOnDemandPeriod,
attributes.SSHCertificateType,
}

for _, attribute := range changeableAttributes {
Expand Down
6 changes: 3 additions & 3 deletions oktapam/resource_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestAccProject(t *testing.T) {
RDPSessionRecording: utils.AsBoolPtrZero(true, true),
SSHSessionRecording: utils.AsBoolPtrZero(true, true),
GatewaySelector: utils.AsStringPtr("env=test"),
SSHCertificateType: utils.AsStringPtr("CERT_TYPE_ED25519_01"),
SSHCertificateType: utils.AsStringPtr("CERT_TYPE_RSA_01"),
UserOnDemandPeriod: utils.AsIntPtr(10),
}
resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestAccProject(t *testing.T) {
resourceName, attributes.NextUnixGID, "63400",
),
resource.TestCheckResourceAttr(
resourceName, attributes.SSHCertificateType, "CERT_TYPE_ED25519_01",
resourceName, attributes.SSHCertificateType, "CERT_TYPE_RSA_01",
),
resource.TestCheckResourceAttr(
resourceName, attributes.UserOnDemandPeriod, "10",
Expand Down Expand Up @@ -168,7 +168,7 @@ resource "oktapam_project" "test_project" {
rdp_session_recording = true
ssh_session_recording = true
gateway_selector = "env=test"
ssh_certificate_type = "CERT_TYPE_ED25519_01"
ssh_certificate_type = "CERT_TYPE_RSA_01"
user_on_demand_period = 10
}`

Expand Down

0 comments on commit 3b99d9b

Please sign in to comment.