File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
environments/site/tofu/example-backends Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,15 @@ per-checkout configuration is required.
109
109
110
110
# ## Initial setup
111
111
112
- 1. Create an S3 bucket matching the current environment name:
112
+ 1. Create an S3 bucket with a name ` ${cluster_name} -${environment_name} -tfstate`
113
+ where:
114
+ - ` CLUSTER_NAME` is defined in ` environments/$ENV /tofu/main.tf`
115
+ - ` $ENVIRONMENT_NAME ` is the name of the environment directory
116
+
117
+ e.g.
113
118
114
119
` ` ` shell
115
- openstack container create $( basename $APPLIANCES_ENVIRONMENT_ROOT )
120
+ openstack container create research-staging-tfstate
116
121
` ` `
117
122
118
123
2. Create ` ec2` credentials:
Original file line number Diff line number Diff line change @@ -4,12 +4,10 @@ variable "s3_backend_endpoint" {
4
4
default = # Set this here
5
5
}
6
6
7
- variable " s3"
8
-
9
7
terraform {
10
8
backend "s3" {
11
9
endpoint = var. s3_backend_endpoint
12
- bucket = basename (var. environment_root )
10
+ bucket = " ${ var . cluster_name } - ${ basename (var. environment_root )} -tfstate "
13
11
key = " environment.tfstate"
14
12
15
13
# Reginon is required but not used in radosgw:
You can’t perform that action at this time.
0 commit comments