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]: max_age field not deleted from resource #2365

Open
mchorvat3ipk opened this issue Nov 19, 2024 · 0 comments
Open

[Bug]: max_age field not deleted from resource #2365

mchorvat3ipk opened this issue Nov 19, 2024 · 0 comments
Labels

Comments

@mchorvat3ipk
Copy link

Terraform Core Version

v1.9.6

Terraform Vault Provider Version

v4.4.0

Vault Server Version

1.17.6

Affected Resource(s)

No response

Expected Behavior

The vault_jwt_auth_backend_role resource shoud be the same after removing the 'max_age' field.

Actual Behavior

described in Steps to Reproduce

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "vault_jwt_auth_backend_role" "google" {
role_name = "google"
user_claim = "email" # users are mapped by uniq id from google
backend = vault_jwt_auth_backend.google.path
role_type = vault_jwt_auth_backend.google.type
bound_audiences = [var.oauth_client_id]
allowed_redirect_uris = ["${var.vault_addr}/ui/vault/auth/oidc/oidc/callback"]

access to email info

oidc_scopes = ["openid", "email"]
claim_mappings = { "email" = "email" }

assignes vault policies (by name)

token_policies = ["default_google"]

Set token TTL to 1 day (24 hours)

token_ttl = 86400

token_max_ttl = 86400

Specifies the allowable elapsed time in seconds

since the last time the user was actively authenticated with the OIDC provider.

max_age = 0

when setting max_age, and then removing, the whole resource needs to be deleted and then created again

depends_on = [vault_jwt_auth_backend.google]
}

Steps to Reproduce

Uncomment max_age, terrafrom apply, comment out max_age, terrafrom apply.

This the last apply does not remove the max_age from the resource, and the whole resource needs to be removed and created again, in order to make the login working again.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@mchorvat3ipk mchorvat3ipk changed the title [Bug]: [Bug]: max_age field not deleted from resource Nov 19, 2024
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