Backport #2108 to release/v14 for #2113
Please add this issue to the proper milestone.
Copied from PR:
Addresses #2102
Description
Add field auth_provider on resource rancher2_custom_user_token to generate token for ActiveDirectory user or others. If not set, default is local.
I change DoUserLogin function to use v3 API first, instead to continue to use v1. On my Rancher (2.13.1), the v1 api is still here, so it never use the new v3 API. It seems the v3 api support more auth provider like ping or custom_oidc.
Testing
I have compiled the binaire and put it on ~/.terraform.d/plugins/terraform.local/local/rancher2/0.1.1/linux_amd64/terraform-provider-rancher2.
You need to have Rancher with ActiveDirectory Auth provider setted (or other)
Then:
provider "rancher2" {
api_url = "https://rancher.local.domain"
insecure = true
token_key = "xxx"
}
resource "rancher2_custom_user_token" "test_ad" {
auth_provider = "activedirectory"
username = "user1"
password = "xxx"
description = "foo token"
ttl = 0
}
To finish:
Not a breaking change.
Backport #2108 to release/v14 for #2113
Please add this issue to the proper milestone.
Copied from PR:
Addresses #2102
Description
Add field
auth_provideron resourcerancher2_custom_user_tokento generate token for ActiveDirectory user or others. If not set, default islocal.I change DoUserLogin function to use v3 API first, instead to continue to use v1. On my Rancher (2.13.1), the v1 api is still here, so it never use the new v3 API. It seems the v3 api support more auth provider like
pingorcustom_oidc.Testing
I have compiled the binaire and put it on
~/.terraform.d/plugins/terraform.local/local/rancher2/0.1.1/linux_amd64/terraform-provider-rancher2.You need to have Rancher with ActiveDirectory Auth provider setted (or other)
Then:
To finish:
Not a breaking change.