Skip to content

Commit b594cc5

Browse files
committed
Merge remote-tracking branch 'origin/main' into fuzzer-runner-docker
2 parents d3706dc + 3fd7770 commit b594cc5

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ crs-instance-id:
8787
deploy:
8888
@echo "Deploying environment..."
8989
@if [ ! -f deployment/env ]; then \
90-
echo "Error: Configuration file not found. Run 'make setup-local' first."; \
90+
echo "Error: Configuration file not found. Run 'make setup-local' or `make setup-azure` first."; \
9191
exit 1; \
9292
fi
9393
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
**Note:** Buttercup uses third-party AI providers (LLMs from companies like OpenAI, Anthropic and Google), which cost money. Please ensure that you manage per-deployment costs by using the built-in LLM budget setting.
2525

26-
**Note:** Buttercup works best with access to models from OpenAI **and** Anthropic, but can be run with at least one API key from one third-party provider. You can a combination of OpenAI, Anthropic, and Google LLMs.
26+
**Note:** Buttercup works best with access to models from OpenAI **and** Anthropic, but can be run with at least one API key from one third-party provider. You can use a combination of OpenAI, Anthropic, and Google LLMs.
2727

2828
### Supported Systems
2929

scripts/setup-azure.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ setup_service_principal() {
4141
else
4242
print_success "Using RESOURCE_GROUP_NAME from deployment/env: $RESOURCE_GROUP_NAME"
4343
fi
44+
RESOURCE_GROUP_LOCATION="${TF_VAR_resource_group_location:-}"
45+
if [ -z "$RESOURCE_GROUP_LOCATION" ] || [ "$RESOURCE_GROUP_LOCATION" = "<your-resource-group-location>" ]; then
46+
read -p "Enter resource group location (default: eastus): " RESOURCE_GROUP_LOCATION
47+
if [ -z "$RESOURCE_GROUP_LOCATION" ]; then
48+
RESOURCE_GROUP_LOCATION="eastus"
49+
print_status "No value provided. Using default: $RESOURCE_GROUP_LOCATION"
50+
fi
51+
else
52+
print_success "Using RESOURCE_GROUP_LOCATION from deployment/env: $RESOURCE_GROUP_LOCATION"
53+
fi
4454

4555
# Check if resource group exists, if not ask to create it
4656
if ! az group show --name "$RESOURCE_GROUP_NAME" >/dev/null 2>&1; then
@@ -53,7 +63,7 @@ setup_service_principal() {
5363
fi
5464

5565
print_status "Creating resource group: $RESOURCE_GROUP_NAME"
56-
az group create --name "$RESOURCE_GROUP_NAME" --location eastus
66+
az group create --name "$RESOURCE_GROUP_NAME" --location "$RESOURCE_GROUP_LOCATION"
5767
print_success "Resource group created successfully"
5868
else
5969
print_success "Using existing resource group: $RESOURCE_GROUP_NAME"
@@ -66,6 +76,13 @@ setup_service_principal() {
6676
echo "export TF_VAR_resource_group_name=\"$RESOURCE_GROUP_NAME\"" >> deployment/env
6777
fi
6878

79+
# Write RESOURCE_GROUP_LOCATION to deployment/env (uncomment or add line)
80+
if grep -q '^[# ]*export TF_VAR_resource_group_location=' deployment/env; then
81+
portable_sed "s|^[# ]*export TF_VAR_resource_group_location=.*|export TF_VAR_resource_group_location=\"$RESOURCE_GROUP_LOCATION\"|" deployment/env
82+
else
83+
echo "export TF_VAR_resource_group_location=\"$RESOURCE_GROUP_LOCATION\"" >> deployment/env
84+
fi
85+
6986
# Only prompt to create a new service principal if TF_VAR_ARM_CLIENT_ID and TF_VAR_ARM_CLIENT_SECRET are not set
7087
if [ -z "$TF_VAR_ARM_CLIENT_ID" ] || [ "$TF_VAR_ARM_CLIENT_ID" = "<your-client-id>" ] || [ -z "$TF_VAR_ARM_CLIENT_SECRET" ] || [ "$TF_VAR_ARM_CLIENT_SECRET" = "<your-client-secret>" ]; then
7188
read -p "Do you want to create a new service principal? (y/N): " -n 1 -r

0 commit comments

Comments
 (0)