From f8c80d6d2b26235778573cab1811b5f270bd2095 Mon Sep 17 00:00:00 2001 From: Bernard Grymonpon Date: Thu, 14 Dec 2023 14:33:31 +0100 Subject: [PATCH] Added clarifiction in the documentation --- README.md | 14 +++++++++++++- docs/resources/kubectl_manifest.md | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62ea32ff..25bcdf81 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ terraform { } ``` -#### Install manually +### Install manually If you don't want to use the one-liner above, you can download a binary for your system from the [release page](https://github.com/alekc/terraform-provider-kubectl/releases), then either place it at the root of your Terraform folder or in the Terraform plugin folder on your system. @@ -77,6 +77,18 @@ YAML See [User Guide](https://registry.terraform.io/providers/alekc/kubectl/latest) for details on installation and all the provided data and resource types. +## Changing providers for existing resources + +When you used another fork of this provider in the past, it is possible to change the provider on all existing resources within your state. A common use-case of this is to switch from `gavinbunney/kubectl` towards this fork. + +Change the `required_providers` sections in your main code and in all used modules to reflect the usage of `alekc/kubectl` as shown above. Once this is done, use the `state replace-provider` to make the switch on all existing resources in your state. + +``` +terraform state replace-provider gavinbunney/kubectl alekc/kubectl +``` + +You should then `terraform init`, and the next terraform actions will use this provider. + --- ## Development Guide diff --git a/docs/resources/kubectl_manifest.md b/docs/resources/kubectl_manifest.md index 44869867..a180509f 100644 --- a/docs/resources/kubectl_manifest.md +++ b/docs/resources/kubectl_manifest.md @@ -119,8 +119,8 @@ Optional: * `namespace` - Extracted object namespace from `yaml_body`. * `uid` - Kubernetes unique identifier from last run. * `live_uid` - Current uuid from Kubernetes. -* `yaml_incluster` - Current yaml within Kubernetes. -* `live_manifest_incluster` - Current manifest within Kubernetes. +* `yaml_incluster` - A fingerprint of the current yaml within Kubernetes. +* `live_manifest_incluster` - A fingerprint of the current manifest within Kubernetes. ## Sensitive Fields