diff --git a/README.md b/README.md index e4b038d..6ff8978 100644 --- a/README.md +++ b/README.md @@ -129,27 +129,20 @@ In other words, the clone team functionality will only assign existing users and The cloner defaults to leaving variables on the destination instance as-is. -Some use cases can trip you up. If you find variables aren't being cloned correctly (and they are not sensitive variables), the recommendation is to delete the variables you want cloned in the destination instance and let the default behavior take over. The cloner does the best it can, but it cannot account for odd and/or random configurations. - -#### Existing Values On your source space you have the variable `Testing.Variable` and it is set to `Test`. On the destination instance that same variable exists and it is set to `Super Test`. By default the cloner will leave the value on the destination instance as `Super Test`. To update that value to match the source you will have to set the parameter `OverwriteExistingVariables` to `$true`. **The default for the paramter `OverwriteExistingVariables` is `$false`.** -#### Variable Ordering - -Consider this variable set with the variable `AWS.Region.Subnet`. It has two values. - -![](img/variable-set-order.png) - -What is tricky is the variables are not stored together in the database. Rather they are two separate entities. - -The first value is the first item returned in the variable set array. - -![](img/variable-set-values-part-1.png) - -The second value doesn't appear until the end of the variable set array. +The space cloner will never overwrite a sensitive variable. -![](img/variable-set-values-part-2.png) +The space cloner matches variables by comparing: +- Names +- Sensitive Values vs Non Sensitive Values +- Environment Scoping +- Channel Scoping +- Process Scoping +- Machine Scoping +- Step Scoping +- Role Scoping -The cloner will match the variable by name, then by scoping. \ No newline at end of file +If you add a scope, the space cloner will see that as a new variable value and add it. Same is true for changing from sensitive to non-sensitive or vice versa. \ No newline at end of file diff --git a/docs/HowItWorks.md b/docs/HowItWorks.md index 0ea43cd..8c1c855 100644 --- a/docs/HowItWorks.md +++ b/docs/HowItWorks.md @@ -68,12 +68,12 @@ This script was designed to be run multiple times with the same parameters. It - Environments (match by name) - Feeds (match by name) - Infrastructure Accounts (match by name) -- Library Variable Set Sensitive variables (match by name) +- Library Variable variables (see below) - Packages (match by package name and version) - Project Items - Channels (match by name) - Deployment Process steps (match by name) - - Library Variable Set Sensitive variables (match by name) + - Variable Set (match by name) - Runbook Process steps (match by name) - Worker Pools (match by name) - Workers (match by name) @@ -81,6 +81,26 @@ This script was designed to be run multiple times with the same parameters. It - Targets (match by name) - Tenants (match by name) +### Variable Matching + +The cloner defaults to leaving variables on the destination instance as-is. **The space cloner will never overwrite a sensitive variable.** + +On your source space you have the variable `Testing.Variable` and it is set to `Test`. On the destination instance that same variable exists and it is set to `Super Test`. By default the cloner will leave the value on the destination instance as `Super Test`. To update that value to match the source you will have to set the parameter `OverwriteExistingVariables` to `$true`. + +**The default for the paramter `OverwriteExistingVariables` is `$false`.** + +The space cloner matches variables by comparing: +- Names +- Sensitive Values vs Non Sensitive Values +- Environment Scoping +- Channel Scoping +- Process Scoping +- Machine Scoping +- Step Scoping +- Role Scoping + +If you add a scope, the space cloner will see that as a new variable value and add it. Same is true for changing from sensitive to non-sensitive or vice versa. + ## Limitations Because this is hitting the Octopus Restful API, it cannot decrypt items from the Octopus Database. To decrypt items from the Octopus database, you'll need access to the master key and the database. This script was designed to run on an Octopus Cloud instance. You, the user, do not have access to that information.