Skip to content
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

Update bicep references #1645

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/scripts/validate_bicep.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def validate_file(f):
)
stderr = result.stderr.decode("utf-8")
exitcode = result.returncode

warning_prefix = "WARNING: The following experimental Bicep features"
if stderr.startswith(warning_prefix) and "Error" not in stderr:
stderr = ""
exitcode = 0

if exitcode != 0:
failures.append(f)
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
name: Validate Bicep Code
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Download rad-bicep
- name: Setup and verify bicep CLI
run: |
oras pull ghcr.io/radius-project/radius/bicep/rad-bicep/linux-x64:latest
chmod +x rad-bicep
curl -Lo rad-bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./rad-bicep
./rad-bicep --version
- name: Check out repo
uses: actions/checkout@v4
- name: Verify Bicep files
run: python ./.github/scripts/validate_bicep.py
11 changes: 11 additions & 0 deletions bicepconfig.json
sk593 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"experimentalFeaturesEnabled": {
"extensibility": true,
"extensionRegistry": true,
"dynamicTypeLoading": true
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
}
}
4 changes: 2 additions & 2 deletions samples/aws-sqs/sqs.bicep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import aws as aws
import radius as radius
extension aws
extension radius

param environment string
param queue_name string
Expand Down
4 changes: 2 additions & 2 deletions samples/aws/awss3.bicep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import aws as aws
import radius as radius
extension aws
extension radius

param environment string

Expand Down
2 changes: 1 addition & 1 deletion samples/dapr/dapr-azure.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

param location string = resourceGroup().location
param environment string
Expand Down
6 changes: 3 additions & 3 deletions samples/dapr/dapr.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('Specifies the environment for resources.')
param environment string
Expand Down Expand Up @@ -83,10 +83,10 @@ resource stateStore 'Applications.Dapr/stateStores@2023-10-01-preview' = {
}
}

import kubernetes as kubernetes{
extension kubernetes with {
kubeConfig: ''
namespace: namespace
}
} as kubernetes

resource statefulset 'apps/StatefulSet@v1' = {
metadata: {
Expand Down
2 changes: 1 addition & 1 deletion samples/demo/app.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

param application string
param environment string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/infra/dapr-pub-sub.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/infra/dapr-secret-store.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/infra/dapr-state-store.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/infra/gateway.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/infra/sql-server.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/main.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Azure region where the resources will be deployed.')
param location string = resourceGroup().location
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/basket-api.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/blazor-client.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/catalog-api.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/identity-api.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/ordering-api.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/payment-api.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/seq.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/webshopping-agg.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/webshopping-gw.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

param appId string

Expand Down
2 changes: 1 addition & 1 deletion samples/eshop-dapr/services/webstatus.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The Radius application ID.')
param appId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/environments/aws.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

@description('Account ID of the AWS account resources should be deployed in')
param awsAccountId string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/environments/azure.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

@description('The name of the Azure resource group where Azure resources will be deployed.')
param azureResourceGroup string
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/eshop.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// Parameters -------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions samples/eshop/infra/infra.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

@description('Radius environment ID')
param environment string
Expand Down Expand Up @@ -113,4 +113,4 @@ output rabbitmq string = rabbitmq.name
output servicebus string = servicebus.name

@description('Event Bus connection string')
output eventBusConnectionString string = (AZURESERVICEBUSENABLED == 'True') ? servicebus.secrets('connectionString') : rabbitmq.properties.host
output eventBusConnectionString string = (AZURESERVICEBUSENABLED == 'True') ? servicebus.listSecrets().connectionString : rabbitmq.properties.host
2 changes: 1 addition & 1 deletion samples/eshop/infra/networking.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ------------------------------------------------------------
@description('Radius application ID')
Expand Down
4 changes: 2 additions & 2 deletions samples/eshop/services/basket.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// Parameters ---------------------------------------------------------

Expand Down Expand Up @@ -46,7 +46,7 @@ resource basket 'Applications.Core/containers@2023-10-01-preview' = {
PORT: '80'
GRPC_PORT: '81'
AzureServiceBusEnabled: AZURESERVICEBUSENABLED
ConnectionString: redisBasket.connectionString()
ConnectionString: redisBasket.listSecrets().connectionString
EventBusConnection: eventBusConnectionString
identityUrl: 'http://identity-api:5105'
IdentityUrlExternal: '${gateway.properties.url}/identity-api'
Expand Down
4 changes: 2 additions & 2 deletions samples/eshop/services/catalog.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// Parameters ---------------------------------------------------------

Expand Down Expand Up @@ -51,7 +51,7 @@ resource catalog 'Applications.Core/containers@2023-10-01-preview' = {
PicBaseUrl: PICBASEURL
AzureStorageEnabled: 'False'
AzureServiceBusEnabled: AZURESERVICEBUSENABLED
ConnectionString: sqlCatalogDb.connectionString()
ConnectionString: sqlCatalogDb.listSecrets().connectionString
EventBusConnection: eventBusConnectionString
}
ports: {
Expand Down
6 changes: 3 additions & 3 deletions samples/eshop/services/identity.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down Expand Up @@ -35,9 +35,9 @@ resource identity 'Applications.Core/containers@2023-10-01-preview' = {
ASPNETCORE_URLS: 'http://0.0.0.0:80'
OrchestratorType: 'K8S'
IsClusterEnv: 'True'
DPConnectionString: redisKeystore.connectionString()
DPConnectionString: redisKeystore.listSecrets().connectionString
EnableDevspaces: 'False'
ConnectionString: sqlIdentityDb.connectionString()
ConnectionString: sqlIdentityDb.listSecrets().connectionString
MvcClient: '${gateway.properties.url}/webmvc'
SpaClient: gateway.properties.url
BasketApiClient: '${gateway.properties.url}/basket-api'
Expand Down
8 changes: 4 additions & 4 deletions samples/eshop/services/ordering.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down Expand Up @@ -53,7 +53,7 @@ resource ordering 'Applications.Core/containers@2023-10-01-preview' = {
PATH_BASE: '/ordering-api'
GRPC_PORT: '81'
PORT: '80'
ConnectionString: sqlOrderingDb.connectionString()
ConnectionString: sqlOrderingDb.listSecrets().connectionString
EventBusConnection: eventBusConnectionString
identityUrl: 'http://identity-api:5105'
IdentityUrlExternal: '${gateway.properties.url}/identity-api'
Expand Down Expand Up @@ -99,7 +99,7 @@ resource orderbgtasks 'Applications.Core/containers@2023-10-01-preview' = {
'Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ': 'Verbose'
ORCHESTRATOR_TYPE: 'K8S'
AzureServiceBusEnabled: AZURESERVICEBUSENABLED
ConnectionString: sqlOrderingDb.connectionString()
ConnectionString: sqlOrderingDb.listSecrets().connectionString
EventBusConnection: eventBusConnectionString
}
ports: {
Expand Down Expand Up @@ -133,7 +133,7 @@ resource orderingsignalrhub 'Applications.Core/containers@2023-10-01-preview' =
IsClusterEnv: 'True'
AzureServiceBusEnabled: AZURESERVICEBUSENABLED
EventBusConnection: eventBusConnectionString
SignalrStoreConnectionString: '${redisKeystore.properties.host}:${redisKeystore.properties.port},password=${redisKeystore.password()},abortConnect=False'
SignalrStoreConnectionString: '${redisKeystore.properties.host}:${redisKeystore.properties.port},password=${redisKeystore.listSecrets().password},abortConnect=False'
identityUrl: 'http://identity-api:5105'
IdentityUrlExternal: '${gateway.properties.url}/identity-api'
}
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/services/payment.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/services/seq.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions samples/eshop/services/web.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down Expand Up @@ -34,7 +34,7 @@ resource webspa 'Applications.Core/containers@2023-10-01-preview' = {
ORCHESTRATOR_TYPE: 'K8S'
IsClusterEnv: 'True'
CallBackUrl: '${gateway.properties.url}/'
DPConnectionString: redisKeystore.connectionString()
DPConnectionString: redisKeystore.listSecrets().connectionString
IdentityUrl: '${gateway.properties.url}/identity-api'
IdentityUrlHC: 'http://identity-api:5105/liveness'
PurchaseUrl: '${gateway.properties.url}/webshoppingapigw'
Expand Down Expand Up @@ -94,7 +94,7 @@ resource webmvc 'Applications.Core/containers@2023-10-01-preview' = {
ASPNETCORE_URLS: 'http://0.0.0.0:80'
PATH_BASE: '/webmvc'
UseCustomizationData: 'False'
DPConnectionString: redisKeystore.connectionString()
DPConnectionString: redisKeystore.listSecrets().connectionString
UseLoadTest: 'False'
ORCHESTRATOR_TYPE: 'K8S'
IsClusterEnv: 'True'
Expand Down
4 changes: 2 additions & 2 deletions samples/eshop/services/webhooks.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down Expand Up @@ -43,7 +43,7 @@ resource webhooks 'Applications.Core/containers@2023-10-01-preview' = {
ASPNETCORE_URLS: 'http://0.0.0.0:80'
ORCHESTRATOR_TYPE: 'K8S'
AzureServiceBusEnabled: AZURESERVICEBUSENABLED
ConnectionString: sqlWebhooksDb.connectionString()
ConnectionString: sqlWebhooksDb.listSecrets().connectionString
EventBusConnection: eventBusConnectionString
identityUrl: 'http://identity-api:5105'
IdentityUrlExternal: '${gateway.properties.url}/identity-api'
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/services/webshopping.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/services/webstatus.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

// PARAMETERS ---------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion samples/volumes/app.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

param environment string

Expand Down
Loading