Skip to content
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

Data retention policy #1170

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

mwudka
Copy link
Contributor

@mwudka mwudka commented Dec 14, 2023

Description

Add data retention policy attributes to organization and workspace resources

Remember to:

Testing plan

In addition to automated tests, manually plan/apply config that looks something like this:

resource "tfe_organization" "test-organization" {
  name  = "my-org-name"
  email = "[email protected]"

  data_retention_policy {
    delete_older_than_n_days = 12
  }
}

resource "tfe_workspace" "test-workspace" {
  name = "drp-workspace"
  organization = tfe_organization.test-organization.name

  data_retention_policy {
    delete_older_than_n_days = 8
  }
}
  • Ensure that creating/updating/deleting data retention policies works fine
  • Ensure that workspaces/orgs with data retention policies are imported correctly
  • Ensure the provider works properly when run against TFE/TFC that doesn't have data retention policy support

External links

Output from acceptance tests

Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.

If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.

$  ENABLE_TFE=1 TESTARGS="-run DataRetentionPolicy" make testacc
=== RUN   TestAccTFEOrganization_updateDataRetentionPolicy
--- PASS: TestAccTFEOrganization_updateDataRetentionPolicy (40.12s)
=== RUN   TestAccTFEOrganization_importDataRetentionPolicy
--- PASS: TestAccTFEOrganization_importDataRetentionPolicy (13.97s)
=== RUN   TestAccTFEWorkspace_updateDataRetentionPolicy
--- PASS: TestAccTFEWorkspace_updateDataRetentionPolicy (40.48s)
=== RUN   TestAccTFEWorkspace_importDataRetentionPolicy
--- PASS: TestAccTFEWorkspace_importDataRetentionPolicy (19.69s)

@mwudka mwudka force-pushed the mwudka/TF-8622-data-retention-policy branch from e4f4808 to 40c1a36 Compare December 14, 2023 01:18
@mwudka mwudka marked this pull request as ready for review December 14, 2023 01:18
@mwudka mwudka requested a review from a team as a code owner December 14, 2023 01:18
@mwudka mwudka force-pushed the mwudka/TF-8622-data-retention-policy branch from 40c1a36 to 5f9888a Compare December 20, 2023 19:21
@mwudka mwudka force-pushed the mwudka/TF-8622-data-retention-policy branch from 5f9888a to f8bb7a3 Compare January 2, 2024 18:37
@mwudka mwudka force-pushed the mwudka/TF-8622-data-retention-policy branch from f8bb7a3 to f2b1c8e Compare January 2, 2024 18:43
@mwudka mwudka marked this pull request as draft January 3, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant