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

[Bug] cloudavenue_iam_user_saml Unexpected new value for quotas #875

Closed
jbphilippe-orange opened this issue Dec 9, 2024 · 2 comments · Fixed by #957
Closed

[Bug] cloudavenue_iam_user_saml Unexpected new value for quotas #875

jbphilippe-orange opened this issue Dec 9, 2024 · 2 comments · Fixed by #957
Labels
bug Bug community Community related

Comments

@jbphilippe-orange
Copy link

jbphilippe-orange commented Dec 9, 2024

Terraform Core Version

1.10.1

Cloud Avenue Provider Version

0.22.0

Affected Resource(s)

cloudavenue_iam_user_saml

Expected Behavior

No errors when "deployed_vm_quota" or "stored_vm_quotas" is not 0

Actual Behavior

│ Error: Provider produced inconsistent result after apply

│ When applying changes to module.users_chartres["john_doe"].cloudavenue_iam_user_saml.saml_user[0], provider
│ "provider["registry.terraform.io/orange-cloudavenue/cloudavenue"].chartres" produced an unexpected new value: .deployed_vm_quota: was cty.NumberIntVal(2),
│ but now cty.NumberIntVal(0).
.

│ This is a bug in the provider, which should be reported in the provider's own issue tracker.


│ Error: Provider produced inconsistent result after apply

│ When applying changes to module.users_chartres["john_doe"].cloudavenue_iam_user_saml.saml_user[0], provider
│ "provider["registry.terraform.io/orange-cloudavenue/cloudavenue"].chartres" produced an unexpected new value: .stored_vm_quota: was cty.NumberIntVal(3),
│ but now cty.NumberIntVal(0)
.

│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Through a module , but I'm using following resource :

resource "cloudavenue_iam_user_saml" "saml_user" {

  user_name         = var.user.name
  role_name         = var.user.role
  enabled           = var.user.enabled                                # Default true
  take_ownership    = var.user.take_ownership               # Default true
  deployed_vm_quota = var.user.deployed_vm_quota   # Default 0
  stored_vm_quota   = var.user.stored_vm_quota           # Default 0
}

**TFvars :** 
_users = [
  {
    deployed_vm_quota = 3
    description       = "SAML John Doe User"
    email_address     = "john.doe@mail.com"
    enabled           = true
    full_name         = "John Doe"
    instant_messaging = null
    is_group_role     = true
    is_external       = true
    is_locked         = false
    name              = "john_doe"
    password          = "P@ssw01rd_JOHN"
    provider_type     = "SAML"
    role              = "PS_vAppAuthor_Network"
    stored_vm_quota   = 3
    take_ownership    = true
    telephone         = "0123456789"
  }
]_

Steps to Reproduce

resource "cloudavenue_iam_user_saml" "saml_user" {

  user_name         = "user
  role_name         = "role"
  deployed_vm_quota = 3   # Default 0
  stored_vm_quota   = 3     # Default 0
}

terraform init
terrfaform plan
terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@azrod azrod added the community Community related label Dec 9, 2024
@azrod
Copy link
Member

azrod commented Dec 20, 2024

Hi @jbphilippe-orange,

Have you tried with a real user ?

Because in our test we test the definition of quotas

// * Change Quotas
{
TFConfig: testsacc.GenerateFromTemplate(resourceName, `
resource "cloudavenue_iam_user_saml" "example" {
user_name = "mickael.stanislas.ext"
role_name = "Organization Administrator"
enabled = true
deployed_vm_quota = 10
stored_vm_quota = 5
}`),
Checks: []resource.TestCheckFunc{
resource.TestCheckResourceAttr(resourceName, "user_name", "mickael.stanislas.ext"),
resource.TestCheckResourceAttr(resourceName, "role_name", "Organization Administrator"),
resource.TestCheckResourceAttr(resourceName, "enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "deployed_vm_quota", "10"),
resource.TestCheckResourceAttr(resourceName, "stored_vm_quota", "5"),
resource.TestCheckResourceAttr(resourceName, "take_ownership", "true"),
},
},

@github-actions github-actions bot removed the bug label Jan 2, 2025
@azrod azrod added the bug Bug label Jan 6, 2025
@azrod azrod changed the title [Bug]: cloudavenue_iam_user_saml : Unexpected new value for quotas [Bug] cloudavenue_iam_user_saml Unexpected new value for quotas Jan 6, 2025
@azrod
Copy link
Member

azrod commented Jan 9, 2025

@jbphilippe-orange @yfe-ob

Were you able to try ?

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

Successfully merging a pull request may close this issue.

2 participants