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

Not detecting auto_destroy_activity_duration drift #1444

Open
ben-codner-dx opened this issue Aug 19, 2024 · 0 comments
Open

Not detecting auto_destroy_activity_duration drift #1444

ben-codner-dx opened this issue Aug 19, 2024 · 0 comments
Labels

Comments

@ben-codner-dx
Copy link

ben-codner-dx commented Aug 19, 2024

Terraform Enterprise version

We are using Terraform Cloud

Terraform version

1.5.0

Terraform Configuration Files

resource "tfe_workspace" "main" {
  name                  = "sandbox-01"
  organization          = tfe_organization.this.name
  project_id            = tfe_project.all["sandbox"].id
  working_directory     = "sandbox-01"
  file_triggers_enabled = true
  trigger_prefixes      = ["sandbox-01"]
  terraform_version     = "1.5.2"
  remote_state_consumer_ids = try([
    for consumer in var.consumers : tfe_workspace.consumers[consumer].id
  ], null)

  ssh_key_id                     = "<redacted>"
  auto_apply                     = false
  global_remote_state            = false
  allow_destroy_plan             = true
  auto_destroy_activity_duration = try(var.auto_destroy_activity_duration, null)
  vcs_repo {
    identifier     = var.vcs_repo_identifier
    branch         = var.vcs_repo_branch
    oauth_token_id = sensitive(data.tfe_oauth_client.this.oauth_token_id)
  }

  tag_names = [
    "sandbox-01"
  ]
}

Debug Output

2024-08-16T17:08:22.439-0600 [INFO]  Terraform version: 1.5.7
2024-08-16T17:08:22.439-0600 [DEBUG] using github.com/hashicorp/go-tfe v1.26.0
2024-08-16T17:08:22.439-0600 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2
2024-08-16T17:08:22.439-0600 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0
2024-08-16T17:08:22.439-0600 [DEBUG] using github.com/zclconf/go-cty v1.12.2
2024-08-16T17:08:22.439-0600 [INFO]  Go runtime version: go1.20.7
2024-08-16T17:08:22.439-0600 [INFO]  CLI args: []string{"/Users/user1/.asdf/installs/terraform/1.5.7/bin/terraform", "plan"}
2024-08-16T17:08:22.439-0600 [TRACE] Stdout is a terminal of width 216
2024-08-16T17:08:22.439-0600 [TRACE] Stderr is a terminal of width 216
2024-08-16T17:08:22.439-0600 [TRACE] Stdin is a terminal
2024-08-16T17:08:22.439-0600 [DEBUG] Attempting to open CLI config file: /Users/user1/.terraformrc
2024-08-16T17:08:22.440-0600 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2024-08-16T17:08:22.441-0600 [INFO]  Loading CLI configuration from /Users/user1/.terraform.d/credentials.tfrc.json
2024-08-16T17:08:22.447-0600 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-08-16T17:08:22.447-0600 [DEBUG] ignoring non-existing provider search directory /Users/user1/.terraform.d/plugins
2024-08-16T17:08:22.447-0600 [DEBUG] ignoring non-existing provider search directory /Users/user1/Library/Application Support/io.terraform/plugins
2024-08-16T17:08:22.447-0600 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2024-08-16T17:08:22.448-0600 [INFO]  CLI command args: []string{"plan"}
2024-08-16T17:08:22.462-0600 [TRACE] Meta.Backend: built configuration for "cloud" backend with hash value 3935644113
2024-08-16T17:08:22.463-0600 [TRACE] Preserving existing state lineage "<redacted>"
2024-08-16T17:08:22.463-0600 [TRACE] Preserving existing state lineage "<redacted>"
2024-08-16T17:08:22.464-0600 [TRACE] Meta.Backend: working directory was previously initialized for "cloud" backend
2024-08-16T17:08:22.464-0600 [TRACE] Meta.Backend: using already-initialized, unchanged "cloud" backend configuration
2024-08-16T17:08:22.464-0600 [DEBUG] Service discovery for app.terraform.io at https://app.terraform.io/.well-known/terraform.json
2024-08-16T17:08:22.464-0600 [TRACE] HTTP client GET request to https://app.terraform.io/.well-known/terraform.json
2024-08-16T17:08:23.304-0600 [TRACE] Meta.BackendForPlan: backend *cloud.Cloud supports operations
2024-08-16T17:08:23.304-0600 [DEBUG] Service discovery for app.terraform.io aliased as localterraform.com
2024-08-16T17:08:23.304-0600 [TRACE] Meta.Backend: instantiated backend of type *cloud.Cloud
2024-08-16T17:08:23.311-0600 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers
2024-08-16T17:08:23.314-0600 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/carlpett/sops v1.0.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/carlpett/sops/1.0.0/darwin_arm64
2024-08-16T17:08:23.316-0600 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/aws v4.67.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/aws/4.67.0/darwin_arm64
2024-08-16T17:08:23.318-0600 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/hcp v0.82.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/hcp/0.82.0/darwin_arm64
2024-08-16T17:08:23.320-0600 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/tfe v0.57.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/tfe/0.57.0/darwin_arm64
2024-08-16T17:08:23.320-0600 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/carlpett/sops/1.0.0/darwin_arm64 as a candidate package for registry.terraform.io/carlpett/sops 1.0.0
2024-08-16T17:08:23.320-0600 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/aws/4.67.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/aws 4.67.0
2024-08-16T17:08:23.320-0600 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/hcp/0.82.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/hcp 0.82.0
2024-08-16T17:08:23.320-0600 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/tfe/0.57.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/tfe 0.57.0
2024-08-16T17:08:23.344-0600 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers
2024-08-16T17:08:23.631-0600 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers
2024-08-16T17:08:23.669-0600 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers
2024-08-16T17:08:23.685-0600 [DEBUG] checking for provisioner in "."
2024-08-16T17:08:23.685-0600 [DEBUG] checking for provisioner in "/Users/user1/.asdf/installs/terraform/1.5.7/bin"
2024-08-16T17:08:23.685-0600 [TRACE] Meta.Backend: backend *cloud.Cloud supports operations
2024-08-16T17:08:23.839-0600 [INFO]  cloud: starting Plan operation
...
I have reviewed the rest of trace log and it doesn't provide any meaningful data. just refreshing data on the ws-#
...
╵
2024-08-16T17:11:15.079-0600 [DEBUG] performing request: method=GET url=https://app.terraform.io/api/v2/plans/plan-<redacted>/json-output-redacted

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Expected Behavior

auto_destroy_activity_duration drift should be detected

Actual Behavior

when a workspace has auto_destroy_activity_duration removed from the console, Terraform doesn't detect it has drifted.

Additional Context

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

1 participant