terraform-provider-tfe
terraform-provider-tfe copied to clipboard
tfe_workspace resource does not support auto-destroy features
Terraform Cloud
Terraform version
v1.5.7
Terraform Configuration Files
resource "tfe_workspace" "test" {
name = "my-workspace-name"
organization = "my-organization-name"
}
Debug Output
N/A
Expected Behavior
We manage terraform cloud workspaces completely with this provider. We would like to manage the auto-destroy features.
Actual Behavior
When managing the tfe_workspace resource, we are unable to set auto-destroy setting to enable destroy at a specific time or if inactive after a set period of time.
Additional Context
Hi! We're planning on adding this soon. It might look something like this:
resource "tfe_organization" "test-organization" {
name = "my-org-name"
email = "[email protected]"
}
resource "tfe_workspace" "test" {
name = "my-workspace-name"
organization = tfe_organization.test-organization.name
auto-destroy-activity-duration = "18h"
}
And it might be easier to set it at the project level instead, like so:
resource "tfe_project" "test" {
organization = tfe_organization.test-organization.name
name = "projectname"
auto-destroy-activity-duration = "18h"
}
Would that work for you?
That would be great. I manage our organization at the workspace level so not as worried about the project setting.
Jake
On Tue, Jan 9, 2024 at 18:29 Paul Thrasher @.***> wrote:
Hi! We're planning on adding this soon. It might look something like this:
resource "tfe_organization" "test-organization" { name = "my-org-name" email = @.***" } resource "tfe_workspace" "test" { name = "my-workspace-name" organization = tfe_organization.test-organization.name auto-destroy-activity-duration = "18h" }
And it might be easier to set it at the project level instead, like so:
resource "tfe_project" "test" { organization = tfe_organization.test-organization.name name = "projectname" auto-destroy-activity-duration = "18h" }
Would that work for you?
— Reply to this email directly, view it on GitHub https://github.com/hashicorp/terraform-provider-tfe/issues/1157#issuecomment-1884049243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR4NF4V5PXLQGYHC5ABNLLYNXVI5AVCNFSM6AAAAAA756TZAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGA2DSMRUGM . You are receiving this because you authored the thread.Message ID: @.***>
Update: the dependency for this was merged last week https://github.com/hashicorp/go-tfe/pull/902
This was also shipped last week. Duration setting will come next. https://github.com/hashicorp/terraform-provider-tfe/pull/1354
Closing since all workspace auto-destroy features should be included in v0.57.0