This pull request introduces a new attribute, log_retention_period_in_days, to the environment settings data source, DTO, and models, along with corresponding test updates. The changes ensure that the retention period for audit logs can be optionally specified and computed.
Key changes include:
Schema and Models Updates:
Added log_retention_period_in_days attribute to the EnvironmentSettingsDataSource schema in datasource_environment_settings.go.
Added AuditRetentionPeriodV2 field to the environmentSettingsDto struct in dto.go.
Updated AuditSettingsSourceModel to include log_retention_period_in_days in models.go.
Conversion Functions:
Modified convertFromEnvironmentSettingsModel to handle AuditRetentionPeriodV2 in models.go.
Updated convertFromEnvironmentSettingsDto to map AuditRetentionPeriodV2 to log_retention_period_in_days in models.go.
Test Updates:
Added checks for log_retention_period_in_days in various test functions in datasource_environment_settings_test.go[1] and resource_environment_settings_test.go[2][3][4][5][6][7].
This pull request introduces a new attribute,
log_retention_period_in_days
, to the environment settings data source, DTO, and models, along with corresponding test updates. The changes ensure that the retention period for audit logs can be optionally specified and computed.Key changes include:
Schema and Models Updates:
log_retention_period_in_days
attribute to theEnvironmentSettingsDataSource
schema indatasource_environment_settings.go
.AuditRetentionPeriodV2
field to theenvironmentSettingsDto
struct indto.go
.AuditSettingsSourceModel
to includelog_retention_period_in_days
inmodels.go
.Conversion Functions:
convertFromEnvironmentSettingsModel
to handleAuditRetentionPeriodV2
inmodels.go
.convertFromEnvironmentSettingsDto
to mapAuditRetentionPeriodV2
tolog_retention_period_in_days
inmodels.go
.Test Updates:
log_retention_period_in_days
in various test functions indatasource_environment_settings_test.go
[1] andresource_environment_settings_test.go
[2] [3] [4] [5] [6] [7].