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

local debian repositories have id drift. #1200

Closed
5 tasks done
madelaney opened this issue Feb 14, 2025 · 7 comments · Fixed by #1212
Closed
5 tasks done

local debian repositories have id drift. #1200

madelaney opened this issue Feb 14, 2025 · 7 comments · Fixed by #1212
Assignees
Labels
bug Something isn't working

Comments

@madelaney
Copy link

Describe the bug
While nothing has changed, on either the Artifactory side, or terraform, I get always get changes like the following:

  # artifactory_local_debian_repository.ubuntu_nightly will be updated in-place
  ~ resource "artifactory_local_debian_repository" "ubuntu_nightly" {
      ~ id                        = "ubuntu-nightly" -> (known after apply)
        # (13 unchanged attributes hidden)
    }

For the full code for this repo, see: https://gist.github.com/madelaney/5449bd445c1490b2ef87b47ef43d3e2f

The terraform version is:

tf --version
Terraform v1.5.7
on darwin_arm64
+ provider registry.terraform.io/hashicorp/null v3.2.3
+ provider registry.terraform.io/hashicorp/random v3.6.3
+ provider registry.terraform.io/jfrog/artifactory v12.8.4
+ provider registry.terraform.io/jfrog/platform v1.19.1

Your version of Terraform is out of date! The latest version
is 1.10.5. You can update by downloading from https://www.terraform.io/downloads.html

The artifactory version is:

"7.104.6"

Requirements for and issue

  • A description of the bug
  • A fully functioning terraform snippet that can be copy&pasted (no outside files or ENV vars unless that's part of the issue). If this is not supplied, this issue will likely be closed without any effort expended.
  • Your version of artifactory (you can curl it at $host/artifactory/api/system/version
  • Your version of terraform
  • Your version of terraform provider

Expected behavior
I would expect that terraform plan or terraform apply would not need to actually apply anything but it alwasy wants to update the id.

Additional context
N/A

@madelaney madelaney added the bug Something isn't working label Feb 14, 2025
@alexhung
Copy link
Member

@madelaney Which version of the provider is used to created this repository originally? A ballpark (i.e. major.minor) version would suffice.

@alexhung
Copy link
Member

Possible related to #1186

@madelaney
Copy link
Author

@alexhung , the repos were created with artifactory provider revision 10.3.3

@alexhung
Copy link
Member

@madelaney Can you check if this is still an issue with the latest release v12.9.0?

@erlarson85
Copy link

erlarson85 commented Feb 21, 2025

I'm having drift for the ID's on both Debian local and RPM local repos.

Installed jfrog/artifactory v12.9.0
Installed jfrog/platform v2.2.1
Installed jfrog/project v1.9.3

resource "artifactory_local_rpm_repository" "afs" {
  key                    = "afs"
  repo_layout_ref        = "simple-default"
  includes_pattern       = "**/*"
  calculate_yum_metadata = true
  yum_root_depth         = "2"
  xray_index             = true
}
 # artifactory_local_rpm_repository.afs will be updated in-place
  ~ resource "artifactory_local_rpm_repository" "afs" {
      ~ id                         = "afs" -> (known after apply)

Apply:
artifactory_local_rpm_repository.afs: Modifying... [id=afs]

Applying plan from 12.9.0 doesn't resolve the drift. Nothing is changing in the state either.
This is related to 1189 that I chimed in on as well.

@zamanh
Copy link

zamanh commented Feb 21, 2025

@alexhung Yep, confirmed after upgrade to 12.9 I am also seeing ID drift. My diff is below:

# artifactory_local_debian_repository.repo-debian will be updated in-place
~ resource "artifactory_local_debian_repository" "repo-debian" {
    ~ id = "repo-debian" -> (known after apply)
      # (20 unchanged attributes hidden)
  }

# artifactory_local_debian_repository.repo-input will be updated in-place
~ resource "artifactory_local_debian_repository" "repo-input" {
    ~ id = "repo-input" -> (known after apply)
      # (20 unchanged attributes hidden)
  }

# artifactory_local_debian_repository.repo-debianorg will be updated in-place
~ resource "artifactory_local_debian_repository" "repo-debianorg" {
    ~ id = "repo-debianorg" -> (known after apply)
      # (20 unchanged attributes hidden)
  }

# artifactory_local_debian_repository.repo-build will be updated in-place
~ resource "artifactory_local_debian_repository" "repo-build" {
    ~ id = "repo-build" -> (known after apply)
      # (20 unchanged attributes hidden)
  }

# artifactory_remote_docker_repository.repo-docker will be updated in-place
~ resource "artifactory_remote_docker_repository" "repo-docker" {
    ~ id = "repo-docker" -> (known after apply)
      # (47 unchanged attributes hidden)
  }

# artifactory_remote_rpm_repository.repo-rpm will be updated in-place
~ resource "artifactory_remote_rpm_repository" "repo-rpm" {
    ~ id = "repo-rpm" -> (known after apply)
      # (41 unchanged attributes hidden)
  }

@alexhung
Copy link
Member

@erlarson85 @zamanh Thanks for the update. I'm glad last release resolves the project_environments diff issue. I'll try to reproduce and fix the id issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants