-
Notifications
You must be signed in to change notification settings - Fork 34
Multiple backends #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello. name: example
kind: Project
backend: aws-backend # save cdev state in aws s3
variables:
organization: cluster-dev
region: eu-central-1
state_bucket_name: cluster-dev-gha-tests stack.yaml name: aws-backend
kind: Backend
provider: s3
spec:
bucket: {{ .project.variables.state_bucket_name }}
region: {{ .project.variables.region }}
---
name: azurerm-backend
kind: backend
provider: azurerm
spec:
resource_group_name: "StorageAccount-ResourceGroup"
storage_account_name: "example"
container_name: "cdev-states"
---
name: aws-stack
template: https://...
kind: Stack
backend: aws-backend # save tf states in aws s3
---
name: azure-stack
template: https://...
kind: Stack
backend: azurerm-backend # save tf states in azure Does this answer the question? |
I've suspended PoC for cdev for now, but I'd like to report the following. We are using Azure Blob Storage (ABS), we have multiple stacks in our project that use separate Subscriptions. I can manually switch Subscriptions with the command If I am in Subscription1 and if we have a Stack using Subscription1 in the backend. And Cdev itself is using Subscription2, then plan/apply gives an error (just the string “Error”), if you enable debug, you will see that it can't access Blob Storage for Cdev itself. So we have several subscriptions in our configuration and we need to define where to save the states of cdev itself and if I specify one of them (in the |
Understood, i changed label of this issue to |
We have multiple subscriptions in a cloud provider and we would like to store the state files for each StackTemplate in separate storages (backends). The documentation says (https://docs.cluster.dev/structure-project):
That is, it seems to be the way it was intended, since this parameter is optional in the Project. However, the
validate
andplan
commands produce an error:Thus I can't specify multiple backends. If this is not a bug, I would like to request such a feature, thank you very much!
The text was updated successfully, but these errors were encountered: