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

Unable to set auto_destroy_activity_duration for workspaces in a project with no default timeframe #1560

Open
1natedawg opened this issue Jan 8, 2025 · 1 comment
Labels

Comments

@1natedawg
Copy link
Contributor

Terraform version

1.10.4

Terraform Configuration Files

resource "tfe_project" "sandbox_automation" {
  organization = tfe_organization.org.name
  name         = "Sandbox"
}

resource "tfe_workspace" "sandbox_workspace" {
  name              = "tfc-sbx-${var.sandbox_name}"
  organization      = var.tfc_organization
  terraform_version = var.sandbox_tf_version
  project_id        = tfe_project.sandbox_automation.id
  auto_destroy_activity_duration = "14d"
}

Expected Behavior

I expected it to set the workspace's inactivity timer to destroy after 14 days.

Actual Behavior

I got the following error:

Error: Error updating workspace <redacted>: invalid attribute Auto destroy activity duration workspace auto destroy duration must match project auto destroy duration, consider setting inherits_project_auto_destroy to false

Additional Context

The project has no default duration set on it. It sounds like we just need to add that inherits_project_auto_destroy flag as an option to the tfe_workspace resource. I'm happy to take a stab at submitting a PR for it, but just wanted to report it and make sure I'm not missing something first.

@1natedawg 1natedawg added the bug label Jan 8, 2025
@simonxmh
Copy link
Contributor

simonxmh commented Jan 8, 2025

Hey @1natedawg, thanks for the issue! This is being actively worked on, will get back to you on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants