Closed LaurentLesle closed 2 years ago
Support hybrid azurerm and remote
rover \ -lz /tf/caf/landingzones/caf_solution \ -var-folder /tf/caf/configuration/level1/identity \ -tfstate_subscription_id 0000000-00000-0000-00000-000000 \ -target_subscription 0000000-00000-0000-00000-000000 \ -tfstate identity.tfstate \ -env contoso \ -level level1 \ -p ${TF_DATA_DIR}/identity.tfstate.tfplan \ -a plan
landingzone = { backend_type = "azurerm" level = "level1" key = "identity" global_settings_key = "launchpad" tfstates = { launchpad = { tfstate = "caf_launchpad.tfstate" workspace = "tfstate" level = "lower" } } }
landingzone = { backend_type = "azurerm" level = "level1" key = "identity" global_settings_key = "launchpad" tfstates = { launchpad = { backend_type = "remote" organization = "aztfmod" workspace = "contoso_level0_caf_launchpad" } } }
rover \ -lz /tf/caf/landingzones/caf_solution \ -var-folder /tf/caf/configuration/level1/identity \ -tfstate_subscription_id 0000000-00000-0000-00000-000000 \ -target_subscription 0000000-00000-0000-00000-000000 \ -tfstate identity.tfstate \ -env contoso \ -level level1 \ -p ${TF_DATA_DIR}/identity.tfstate.tfplan \ -remote_organization aztfmod \ -a migrate -force-copy -input=false
once completed update the landingzone.tfvars from
landingzone = { backend_type = "**azurerm**" level = "level1" key = "identity" global_settings_key = "launchpad" tfstates = { launchpad = { backend_type = "remote" organization = "aztfmod" workspace = "contoso_level0_caf_launchpad" } } }
to
landingzone = { backend_type = "**remote**" level = "level1" key = "identity" global_settings_key = "launchpad" tfstates = { launchpad = { backend_type = "remote" organization = "aztfmod" workspace = "contoso_level0_caf_launchpad" } } }
rover \ -lz /tf/caf/landingzones/caf_solution \ -var-folder /tf/caf/configuration/level1/identity \ -target_subscription 0000000-00000-0000-00000-000000 \ -tfstate identity.tfstate \ -env contoso \ -level level1 \ -remote_organization aztfmod \ -a apply
Support hybrid azurerm and remote
Azurerm only
Update remote state migrated to remote while keeping the state of the current deployment to azurerm
Migrate an existing tfstate from azurerm to remote backend type
once completed update the landingzone.tfvars from
to
rover command to execute plan and apply against TFC/TFE in local mode