This repository was archived by the owner on Jan 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,23 @@ data "template_file" "config" {
2424
2525# https://www.terraform.io/docs/providers/kubernetes/guides/getting-started.html
2626# https://www.terraform.io/docs/providers/kubernetes/index.html
27+ # https://www.terraform.io/docs/configuration/providers.html#alias-multiple-provider-instances
2728provider "kubernetes" {
28- config_path = " ${ var . kube_config_path } "
29- load_config_file = " ${ var . enabled == " true" } "
29+ alias = " aws_iam_authenticator"
30+
31+ # Even when this module is disabled, if a previous, enabled version created
32+ # kubernetes_config_map.aws_iam_authenticator
33+ # you will need to provide a valid kube_config_path to enable terraform to query and delete that resource
34+ config_path = " ${ var . kube_config_path } "
35+
36+ load_config_file = true
3037}
3138
3239# https://github.com/kubernetes/kops/blob/master/docs/authentication.md
3340# https://github.com/kubernetes-sigs/aws-iam-authenticator
3441resource "kubernetes_config_map" "aws_iam_authenticator" {
35- count = " ${ var . enabled == " true" ? 1 : 0 } "
42+ count = " ${ var . enabled == " true" ? 1 : 0 } "
43+ provider = " kubernetes.aws_iam_authenticator"
3644
3745 metadata {
3846 name = " aws-iam-authenticator"
You can’t perform that action at this time.
0 commit comments