-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Provider version:
terraform {
required_providers {
project = {
source = "registry.terraform.io/jfrog/project"
version = "1.9.5"
}
}
}Adding a user to a custom role like this:
variable "role1_actions" {
type = list(string)
default = ["READ_REPOSITORY"]
}
resource "project_environment" "myenv" {
project_key = "my_lab"
name = "myenv"
}
resource "project_role" "role1" {
project_key = "my_lab"
name = "role1"
type = "CUSTOM"
actions = var.role1_actions
environments = ["${project_environment.myenv.project_key}-${project_environment.myenv.name}"]
}
resource "project_user" "user1" {
project_key = "my_lab"
name = "some_user"
roles = ["role1"]
}Generates this block in terraform.tfstate:
{
"mode": "managed",
"type": "project_user",
"name": "some_user",
"provider": "provider[\"registry.terraform.io/jfrog/project\"]",
"instances": [
{
"schema_version": 1,
"attributes": {
"id": "my_lab:some_user",
"ignore_missing_user": false,
"name": "some_user",
"project_key": "my_lab",
"roles": [
"role1"
]
},
"sensitive_attributes": [],
"identity_schema_version": 0
}
]
}If I remove the user, it is only removed from terraform.tfstate, not from the role in the Artifactory Project.
Also, every time I run terraform plan it reports that already existing users will be added again.
Requirements for an issue
- A fully functioning terraform snippet that can be copy&pasted (no outside files or ENV vars unless that's part of the issue)
- Your version of artifactory (you can
curlit at$host/artifactory/api/system/version: JFrog Platform
Enterprise Plus 7.117.7 rev 81707900 - Your version of terraform: Tested with Terraform
v1.13.4andv1.14.1on windows_amd64
Expected behavior
The other terraform Resources behaves as expected in that when I remove a resource from my terraform source code the resource is deleted in Artifactory.
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working