Skip to content

Commit

Permalink
Update Radius extensibility provider for Bicep (#669)
Browse files Browse the repository at this point in the history
* update generated types from https://github.com/radius-project/radius/tree/cff7da3b4277a141da3b3907067a47e77c25c0f5/hack/bicep-types-radius/generated

* Update API version

---------

Co-authored-by: rad-ci-bot <[email protected]>
Co-authored-by: vinayada1 <[email protected]>
  • Loading branch information
3 people authored Sep 21, 2023
1 parent 00fedfc commit ff0e95c
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 93 deletions.
54 changes: 27 additions & 27 deletions src/Bicep.Core.IntegrationTests/ExtensibilityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public void Radius_location_can_be_optional()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource container 'Applications.Core/containers@2022-03-15-privatepreview' = {
resource container 'Applications.Core/containers@2023-10-01-preview' = {
name: 'mycontainer'
properties: {
application: 'myapp'
Expand All @@ -410,7 +410,7 @@ public void Radius_function_call_mongo()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview' = {
resource mongo 'Applications.Datastores/mongoDatabases@2023-10-01-preview' = {
name: 'my-mongo'
location: 'global'
properties: {
Expand All @@ -423,7 +423,7 @@ import radius as radius
}
}
resource container 'Applications.Core/containers@2022-03-15-privatepreview' = {
resource container 'Applications.Core/containers@2023-10-01-preview' = {
name: 'mycontainer'
location: 'global'
properties: {
Expand All @@ -446,9 +446,9 @@ import radius as radius
");
result.ExcludingLinterDiagnostics().Should().NotHaveAnyDiagnostics();
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION", "[listSecrets('mongo', '2022-03-15-privatepreview').connectionString]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION2", "[listSecrets('mongo', '2022-03-15-privatepreview').username]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION3", "[listSecrets('mongo', '2022-03-15-privatepreview').password]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION", "[listSecrets('mongo', '2023-10-01-preview').connectionString]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION2", "[listSecrets('mongo', '2023-10-01-preview').username]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION3", "[listSecrets('mongo', '2023-10-01-preview').password]");
}

[TestMethod]
Expand All @@ -457,7 +457,7 @@ public void Radius_function_call_redis()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource redis 'Applications.Datastores/redisCaches@2022-03-15-privatepreview' = {
resource redis 'Applications.Datastores/redisCaches@2023-10-01-preview' = {
name: 'my-redis'
location: 'global'
properties: {
Expand All @@ -469,7 +469,7 @@ import radius as radius
}
}
resource container 'Applications.Core/containers@2022-03-15-privatepreview' = {
resource container 'Applications.Core/containers@2023-10-01-preview' = {
name: 'mycontainer'
location: 'global'
properties: {
Expand All @@ -491,8 +491,8 @@ import radius as radius
");
result.ExcludingLinterDiagnostics().Should().NotHaveAnyDiagnostics();
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION", "[listSecrets('redis', '2022-03-15-privatepreview').connectionString]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION2", "[listSecrets('redis', '2022-03-15-privatepreview').password]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION", "[listSecrets('redis', '2023-10-01-preview').connectionString]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION2", "[listSecrets('redis', '2023-10-01-preview').password]");
}

[TestMethod]
Expand All @@ -501,7 +501,7 @@ public void Radius_function_call_rabbitmq()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource rabbitmq 'Applications.Messaging/rabbitMQQueues@2022-03-15-privatepreview' = {
resource rabbitmq 'Applications.Messaging/rabbitMQQueues@2023-10-01-preview' = {
name: 'my-rabbitmq'
location: 'global'
properties: {
Expand All @@ -511,7 +511,7 @@ import radius as radius
}
}
resource container 'Applications.Core/containers@2022-03-15-privatepreview' = {
resource container 'Applications.Core/containers@2023-10-01-preview' = {
name: 'mycontainer'
location: 'global'
properties: {
Expand All @@ -532,7 +532,7 @@ import radius as radius
");
result.ExcludingLinterDiagnostics().Should().NotHaveAnyDiagnostics();
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION", "[listSecrets('rabbitmq', '2022-03-15-privatepreview').connectionString]");
result.Template.Should().HaveValueAtPath("$.resources.container.properties.properties.container.env.DBCONNECTION", "[listSecrets('rabbitmq', '2023-10-01-preview').connectionString]");
}

[TestMethod]
Expand All @@ -541,7 +541,7 @@ public void Radius_function_call_extender()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource twilio 'Applications.Core/extenders@2022-03-15-privatepreview' = {
resource twilio 'Applications.Core/extenders@2023-10-01-preview' = {
name: 'my-extender'
location: 'global'
properties: {
Expand All @@ -554,7 +554,7 @@ import radius as radius
}
}
resource container 'Applications.Core/containers@2022-03-15-privatepreview' = {
resource container 'Applications.Core/containers@2023-10-01-preview' = {
name: 'mycontainer'
location: 'global'
properties: {
Expand All @@ -578,10 +578,10 @@ import radius as radius
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath(
"$.resources.container.properties.properties.container.env.TWILIO_SID",
"[listSecrets('twilio', '2022-03-15-privatepreview').accountSid]");
"[listSecrets('twilio', '2023-10-01-preview').accountSid]");
result.Template.Should().HaveValueAtPath(
"$.resources.container.properties.properties.container.env.TWILIO_ACCOUNT",
"[listSecrets('twilio', '2022-03-15-privatepreview').authToken]");
"[listSecrets('twilio', '2023-10-01-preview').authToken]");

}

Expand All @@ -591,7 +591,7 @@ public void Radius_azure_reference()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview' = {
resource mongo 'Applications.Datastores/mongoDatabases@2023-10-01-preview' = {
name: 'my-mongo'
location: 'global'
properties: {
Expand Down Expand Up @@ -624,7 +624,7 @@ import radius as radius
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath(
"$.resources.account.properties.customDomain.name",
"[listSecrets('mongo', '2022-03-15-privatepreview').connectionString]");
"[listSecrets('mongo', '2023-10-01-preview').connectionString]");
}

[TestMethod]
Expand All @@ -633,7 +633,7 @@ public void Radius_azure_reference_datastores()
var result = CompilationHelper.Compile(Services, @"
import radius as radius
resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview' = {
resource mongo 'Applications.Datastores/mongoDatabases@2023-10-01-preview' = {
name: 'my-mongo'
location: 'global'
properties: {
Expand Down Expand Up @@ -666,7 +666,7 @@ import radius as radius
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath(
"$.resources.account.properties.customDomain.name",
"[listSecrets('mongo', '2022-03-15-privatepreview').connectionString]");
"[listSecrets('mongo', '2023-10-01-preview').connectionString]");
}

[TestMethod]
Expand All @@ -681,7 +681,7 @@ import kubernetes as kubernetes {
namespace: 'default'
}
resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview' = {
resource mongo 'Applications.Datastores/mongoDatabases@2023-10-01-preview' = {
name: 'my-mongo'
location: 'global'
properties: {
Expand Down Expand Up @@ -714,10 +714,10 @@ import kubernetes as kubernetes {
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath(
"$.resources.secret.properties.stringData.connectionString",
"[format('{0}', listSecrets('mongo', '2022-03-15-privatepreview').connectionString)]");
"[format('{0}', listSecrets('mongo', '2023-10-01-preview').connectionString)]");
result.Template.Should().HaveValueAtPath(
"$.outputs.connectionString.value",
"[listSecrets('mongo', '2022-03-15-privatepreview').connectionString]");
"[listSecrets('mongo', '2023-10-01-preview').connectionString]");
}


Expand All @@ -733,7 +733,7 @@ import kubernetes as kubernetes {
namespace: 'default'
}
resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview' = {
resource mongo 'Applications.Datastores/mongoDatabases@2023-10-01-preview' = {
name: 'my-mongo'
location: 'global'
properties: {
Expand Down Expand Up @@ -766,10 +766,10 @@ import kubernetes as kubernetes {
var text = result.Template!.ToString();
result.Template.Should().HaveValueAtPath(
"$.resources.secret.properties.stringData.connectionString",
"[format('{0}', listSecrets('mongo', '2022-03-15-privatepreview').connectionString)]");
"[format('{0}', listSecrets('mongo', '2023-10-01-preview').connectionString)]");
result.Template.Should().HaveValueAtPath(
"$.outputs.connectionString.value",
"[listSecrets('mongo', '2022-03-15-privatepreview').connectionString]");
"[listSecrets('mongo', '2023-10-01-preview').connectionString]");
}

[TestMethod]
Expand Down

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Applications.Core @ 2022-03-15-privatepreview
# Applications.Core @ 2023-10-01-preview

## Resource Applications.Core/applications@2022-03-15-privatepreview
## Resource Applications.Core/applications@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -12,10 +12,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/applications' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/containers@2022-03-15-privatepreview
## Resource Applications.Core/containers@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -24,10 +24,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/containers' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/environments@2022-03-15-privatepreview
## Resource Applications.Core/environments@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -36,10 +36,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/environments' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/extenders@2022-03-15-privatepreview
## Resource Applications.Core/extenders@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -48,10 +48,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/extenders' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/gateways@2022-03-15-privatepreview
## Resource Applications.Core/gateways@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -60,10 +60,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/gateways' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/httpRoutes@2022-03-15-privatepreview
## Resource Applications.Core/httpRoutes@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -72,10 +72,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/httpRoutes' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/secretStores@2022-03-15-privatepreview
## Resource Applications.Core/secretStores@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -84,10 +84,10 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/secretStores' (ReadOnly, DeployTimeConstant): The resource type

## Resource Applications.Core/volumes@2022-03-15-privatepreview
## Resource Applications.Core/volumes@2023-10-01-preview
* **Valid Scope(s)**: Unknown
### Properties
* **apiVersion**: '2022-03-15-privatepreview' (ReadOnly, DeployTimeConstant): The resource api version
* **apiVersion**: '2023-10-01-preview' (ReadOnly, DeployTimeConstant): The resource api version
* **id**: string (ReadOnly, DeployTimeConstant): The resource id
* **location**: string (Required): The geo-location where the resource lives
* **name**: string (Required, DeployTimeConstant): The resource name
Expand All @@ -96,15 +96,15 @@
* **tags**: [TrackedResourceTags](#trackedresourcetags): Resource tags.
* **type**: 'Applications.Core/volumes' (ReadOnly, DeployTimeConstant): The resource type

## Function listSecrets (Applications.Core/extenders@2022-03-15-privatepreview)
## Function listSecrets (Applications.Core/extenders@2023-10-01-preview)
* **Resource**: Applications.Core/extenders
* **ApiVersion**: 2022-03-15-privatepreview
* **ApiVersion**: 2023-10-01-preview
* **Input**: any
* **Output**: any

## Function listSecrets (Applications.Core/secretStores@2022-03-15-privatepreview)
## Function listSecrets (Applications.Core/secretStores@2023-10-01-preview)
* **Resource**: Applications.Core/secretStores
* **ApiVersion**: 2022-03-15-privatepreview
* **ApiVersion**: 2023-10-01-preview
* **Input**: any
* **Output**: [SecretStoreListSecretsResult](#secretstorelistsecretsresult)

Expand Down
Loading

0 comments on commit ff0e95c

Please sign in to comment.