File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ if ! [[ -x "$(command -v az)" ]]; then
35
35
fi
36
36
37
37
RESOURCE_GROUP=" k8s-infra-tf-states-rg"
38
- RESOURCE_GROUP_LOCATION=$( az group show --name $RESOURCE_GROUP --output tsv --query ' location ' )
38
+ RESOURCE_GROUP_LOCATION=" ${RESOURCE_GROUP_LOCATION :- eastus} "
39
39
TAGS=
" ${TAGS:- " DO-NOT-DELETE=true [email protected] " } "
40
40
41
41
# storage accounts rules: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage
42
42
# TODO define a role assignement with Azure Entra Groups
43
43
readonly TERRAFORM_STATE_BUCKET_ENTRIES=(
44
44
k8sinfratfstatesub
45
- k8sinfratfstatekops
45
+ k8sinfratfstateprow
46
46
)
47
47
48
48
function ensure_terraform_state_containers() {
@@ -69,15 +69,15 @@ function ensure_terraform_state_containers() {
69
69
70
70
if [[ $container_exists != " false" ]]; then
71
71
echo " Creating storage container terraform-state in $storage_account "
72
- az storage container create --name " terraform-state" --connection-string " $storage_connection_string " --tags " ${TAGS} "
72
+ az storage container create --name " terraform-state" --connection-string " $storage_connection_string "
73
73
fi
74
74
done
75
75
}
76
76
77
77
function main() {
78
78
if [ " $( az group exists --name $RESOURCE_GROUP ) " = false ]; then
79
79
echo " creating resource group $RESOURCE_GROUP ..."
80
- az group create -n " $RESOURCE_GROUP " -l " $LOCATION " --tags " ${TAGS} " -o none
80
+ az group create -n " $RESOURCE_GROUP " -l " $RESOURCE_GROUP_LOCATION " --tags " ${TAGS} " -o none
81
81
echo " resource group $RESOURCE_GROUP created"
82
82
else
83
83
echo " resource group $RESOURCE_GROUP already exists"
You can’t perform that action at this time.
0 commit comments