diff --git a/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.json b/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.json index ac17c33e70..9cc71fcc51 100644 --- a/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.json +++ b/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.json @@ -1 +1 @@ -[{"1":{"Kind":1}},{"1":{"Kind":2}},{"1":{"Kind":3}},{"1":{"Kind":4}},{"1":{"Kind":5}},{"1":{"Kind":6}},{"1":{"Kind":7}},{"1":{"Kind":8}},{"6":{"Value":"Applications.Core/environments"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/environments","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":8,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":9,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":22,"Flags":1,"Description":"Application environment properties"},"tags":{"Type":50,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"SystemData","Properties":{"createdBy":{"Type":4,"Flags":0,"Description":"The identity that created the resource."},"createdByType":{"Type":16,"Flags":0,"Description":"The type of identity that created the resource."},"createdAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource creation (UTC)."},"lastModifiedBy":{"Type":4,"Flags":0,"Description":"The identity that last modified the resource."},"lastModifiedByType":{"Type":21,"Flags":0,"Description":"The type of identity that created the resource."},"lastModifiedAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource last modification (UTC)"}}}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[12,13,14,15]}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[17,18,19,20]}},{"2":{"Name":"EnvironmentProperties","Properties":{"provisioningState":{"Type":30,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"compute":{"Type":31,"Flags":1,"Description":"Compute resource used by application environment resource."},"providers":{"Type":38,"Flags":0,"Description":"Cloud providers configuration"},"recipes":{"Type":43,"Flags":0,"Description":"Specifies Recipes linked to the Environment."},"extensions":{"Type":49,"Flags":0,"Description":"Extensions spec of the resource"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[23,24,25,26,27,28,29]}},{"7":{"Name":"EnvironmentCompute","Discriminator":"kind","BaseProperties":{"resourceId":{"Type":4,"Flags":0,"Description":"The resource id of the compute resource for application environment."},"identity":{"Type":32,"Flags":0}},"Elements":{"kubernetes":36}}},{"2":{"Name":"IdentitySettings","Properties":{"kind":{"Type":35,"Flags":1,"Description":"Configuration for supported external identity providers"},"oidcIssuer":{"Type":4,"Flags":0,"Description":"The URI for your compute platform's OIDC issuer"},"resource":{"Type":4,"Flags":0,"Description":"The resource ID of the provisioned identity"}}}},{"6":{"Value":"undefined"}},{"6":{"Value":"azure.com.workload"}},{"5":{"Elements":[33,34]}},{"2":{"Name":"KubernetesCompute","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The namespace to use for the environment."},"kind":{"Type":37,"Flags":1,"Description":"Type of compute resource."}}}},{"6":{"Value":"kubernetes"}},{"2":{"Name":"Providers","Properties":{"azure":{"Type":39,"Flags":0,"Description":"Azure cloud provider configuration"},"aws":{"Type":40,"Flags":0,"Description":"AWS cloud provider configuration"}}}},{"2":{"Name":"ProvidersAzure","Properties":{"scope":{"Type":4,"Flags":0,"Description":"Target scope for Azure resources to be deployed into. For example: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup'"}}}},{"2":{"Name":"ProvidersAws","Properties":{"scope":{"Type":4,"Flags":0,"Description":"Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'"}}}},{"2":{"Name":"EnvironmentRecipeProperties","Properties":{"templateKind":{"Type":4,"Flags":0,"Description":"Format of the template provided by the recipe. Allowed values: bicep"},"templatePath":{"Type":4,"Flags":1,"Description":"Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported."},"parameters":{"Type":0,"Flags":0,"Description":"Any object"}}}},{"2":{"Name":"DictionaryOfEnvironmentRecipeProperties","Properties":{},"AdditionalProperties":41}},{"2":{"Name":"EnvironmentPropertiesRecipes","Properties":{},"AdditionalProperties":42}},{"7":{"Name":"EnvironmentExtension","Discriminator":"kind","BaseProperties":{},"Elements":{"kubernetesMetadata":45}}},{"2":{"Name":"EnvironmentKubernetesMetadataExtension","Properties":{"annotations":{"Type":46,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":47,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":48,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"2":{"Name":"EnvironmentKubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"EnvironmentKubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"3":{"ItemType":44}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/environments@2022-03-15-privatepreview","ScopeType":0,"Body":10}},{"6":{"Value":"Applications.Core/applications"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/applications","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":52,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":53,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":55,"Flags":1,"Description":"Application properties"},"tags":{"Type":74,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"ApplicationProperties","Properties":{"provisioningState":{"Type":63,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"environment":{"Type":4,"Flags":1,"Description":"The resource id of the environment linked to application."},"extensions":{"Type":71,"Flags":0,"Description":"Extensions spec of the resource"},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[56,57,58,59,60,61,62]}},{"7":{"Name":"ApplicationExtension","Discriminator":"kind","BaseProperties":{},"Elements":{"kubernetesMetadata":65,"kubernetesNamespace":69}}},{"2":{"Name":"ApplicationKubernetesMetadataExtension","Properties":{"annotations":{"Type":66,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":67,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":68,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"2":{"Name":"ApplicationKubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ApplicationKubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"2":{"Name":"ApplicationKubernetesNamespaceExtension","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The Kubernetes namespace to use for this application."},"kind":{"Type":70,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"6":{"Value":"kubernetesNamespace"}},{"3":{"ItemType":64}},{"2":{"Name":"ResourceStatus","Properties":{"compute":{"Type":31,"Flags":0,"Description":"Compute resource used by application environment resource."},"outputResources":{"Type":73,"Flags":0,"Description":"Array of AnyObject"}}}},{"3":{"ItemType":0}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/applications@2022-03-15-privatepreview","ScopeType":0,"Body":54}},{"6":{"Value":"Applications.Core/httpRoutes"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/httpRoutes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":76,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":77,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":79,"Flags":1,"Description":"HTTP Route properties"},"tags":{"Type":88,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"HttpRouteProperties","Properties":{"provisioningState":{"Type":87,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"hostname":{"Type":4,"Flags":0,"Description":"The internal hostname accepting traffic for the HTTP Route. Readonly."},"port":{"Type":3,"Flags":0,"Description":"The port number for the HTTP Route. Defaults to 80. Readonly."},"scheme":{"Type":4,"Flags":0,"Description":"The scheme used for traffic. Readonly."},"url":{"Type":4,"Flags":0,"Description":"A stable URL that that can be used to route traffic to a resource. Readonly."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[80,81,82,83,84,85,86]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/httpRoutes@2022-03-15-privatepreview","ScopeType":0,"Body":78}},{"6":{"Value":"Applications.Core/gateways"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/gateways","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":90,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":91,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":93,"Flags":1,"Description":"Gateway properties"},"tags":{"Type":109,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"GatewayProperties","Properties":{"provisioningState":{"Type":101,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"internal":{"Type":2,"Flags":0,"Description":"Sets Gateway to not be exposed externally (no public IP address associated). Defaults to false (exposed to internet)."},"hostname":{"Type":102,"Flags":0,"Description":"Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io."},"tls":{"Type":103,"Flags":0,"Description":"TLS configuration for the Gateway."},"routes":{"Type":108,"Flags":1,"Description":"Routes attached to this Gateway"},"url":{"Type":4,"Flags":2,"Description":"URL of the gateway resource. Readonly."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[94,95,96,97,98,99,100]}},{"2":{"Name":"GatewayPropertiesHostname","Properties":{"prefix":{"Type":4,"Flags":0,"Description":"Specify a prefix for the hostname: myhostname.myapp.PUBLICHOSTNAMEORIP.nip.io. Mutually exclusive with 'fullyQualifiedHostname' and will be overridden if both are defined."},"fullyQualifiedHostname":{"Type":4,"Flags":0,"Description":"Specify a fully-qualified domain name: myapp.mydomain.com. Mutually exclusive with 'prefix' and will take priority if both are defined."}}}},{"2":{"Name":"GatewayPropertiesTls","Properties":{"sslPassthrough":{"Type":2,"Flags":0,"Description":"If true, gateway lets the https traffic sslPassthrough to the backend servers for decryption."},"hostname":{"Type":4,"Flags":0,"Description":"Hostname"},"minimumProtocolVersion":{"Type":106,"Flags":0,"Description":"TLS minimum protocol version (defaults to 1.2)."},"certificateFrom":{"Type":4,"Flags":0,"Description":"Declares which Kubernetes TLS secret will be used."}}}},{"6":{"Value":"1.2"}},{"6":{"Value":"1.3"}},{"5":{"Elements":[104,105]}},{"2":{"Name":"GatewayRoute","Properties":{"path":{"Type":4,"Flags":0,"Description":"The path to match the incoming request path on. Ex - /myservice."},"destination":{"Type":4,"Flags":0,"Description":"The HttpRoute to route to. Ex - myserviceroute.id."},"replacePrefix":{"Type":4,"Flags":0,"Description":"Optionally update the prefix when sending the request to the service. Ex - replacePrefix: '/' and path: '/myservice' will transform '/myservice/myroute' to '/myroute'"}}}},{"3":{"ItemType":107}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/gateways@2022-03-15-privatepreview","ScopeType":0,"Body":92}},{"6":{"Value":"Applications.Core/containers"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/containers","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":111,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":112,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":114,"Flags":1,"Description":"Container properties"},"tags":{"Type":174,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"ContainerProperties","Properties":{"provisioningState":{"Type":122,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"connections":{"Type":127,"Flags":0,"Description":"Dictionary of "},"container":{"Type":128,"Flags":1,"Description":"Definition of a container."},"identity":{"Type":32,"Flags":0},"extensions":{"Type":173,"Flags":0,"Description":"Extensions spec of the resource"},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[115,116,117,118,119,120,121]}},{"2":{"Name":"ConnectionProperties","Properties":{"source":{"Type":4,"Flags":1,"Description":"The source of the connection"},"disableDefaultEnvVars":{"Type":2,"Flags":0},"iam":{"Type":124,"Flags":0,"Description":"The properties of IAM"}}}},{"2":{"Name":"IamProperties","Properties":{"kind":{"Type":125,"Flags":1,"Description":"The kind of IAM provider to configure"},"roles":{"Type":126,"Flags":0,"Description":"RBAC permissions to be assigned on the source resource"}}}},{"6":{"Value":"azure"}},{"3":{"ItemType":4}},{"2":{"Name":"ContainerPropertiesConnections","Properties":{},"AdditionalProperties":123}},{"2":{"Name":"Container","Properties":{"image":{"Type":4,"Flags":1,"Description":"The registry and image to download and run in your container"},"env":{"Type":129,"Flags":0,"Description":"Dictionary of "},"ports":{"Type":136,"Flags":0,"Description":"Dictionary of "},"readinessProbe":{"Type":137,"Flags":0,"Description":"Properties for readiness/liveness probe"},"livenessProbe":{"Type":137,"Flags":0,"Description":"Properties for readiness/liveness probe"},"volumes":{"Type":156,"Flags":0,"Description":"Dictionary of "},"command":{"Type":157,"Flags":0,"Description":"Entrypoint array. Overrides the container image's ENTRYPOINT"},"args":{"Type":158,"Flags":0,"Description":"Arguments to the entrypoint. Overrides the container image's CMD"},"workingDir":{"Type":4,"Flags":0,"Description":"Working directory for the container"}}}},{"2":{"Name":"ContainerEnv","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ContainerPort","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"protocol":{"Type":135,"Flags":0,"Description":"Protocol in use by the port"},"provides":{"Type":4,"Flags":0,"Description":"Specifies a route provided by this port"}}}},{"6":{"Value":"TCP"}},{"6":{"Value":"UDP"}},{"6":{"Value":"http"}},{"6":{"Value":"grpc"}},{"5":{"Elements":[131,132,133,134]}},{"2":{"Name":"ContainerPorts","Properties":{},"AdditionalProperties":130}},{"7":{"Name":"HealthProbeProperties","Discriminator":"kind","BaseProperties":{"initialDelaySeconds":{"Type":3,"Flags":0,"Description":"Initial delay in seconds before probing for readiness/liveness"},"failureThreshold":{"Type":3,"Flags":0,"Description":"Threshold number of times the probe fails after which a failure would be reported"},"periodSeconds":{"Type":3,"Flags":0,"Description":"Interval for the readiness/liveness probe in seconds"},"timeoutSeconds":{"Type":3,"Flags":0,"Description":"Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds"}},"Elements":{"exec":138,"httpGet":140,"tcp":143}}},{"2":{"Name":"ExecHealthProbeProperties","Properties":{"command":{"Type":4,"Flags":1,"Description":"Command to execute to probe readiness/liveness"},"kind":{"Type":139,"Flags":1,"Description":"The HealthProbeProperties kind"}}}},{"6":{"Value":"exec"}},{"2":{"Name":"HttpGetHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"path":{"Type":4,"Flags":1,"Description":"The route to make the HTTP request on"},"headers":{"Type":141,"Flags":0,"Description":"Custom HTTP headers to add to the get request"},"kind":{"Type":142,"Flags":1,"Description":"The HealthProbeProperties kind"}}}},{"2":{"Name":"HttpGetHealthProbePropertiesHeaders","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"httpGet"}},{"2":{"Name":"TcpHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"kind":{"Type":144,"Flags":1,"Description":"The HealthProbeProperties kind"}}}},{"6":{"Value":"tcp"}},{"7":{"Name":"Volume","Discriminator":"kind","BaseProperties":{"mountPath":{"Type":4,"Flags":0,"Description":"The path where the volume is mounted"}},"Elements":{"ephemeral":146,"persistent":151}}},{"2":{"Name":"EphemeralVolume","Properties":{"managedStore":{"Type":149,"Flags":1,"Description":"Backing store for the ephemeral volume"},"kind":{"Type":150,"Flags":1,"Description":"The Volume kind"}}}},{"6":{"Value":"memory"}},{"6":{"Value":"disk"}},{"5":{"Elements":[147,148]}},{"6":{"Value":"ephemeral"}},{"2":{"Name":"PersistentVolume","Properties":{"permission":{"Type":154,"Flags":0,"Description":"Container read/write access to the volume"},"source":{"Type":4,"Flags":1,"Description":"The source of the volume"},"kind":{"Type":155,"Flags":1,"Description":"The Volume kind"}}}},{"6":{"Value":"read"}},{"6":{"Value":"write"}},{"5":{"Elements":[152,153]}},{"6":{"Value":"persistent"}},{"2":{"Name":"ContainerVolumes","Properties":{},"AdditionalProperties":145}},{"3":{"ItemType":4}},{"3":{"ItemType":4}},{"7":{"Name":"ContainerExtension","Discriminator":"kind","BaseProperties":{},"Elements":{"daprSidecar":160,"kubernetesMetadata":167,"manualScaling":171}}},{"2":{"Name":"DaprSidecarExtension","Properties":{"appPort":{"Type":3,"Flags":0,"Description":"The Dapr appPort. Specifies the internal listening port for the application to handle requests from the Dapr sidecar."},"appId":{"Type":4,"Flags":1,"Description":"The Dapr appId. Specifies the identifier used by Dapr for service invocation."},"config":{"Type":4,"Flags":0,"Description":"Specifies the Dapr configuration to use for the resource."},"protocol":{"Type":165,"Flags":0,"Description":"Protocol in use by the port"},"provides":{"Type":4,"Flags":0,"Description":"Specifies the resource id of a dapr.io.InvokeHttpRoute that can route traffic to this resource."},"kind":{"Type":166,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"6":{"Value":"TCP"}},{"6":{"Value":"UDP"}},{"6":{"Value":"http"}},{"6":{"Value":"grpc"}},{"5":{"Elements":[161,162,163,164]}},{"6":{"Value":"daprSidecar"}},{"2":{"Name":"ContainerKubernetesMetadataExtension","Properties":{"annotations":{"Type":168,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":169,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":170,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"2":{"Name":"ContainerKubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ContainerKubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"2":{"Name":"ManualScalingExtension","Properties":{"replicas":{"Type":3,"Flags":0,"Description":"Replica count."},"kind":{"Type":172,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"6":{"Value":"manualScaling"}},{"3":{"ItemType":159}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/containers@2022-03-15-privatepreview","ScopeType":0,"Body":113}},{"6":{"Value":"Applications.Core/volumes"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/volumes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":176,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":177,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":179,"Flags":1},"tags":{"Type":211,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"7":{"Name":"VolumeProperties","Discriminator":"kind","BaseProperties":{"provisioningState":{"Type":187,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}},"Elements":{"azure.com.keyvault":188}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[180,181,182,183,184,185,186]}},{"2":{"Name":"AzureKeyVaultVolumeProperties","Properties":{"certificates":{"Type":201,"Flags":0,"Description":"The KeyVault certificates that this volume exposes"},"keys":{"Type":203,"Flags":0,"Description":"The KeyVault keys that this volume exposes"},"resource":{"Type":4,"Flags":1,"Description":"The ID of the keyvault to use for this volume resource"},"secrets":{"Type":209,"Flags":0,"Description":"The KeyVault secrets that this volume exposes"},"kind":{"Type":210,"Flags":1,"Description":"The volume kind"}}}},{"2":{"Name":"CertificateObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk."},"encoding":{"Type":193,"Flags":0,"Description":"Encoding format. Default utf-8"},"format":{"Type":196,"Flags":0,"Description":"Certificate format. Default pem"},"name":{"Type":4,"Flags":1,"Description":"The name of the certificate"},"certType":{"Type":200,"Flags":0,"Description":"Certificate object type to be downloaded - the certificate itself, private key or public key of the certificate"},"version":{"Type":4,"Flags":0,"Description":"Certificate version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[190,191,192]}},{"6":{"Value":"pem"}},{"6":{"Value":"pfx"}},{"5":{"Elements":[194,195]}},{"6":{"Value":"certificate"}},{"6":{"Value":"publickey"}},{"6":{"Value":"privatekey"}},{"5":{"Elements":[197,198,199]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesCertificates","Properties":{},"AdditionalProperties":189}},{"2":{"Name":"KeyObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk."},"name":{"Type":4,"Flags":1,"Description":"The name of the key"},"version":{"Type":4,"Flags":0,"Description":"Key version"}}}},{"2":{"Name":"AzureKeyVaultVolumePropertiesKeys","Properties":{},"AdditionalProperties":202}},{"2":{"Name":"SecretObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk."},"encoding":{"Type":208,"Flags":0,"Description":"Encoding format. Default utf-8"},"name":{"Type":4,"Flags":1,"Description":"The name of the secret"},"version":{"Type":4,"Flags":0,"Description":"Secret version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[205,206,207]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesSecrets","Properties":{},"AdditionalProperties":204}},{"6":{"Value":"azure.com.keyvault"}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/volumes@2022-03-15-privatepreview","ScopeType":0,"Body":178}},{"6":{"Value":"Applications.Core/secretStores"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/secretStores","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":213,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":214,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":216,"Flags":1},"tags":{"Type":234,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"SecretStoreProperties","Properties":{"provisioningState":{"Type":224,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"type":{"Type":227,"Flags":0,"Description":"The type of secret store data"},"data":{"Type":233,"Flags":1,"Description":"An object to represent key-value type secrets"},"resource":{"Type":4,"Flags":0,"Description":"The resource id of external secret store."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[217,218,219,220,221,222,223]}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[225,226]}},{"2":{"Name":"SecretValueProperties","Properties":{"encoding":{"Type":231,"Flags":0,"Description":"The encoding of value"},"value":{"Type":4,"Flags":0,"Description":"The value of secret."},"valueFrom":{"Type":232,"Flags":0}}}},{"6":{"Value":"raw"}},{"6":{"Value":"base64"}},{"5":{"Elements":[229,230]}},{"2":{"Name":"ValueFromProperties","Properties":{"name":{"Type":4,"Flags":1,"Description":"The name of the referenced secret."},"version":{"Type":4,"Flags":0,"Description":"The version of the referenced secret."}}}},{"2":{"Name":"SecretStorePropertiesData","Properties":{},"AdditionalProperties":228}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/secretStores@2022-03-15-privatepreview","ScopeType":0,"Body":215}},{"6":{"Value":"Applications.Core/extenders"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/extenders","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":236,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":237,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":6,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":239,"Flags":1,"Description":"Extender link properties"},"tags":{"Type":249,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"ExtenderProperties","Properties":{"secrets":{"Type":240,"Flags":4,"Description":"The secret values for the given Extender resource"},"provisioningState":{"Type":248,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}},"AdditionalProperties":0}},{"2":{"Name":"ExtenderSecrets","Properties":{},"AdditionalProperties":0}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[241,242,243,244,245,246,247]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/extenders@2022-03-15-privatepreview","ScopeType":0,"Body":238}},{"2":{"Name":"SecretStoreListSecretsResult","Properties":{"type":{"Type":254,"Flags":2,"Description":"The type of secret store data"},"data":{"Type":255,"Flags":2,"Description":"An object to represent key-value type secrets"}}}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[252,253]}},{"2":{"Name":"SecretStoreListSecretsResultData","Properties":{},"AdditionalProperties":228}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/secretStores","ApiVersion":"2022-03-15-privatepreview","Output":251}},{"2":{"Name":"ExtenderSecrets","Properties":{},"AdditionalProperties":0}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/extenders","ApiVersion":"2022-03-15-privatepreview","Output":257}}] \ No newline at end of file +[{"1":{"Kind":1}},{"1":{"Kind":2}},{"1":{"Kind":3}},{"1":{"Kind":4}},{"1":{"Kind":5}},{"1":{"Kind":6}},{"1":{"Kind":7}},{"1":{"Kind":8}},{"6":{"Value":"Applications.Core/environments"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/environments","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":8,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":9,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":22,"Flags":1,"Description":"Application environment properties"},"tags":{"Type":50,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"SystemData","Properties":{"createdBy":{"Type":4,"Flags":0,"Description":"The identity that created the resource."},"createdByType":{"Type":16,"Flags":0,"Description":"The type of identity that created the resource."},"createdAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource creation (UTC)."},"lastModifiedBy":{"Type":4,"Flags":0,"Description":"The identity that last modified the resource."},"lastModifiedByType":{"Type":21,"Flags":0,"Description":"The type of identity that created the resource."},"lastModifiedAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource last modification (UTC)"}}}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[12,13,14,15]}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[17,18,19,20]}},{"2":{"Name":"EnvironmentProperties","Properties":{"provisioningState":{"Type":30,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"compute":{"Type":31,"Flags":1,"Description":"Compute resource used by application environment resource."},"providers":{"Type":38,"Flags":0,"Description":"Cloud providers configuration"},"recipes":{"Type":43,"Flags":0,"Description":"Specifies Recipes linked to the Environment."},"extensions":{"Type":49,"Flags":0,"Description":"Extensions spec of the resource"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[23,24,25,26,27,28,29]}},{"7":{"Name":"EnvironmentCompute","Discriminator":"kind","BaseProperties":{"resourceId":{"Type":4,"Flags":0,"Description":"The resource id of the compute resource for application environment."},"identity":{"Type":32,"Flags":0}},"Elements":{"kubernetes":36}}},{"2":{"Name":"IdentitySettings","Properties":{"kind":{"Type":35,"Flags":1,"Description":"Configuration for supported external identity providers"},"oidcIssuer":{"Type":4,"Flags":0,"Description":"The URI for your compute platform's OIDC issuer"},"resource":{"Type":4,"Flags":0,"Description":"The resource ID of the provisioned identity"}}}},{"6":{"Value":"undefined"}},{"6":{"Value":"azure.com.workload"}},{"5":{"Elements":[33,34]}},{"2":{"Name":"KubernetesCompute","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The namespace to use for the environment."},"kind":{"Type":37,"Flags":1,"Description":"Type of compute resource."}}}},{"6":{"Value":"kubernetes"}},{"2":{"Name":"Providers","Properties":{"azure":{"Type":39,"Flags":0,"Description":"Azure cloud provider configuration"},"aws":{"Type":40,"Flags":0,"Description":"AWS cloud provider configuration"}}}},{"2":{"Name":"ProvidersAzure","Properties":{"scope":{"Type":4,"Flags":0,"Description":"Target scope for Azure resources to be deployed into. For example: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup'"}}}},{"2":{"Name":"ProvidersAws","Properties":{"scope":{"Type":4,"Flags":0,"Description":"Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'"}}}},{"2":{"Name":"EnvironmentRecipeProperties","Properties":{"templateKind":{"Type":4,"Flags":1,"Description":"Format of the template provided by the recipe. Allowed values: bicep"},"templatePath":{"Type":4,"Flags":1,"Description":"Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported."},"parameters":{"Type":0,"Flags":0,"Description":"Any object"}}}},{"2":{"Name":"DictionaryOfEnvironmentRecipeProperties","Properties":{},"AdditionalProperties":41}},{"2":{"Name":"EnvironmentPropertiesRecipes","Properties":{},"AdditionalProperties":42}},{"7":{"Name":"EnvironmentExtension","Discriminator":"kind","BaseProperties":{},"Elements":{"kubernetesMetadata":45}}},{"2":{"Name":"EnvironmentKubernetesMetadataExtension","Properties":{"annotations":{"Type":46,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":47,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":48,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"2":{"Name":"EnvironmentKubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"EnvironmentKubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"3":{"ItemType":44}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/environments@2022-03-15-privatepreview","ScopeType":0,"Body":10}},{"6":{"Value":"Applications.Core/applications"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/applications","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":52,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":53,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":55,"Flags":1,"Description":"Application properties"},"tags":{"Type":74,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"ApplicationProperties","Properties":{"provisioningState":{"Type":63,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"environment":{"Type":4,"Flags":1,"Description":"The resource id of the environment linked to application."},"extensions":{"Type":71,"Flags":0,"Description":"Extensions spec of the resource"},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[56,57,58,59,60,61,62]}},{"7":{"Name":"ApplicationExtension","Discriminator":"kind","BaseProperties":{},"Elements":{"kubernetesMetadata":65,"kubernetesNamespace":69}}},{"2":{"Name":"ApplicationKubernetesMetadataExtension","Properties":{"annotations":{"Type":66,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":67,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":68,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"2":{"Name":"ApplicationKubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ApplicationKubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"2":{"Name":"ApplicationKubernetesNamespaceExtension","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The Kubernetes namespace to use for this application."},"kind":{"Type":70,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"6":{"Value":"kubernetesNamespace"}},{"3":{"ItemType":64}},{"2":{"Name":"ResourceStatus","Properties":{"compute":{"Type":31,"Flags":0,"Description":"Compute resource used by application environment resource."},"outputResources":{"Type":73,"Flags":0,"Description":"Array of AnyObject"}}}},{"3":{"ItemType":0}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/applications@2022-03-15-privatepreview","ScopeType":0,"Body":54}},{"6":{"Value":"Applications.Core/httpRoutes"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/httpRoutes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":76,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":77,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":79,"Flags":1,"Description":"HTTP Route properties"},"tags":{"Type":88,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"HttpRouteProperties","Properties":{"provisioningState":{"Type":87,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"hostname":{"Type":4,"Flags":0,"Description":"The internal hostname accepting traffic for the HTTP Route. Readonly."},"port":{"Type":3,"Flags":0,"Description":"The port number for the HTTP Route. Defaults to 80. Readonly."},"scheme":{"Type":4,"Flags":0,"Description":"The scheme used for traffic. Readonly."},"url":{"Type":4,"Flags":0,"Description":"A stable URL that that can be used to route traffic to a resource. Readonly."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[80,81,82,83,84,85,86]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/httpRoutes@2022-03-15-privatepreview","ScopeType":0,"Body":78}},{"6":{"Value":"Applications.Core/gateways"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/gateways","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":90,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":91,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":93,"Flags":1,"Description":"Gateway properties"},"tags":{"Type":109,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"GatewayProperties","Properties":{"provisioningState":{"Type":101,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"internal":{"Type":2,"Flags":0,"Description":"Sets Gateway to not be exposed externally (no public IP address associated). Defaults to false (exposed to internet)."},"hostname":{"Type":102,"Flags":0,"Description":"Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io."},"tls":{"Type":103,"Flags":0,"Description":"TLS configuration for the Gateway."},"routes":{"Type":108,"Flags":1,"Description":"Routes attached to this Gateway"},"url":{"Type":4,"Flags":2,"Description":"URL of the gateway resource. Readonly."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[94,95,96,97,98,99,100]}},{"2":{"Name":"GatewayPropertiesHostname","Properties":{"prefix":{"Type":4,"Flags":0,"Description":"Specify a prefix for the hostname: myhostname.myapp.PUBLICHOSTNAMEORIP.nip.io. Mutually exclusive with 'fullyQualifiedHostname' and will be overridden if both are defined."},"fullyQualifiedHostname":{"Type":4,"Flags":0,"Description":"Specify a fully-qualified domain name: myapp.mydomain.com. Mutually exclusive with 'prefix' and will take priority if both are defined."}}}},{"2":{"Name":"GatewayPropertiesTls","Properties":{"sslPassthrough":{"Type":2,"Flags":0,"Description":"If true, gateway lets the https traffic sslPassthrough to the backend servers for decryption."},"hostname":{"Type":4,"Flags":0,"Description":"Hostname"},"minimumProtocolVersion":{"Type":106,"Flags":0,"Description":"TLS minimum protocol version (defaults to 1.2)."},"certificateFrom":{"Type":4,"Flags":0,"Description":"Declares which Kubernetes TLS secret will be used."}}}},{"6":{"Value":"1.2"}},{"6":{"Value":"1.3"}},{"5":{"Elements":[104,105]}},{"2":{"Name":"GatewayRoute","Properties":{"path":{"Type":4,"Flags":0,"Description":"The path to match the incoming request path on. Ex - /myservice."},"destination":{"Type":4,"Flags":0,"Description":"The HttpRoute to route to. Ex - myserviceroute.id."},"replacePrefix":{"Type":4,"Flags":0,"Description":"Optionally update the prefix when sending the request to the service. Ex - replacePrefix: '/' and path: '/myservice' will transform '/myservice/myroute' to '/myroute'"}}}},{"3":{"ItemType":107}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/gateways@2022-03-15-privatepreview","ScopeType":0,"Body":92}},{"6":{"Value":"Applications.Core/containers"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/containers","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":111,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":112,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":114,"Flags":1,"Description":"Container properties"},"tags":{"Type":174,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"ContainerProperties","Properties":{"provisioningState":{"Type":122,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"connections":{"Type":127,"Flags":0,"Description":"Dictionary of "},"container":{"Type":128,"Flags":1,"Description":"Definition of a container."},"identity":{"Type":32,"Flags":0},"extensions":{"Type":173,"Flags":0,"Description":"Extensions spec of the resource"},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[115,116,117,118,119,120,121]}},{"2":{"Name":"ConnectionProperties","Properties":{"source":{"Type":4,"Flags":1,"Description":"The source of the connection"},"disableDefaultEnvVars":{"Type":2,"Flags":0},"iam":{"Type":124,"Flags":0,"Description":"The properties of IAM"}}}},{"2":{"Name":"IamProperties","Properties":{"kind":{"Type":125,"Flags":1,"Description":"The kind of IAM provider to configure"},"roles":{"Type":126,"Flags":0,"Description":"RBAC permissions to be assigned on the source resource"}}}},{"6":{"Value":"azure"}},{"3":{"ItemType":4}},{"2":{"Name":"ContainerPropertiesConnections","Properties":{},"AdditionalProperties":123}},{"2":{"Name":"Container","Properties":{"image":{"Type":4,"Flags":1,"Description":"The registry and image to download and run in your container"},"env":{"Type":129,"Flags":0,"Description":"Dictionary of "},"ports":{"Type":136,"Flags":0,"Description":"Dictionary of "},"readinessProbe":{"Type":137,"Flags":0,"Description":"Properties for readiness/liveness probe"},"livenessProbe":{"Type":137,"Flags":0,"Description":"Properties for readiness/liveness probe"},"volumes":{"Type":156,"Flags":0,"Description":"Dictionary of "},"command":{"Type":157,"Flags":0,"Description":"Entrypoint array. Overrides the container image's ENTRYPOINT"},"args":{"Type":158,"Flags":0,"Description":"Arguments to the entrypoint. Overrides the container image's CMD"},"workingDir":{"Type":4,"Flags":0,"Description":"Working directory for the container"}}}},{"2":{"Name":"ContainerEnv","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ContainerPort","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"protocol":{"Type":135,"Flags":0,"Description":"Protocol in use by the port"},"provides":{"Type":4,"Flags":0,"Description":"Specifies a route provided by this port"}}}},{"6":{"Value":"TCP"}},{"6":{"Value":"UDP"}},{"6":{"Value":"http"}},{"6":{"Value":"grpc"}},{"5":{"Elements":[131,132,133,134]}},{"2":{"Name":"ContainerPorts","Properties":{},"AdditionalProperties":130}},{"7":{"Name":"HealthProbeProperties","Discriminator":"kind","BaseProperties":{"initialDelaySeconds":{"Type":3,"Flags":0,"Description":"Initial delay in seconds before probing for readiness/liveness"},"failureThreshold":{"Type":3,"Flags":0,"Description":"Threshold number of times the probe fails after which a failure would be reported"},"periodSeconds":{"Type":3,"Flags":0,"Description":"Interval for the readiness/liveness probe in seconds"},"timeoutSeconds":{"Type":3,"Flags":0,"Description":"Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds"}},"Elements":{"exec":138,"httpGet":140,"tcp":143}}},{"2":{"Name":"ExecHealthProbeProperties","Properties":{"command":{"Type":4,"Flags":1,"Description":"Command to execute to probe readiness/liveness"},"kind":{"Type":139,"Flags":1,"Description":"The HealthProbeProperties kind"}}}},{"6":{"Value":"exec"}},{"2":{"Name":"HttpGetHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"path":{"Type":4,"Flags":1,"Description":"The route to make the HTTP request on"},"headers":{"Type":141,"Flags":0,"Description":"Custom HTTP headers to add to the get request"},"kind":{"Type":142,"Flags":1,"Description":"The HealthProbeProperties kind"}}}},{"2":{"Name":"HttpGetHealthProbePropertiesHeaders","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"httpGet"}},{"2":{"Name":"TcpHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"kind":{"Type":144,"Flags":1,"Description":"The HealthProbeProperties kind"}}}},{"6":{"Value":"tcp"}},{"7":{"Name":"Volume","Discriminator":"kind","BaseProperties":{"mountPath":{"Type":4,"Flags":0,"Description":"The path where the volume is mounted"}},"Elements":{"ephemeral":146,"persistent":151}}},{"2":{"Name":"EphemeralVolume","Properties":{"managedStore":{"Type":149,"Flags":1,"Description":"Backing store for the ephemeral volume"},"kind":{"Type":150,"Flags":1,"Description":"The Volume kind"}}}},{"6":{"Value":"memory"}},{"6":{"Value":"disk"}},{"5":{"Elements":[147,148]}},{"6":{"Value":"ephemeral"}},{"2":{"Name":"PersistentVolume","Properties":{"permission":{"Type":154,"Flags":0,"Description":"Container read/write access to the volume"},"source":{"Type":4,"Flags":1,"Description":"The source of the volume"},"kind":{"Type":155,"Flags":1,"Description":"The Volume kind"}}}},{"6":{"Value":"read"}},{"6":{"Value":"write"}},{"5":{"Elements":[152,153]}},{"6":{"Value":"persistent"}},{"2":{"Name":"ContainerVolumes","Properties":{},"AdditionalProperties":145}},{"3":{"ItemType":4}},{"3":{"ItemType":4}},{"7":{"Name":"ContainerExtension","Discriminator":"kind","BaseProperties":{},"Elements":{"daprSidecar":160,"kubernetesMetadata":167,"manualScaling":171}}},{"2":{"Name":"DaprSidecarExtension","Properties":{"appPort":{"Type":3,"Flags":0,"Description":"The Dapr appPort. Specifies the internal listening port for the application to handle requests from the Dapr sidecar."},"appId":{"Type":4,"Flags":1,"Description":"The Dapr appId. Specifies the identifier used by Dapr for service invocation."},"config":{"Type":4,"Flags":0,"Description":"Specifies the Dapr configuration to use for the resource."},"protocol":{"Type":165,"Flags":0,"Description":"Protocol in use by the port"},"provides":{"Type":4,"Flags":0,"Description":"Specifies the resource id of a dapr.io.InvokeHttpRoute that can route traffic to this resource."},"kind":{"Type":166,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"6":{"Value":"TCP"}},{"6":{"Value":"UDP"}},{"6":{"Value":"http"}},{"6":{"Value":"grpc"}},{"5":{"Elements":[161,162,163,164]}},{"6":{"Value":"daprSidecar"}},{"2":{"Name":"ContainerKubernetesMetadataExtension","Properties":{"annotations":{"Type":168,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":169,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":170,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"2":{"Name":"ContainerKubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ContainerKubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"2":{"Name":"ManualScalingExtension","Properties":{"replicas":{"Type":3,"Flags":0,"Description":"Replica count."},"kind":{"Type":172,"Flags":1,"Description":"Specifies the extensions of a resource."}}}},{"6":{"Value":"manualScaling"}},{"3":{"ItemType":159}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/containers@2022-03-15-privatepreview","ScopeType":0,"Body":113}},{"6":{"Value":"Applications.Core/volumes"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/volumes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":176,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":177,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":179,"Flags":1},"tags":{"Type":211,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"7":{"Name":"VolumeProperties","Discriminator":"kind","BaseProperties":{"provisioningState":{"Type":187,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}},"Elements":{"azure.com.keyvault":188}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[180,181,182,183,184,185,186]}},{"2":{"Name":"AzureKeyVaultVolumeProperties","Properties":{"certificates":{"Type":201,"Flags":0,"Description":"The KeyVault certificates that this volume exposes"},"keys":{"Type":203,"Flags":0,"Description":"The KeyVault keys that this volume exposes"},"resource":{"Type":4,"Flags":1,"Description":"The ID of the keyvault to use for this volume resource"},"secrets":{"Type":209,"Flags":0,"Description":"The KeyVault secrets that this volume exposes"},"kind":{"Type":210,"Flags":1,"Description":"The volume kind"}}}},{"2":{"Name":"CertificateObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk."},"encoding":{"Type":193,"Flags":0,"Description":"Encoding format. Default utf-8"},"format":{"Type":196,"Flags":0,"Description":"Certificate format. Default pem"},"name":{"Type":4,"Flags":1,"Description":"The name of the certificate"},"certType":{"Type":200,"Flags":0,"Description":"Certificate object type to be downloaded - the certificate itself, private key or public key of the certificate"},"version":{"Type":4,"Flags":0,"Description":"Certificate version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[190,191,192]}},{"6":{"Value":"pem"}},{"6":{"Value":"pfx"}},{"5":{"Elements":[194,195]}},{"6":{"Value":"certificate"}},{"6":{"Value":"publickey"}},{"6":{"Value":"privatekey"}},{"5":{"Elements":[197,198,199]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesCertificates","Properties":{},"AdditionalProperties":189}},{"2":{"Name":"KeyObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk."},"name":{"Type":4,"Flags":1,"Description":"The name of the key"},"version":{"Type":4,"Flags":0,"Description":"Key version"}}}},{"2":{"Name":"AzureKeyVaultVolumePropertiesKeys","Properties":{},"AdditionalProperties":202}},{"2":{"Name":"SecretObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk."},"encoding":{"Type":208,"Flags":0,"Description":"Encoding format. Default utf-8"},"name":{"Type":4,"Flags":1,"Description":"The name of the secret"},"version":{"Type":4,"Flags":0,"Description":"Secret version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[205,206,207]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesSecrets","Properties":{},"AdditionalProperties":204}},{"6":{"Value":"azure.com.keyvault"}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/volumes@2022-03-15-privatepreview","ScopeType":0,"Body":178}},{"6":{"Value":"Applications.Core/secretStores"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/secretStores","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":213,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":214,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":216,"Flags":1},"tags":{"Type":234,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"SecretStoreProperties","Properties":{"provisioningState":{"Type":224,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"type":{"Type":227,"Flags":0,"Description":"The type of secret store data"},"data":{"Type":233,"Flags":1,"Description":"An object to represent key-value type secrets"},"resource":{"Type":4,"Flags":0,"Description":"The resource id of external secret store."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[217,218,219,220,221,222,223]}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[225,226]}},{"2":{"Name":"SecretValueProperties","Properties":{"encoding":{"Type":231,"Flags":0,"Description":"The encoding of value"},"value":{"Type":4,"Flags":0,"Description":"The value of secret."},"valueFrom":{"Type":232,"Flags":0}}}},{"6":{"Value":"raw"}},{"6":{"Value":"base64"}},{"5":{"Elements":[229,230]}},{"2":{"Name":"ValueFromProperties","Properties":{"name":{"Type":4,"Flags":1,"Description":"The name of the referenced secret."},"version":{"Type":4,"Flags":0,"Description":"The version of the referenced secret."}}}},{"2":{"Name":"SecretStorePropertiesData","Properties":{},"AdditionalProperties":228}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/secretStores@2022-03-15-privatepreview","ScopeType":0,"Body":215}},{"6":{"Value":"Applications.Core/extenders"}},{"6":{"Value":"2022-03-15-privatepreview"}},{"2":{"Name":"Applications.Core/extenders","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":236,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":237,"Flags":10,"Description":"The resource api version"},"systemData":{"Type":11,"Flags":6,"Description":"Metadata pertaining to creation and last modification of the resource."},"properties":{"Type":239,"Flags":1,"Description":"Extender link properties"},"tags":{"Type":249,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"}}}},{"2":{"Name":"ExtenderProperties","Properties":{"secrets":{"Type":240,"Flags":4,"Description":"The secret values for the given Extender resource"},"provisioningState":{"Type":248,"Flags":2,"Description":"Provisioning state of the resource at the time the operation was called."},"status":{"Type":72,"Flags":2,"Description":"Status of a resource."},"environment":{"Type":4,"Flags":0,"Description":"The resource id of the environment linked to the resource"},"application":{"Type":4,"Flags":1,"Description":"Specifies the resource id of the application"}},"AdditionalProperties":0}},{"2":{"Name":"ExtenderSecrets","Properties":{},"AdditionalProperties":0}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Accepted"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Provisioning"}},{"5":{"Elements":[241,242,243,244,245,246,247]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/extenders@2022-03-15-privatepreview","ScopeType":0,"Body":238}},{"2":{"Name":"SecretStoreListSecretsResult","Properties":{"type":{"Type":254,"Flags":2,"Description":"The type of secret store data"},"data":{"Type":255,"Flags":2,"Description":"An object to represent key-value type secrets"}}}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[252,253]}},{"2":{"Name":"SecretStoreListSecretsResultData","Properties":{},"AdditionalProperties":228}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/secretStores","ApiVersion":"2022-03-15-privatepreview","Output":251}},{"2":{"Name":"ExtenderSecrets","Properties":{},"AdditionalProperties":0}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/extenders","ApiVersion":"2022-03-15-privatepreview","Output":257}}] \ No newline at end of file diff --git a/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.md b/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.md index c10daade22..80db072468 100644 --- a/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.md +++ b/hack/bicep-types-radius/generated/applications/applications.core/2022-03-15-privatepreview/types.md @@ -379,7 +379,7 @@ ## EnvironmentRecipeProperties ### Properties * **parameters**: any: Any object -* **templateKind**: string: Format of the template provided by the recipe. Allowed values: bicep +* **templateKind**: string (Required): Format of the template provided by the recipe. Allowed values: bicep * **templatePath**: string (Required): Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. ## TrackedResourceTags diff --git a/pkg/cli/cmd/recipe/list/list.go b/pkg/cli/cmd/recipe/list/list.go index 5784212d44..f3b74fc382 100644 --- a/pkg/cli/cmd/recipe/list/list.go +++ b/pkg/cli/cmd/recipe/list/list.go @@ -10,6 +10,7 @@ import ( "github.com/project-radius/radius/pkg/cli" "github.com/project-radius/radius/pkg/cli/cmd/commonflags" + types "github.com/project-radius/radius/pkg/cli/cmd/recipe" "github.com/project-radius/radius/pkg/cli/connections" "github.com/project-radius/radius/pkg/cli/framework" "github.com/project-radius/radius/pkg/cli/objectformats" @@ -91,14 +92,22 @@ func (r *Runner) Run(ctx context.Context) error { if err != nil { return err } - var envRecipes []EnvironmentRecipe + var envRecipes []types.EnvironmentRecipe for link, recipes := range envResource.Properties.Recipes { for recipeName, recipeDetails := range recipes { - envRecipes = append(envRecipes, EnvironmentRecipe{ + recipe := types.EnvironmentRecipe{ Name: recipeName, LinkType: link, TemplatePath: *recipeDetails.TemplatePath, - }) + } + // Check to ensure backwards compatibility with existing environments. + // Remove this in next release once users have migrated their existing environments. + // https://dev.azure.com/azure-octo/Incubations/_workitems/edit/7939 + if recipeDetails.TemplateKind != nil { + recipe.TemplateKind = *recipeDetails.TemplateKind + } + + envRecipes = append(envRecipes, recipe) } } err = r.Output.WriteFormatted(r.Format, envRecipes, objectformats.GetEnvironmentRecipesTableFormat()) @@ -108,9 +117,3 @@ func (r *Runner) Run(ctx context.Context) error { return nil } - -type EnvironmentRecipe struct { - Name string `json:"name,omitempty"` - LinkType string `json:"linkType,omitempty"` - TemplatePath string `json:"templatePath,omitempty"` -} diff --git a/pkg/cli/cmd/recipe/list/list_test.go b/pkg/cli/cmd/recipe/list/list_test.go index 86afd572d1..ebc1a0dbdc 100644 --- a/pkg/cli/cmd/recipe/list/list_test.go +++ b/pkg/cli/cmd/recipe/list/list_test.go @@ -12,6 +12,7 @@ import ( "github.com/golang/mock/gomock" v1 "github.com/project-radius/radius/pkg/armrpc/api/v1" "github.com/project-radius/radius/pkg/cli/clients" + types "github.com/project-radius/radius/pkg/cli/cmd/recipe" "github.com/project-radius/radius/pkg/cli/connections" "github.com/project-radius/radius/pkg/cli/framework" "github.com/project-radius/radius/pkg/cli/objectformats" @@ -63,58 +64,111 @@ func Test_Validate(t *testing.T) { } func Test_Run(t *testing.T) { - t.Run("List recipes linked to the environment", func(t *testing.T) { - t.Run("Success", func(t *testing.T) { - ctrl := gomock.NewController(t) - - envResource := v20220315privatepreview.EnvironmentResource{ - ID: to.Ptr("/planes/radius/local/resourcegroups/kind-kind/providers/applications.core/environments/kind-kind"), - Name: to.Ptr("kind-kind"), - Type: to.Ptr("applications.core/environments"), - Location: to.Ptr(v1.LocationGlobal), - Properties: &v20220315privatepreview.EnvironmentProperties{ - Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ - linkrp.MongoDatabasesResourceType: { - "cosmosDB": { - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), - }, + t.Run("List recipes linked to the environment - Success", func(t *testing.T) { + ctrl := gomock.NewController(t) + + envResource := v20220315privatepreview.EnvironmentResource{ + ID: to.Ptr("/planes/radius/local/resourcegroups/kind-kind/providers/applications.core/environments/kind-kind"), + Name: to.Ptr("kind-kind"), + Type: to.Ptr("applications.core/environments"), + Location: to.Ptr(v1.LocationGlobal), + Properties: &v20220315privatepreview.EnvironmentProperties{ + Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ + linkrp.MongoDatabasesResourceType: { + "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), + TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, }, - } - recipes := []EnvironmentRecipe{ - { - Name: "cosmosDB", - LinkType: linkrp.MongoDatabasesResourceType, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", - }, - } - - appManagementClient := clients.NewMockApplicationsManagementClient(ctrl) - appManagementClient.EXPECT(). - GetEnvDetails(gomock.Any(), gomock.Any()). - Return(envResource, nil).Times(1) - - outputSink := &output.MockOutput{} - - runner := &Runner{ - ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, - Output: outputSink, - Workspace: &workspaces.Workspace{}, - Format: "table", - } - - err := runner.Run(context.Background()) - require.NoError(t, err) - - expected := []any{ - output.FormattedOutput{ - Format: "table", - Obj: recipes, - Options: objectformats.GetEnvironmentRecipesTableFormat(), + }, + } + recipes := []types.EnvironmentRecipe{ + { + Name: "cosmosDB", + LinkType: linkrp.MongoDatabasesResourceType, + TemplateKind: types.TemplateKindBicep, + TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + }, + } + + appManagementClient := clients.NewMockApplicationsManagementClient(ctrl) + appManagementClient.EXPECT(). + GetEnvDetails(gomock.Any(), gomock.Any()). + Return(envResource, nil).Times(1) + + outputSink := &output.MockOutput{} + + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, + Output: outputSink, + Workspace: &workspaces.Workspace{}, + Format: "table", + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + expected := []any{ + output.FormattedOutput{ + Format: "table", + Obj: recipes, + Options: objectformats.GetEnvironmentRecipesTableFormat(), + }, + } + require.Equal(t, expected, outputSink.Writes) + }) + + t.Run("List recipes linked to the environment - empty template kind", func(t *testing.T) { + ctrl := gomock.NewController(t) + + envResource := v20220315privatepreview.EnvironmentResource{ + ID: to.Ptr("/planes/radius/local/resourcegroups/kind-kind/providers/applications.core/environments/kind-kind"), + Name: to.Ptr("kind-kind"), + Type: to.Ptr("applications.core/environments"), + Location: to.Ptr(v1.LocationGlobal), + Properties: &v20220315privatepreview.EnvironmentProperties{ + Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ + linkrp.MongoDatabasesResourceType: { + "cosmosDB": { + TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + }, + }, }, - } - require.Equal(t, expected, outputSink.Writes) - }) + }, + } + recipes := []types.EnvironmentRecipe{ + { + Name: "cosmosDB", + LinkType: linkrp.MongoDatabasesResourceType, + TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + }, + } + + appManagementClient := clients.NewMockApplicationsManagementClient(ctrl) + appManagementClient.EXPECT(). + GetEnvDetails(gomock.Any(), gomock.Any()). + Return(envResource, nil).Times(1) + + outputSink := &output.MockOutput{} + + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, + Output: outputSink, + Workspace: &workspaces.Workspace{}, + Format: "table", + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + expected := []any{ + output.FormattedOutput{ + Format: "table", + Obj: recipes, + Options: objectformats.GetEnvironmentRecipesTableFormat(), + }, + } + require.Equal(t, expected, outputSink.Writes) }) } diff --git a/pkg/cli/cmd/recipe/register/register.go b/pkg/cli/cmd/recipe/register/register.go index 93d4087481..c3a925edcf 100644 --- a/pkg/cli/cmd/recipe/register/register.go +++ b/pkg/cli/cmd/recipe/register/register.go @@ -36,13 +36,13 @@ You can specify parameters using the '--parameter' flag ('-p' for short). Parame `, Example: ` # Add a recipe to an environment -rad recipe register cosmosdb -e env_name -w workspace --template-path template_path --link-type Applications.Link/mongoDatabases +rad recipe register cosmosdb -e env_name -w workspace --template-kind bicep --template-path template_path --link-type Applications.Link/mongoDatabases # Specify a parameter -rad recipe register cosmosdb -e env_name -w workspace --template-path template_path --link-type Applications.Link/mongoDatabases --parameters throughput=400 +rad recipe register cosmosdb -e env_name -w workspace --template-kind bicep --template-path template_path --link-type Applications.Link/mongoDatabases --parameters throughput=400 # specify multiple parameters using a JSON parameter file -rad recipe register cosmosdb -e env_name -w workspace --template-path template_path --link-type Applications.Link/mongoDatabases --parameters @myfile.json +rad recipe register cosmosdb -e env_name -w workspace --template-kind bicep --template-path template_path --link-type Applications.Link/mongoDatabases --parameters @myfile.json `, Args: cobra.ExactArgs(1), RunE: framework.RunCommand(runner), @@ -52,6 +52,8 @@ rad recipe register cosmosdb -e env_name -w workspace --template-path template_p commonflags.AddWorkspaceFlag(cmd) commonflags.AddResourceGroupFlag(cmd) commonflags.AddEnvironmentNameFlag(cmd) + cmd.Flags().String("template-kind", "", "specify the kind for the template provided by the recipe.") + _ = cmd.MarkFlagRequired("template-kind") cmd.Flags().String("template-path", "", "specify the path to the template provided by the recipe.") _ = cmd.MarkFlagRequired("template-path") cmd.Flags().String("link-type", "", "specify the type of the link this recipe can be consumed by") @@ -67,6 +69,7 @@ type Runner struct { ConnectionFactory connections.Factory Output output.Interface Workspace *workspaces.Workspace + TemplateKind string TemplatePath string LinkType string RecipeName string @@ -97,10 +100,11 @@ func (r *Runner) Validate(cmd *cobra.Command, args []string) error { } r.Workspace.Environment = environment - templatePath, err := requireTemplatePath(cmd) + templateKind, templatePath, err := requireRecipeProperties(cmd) if err != nil { return err } + r.TemplateKind = templateKind r.TemplatePath = templatePath linkType, err := cli.RequireLinkType(cmd) @@ -147,6 +151,7 @@ func (r *Runner) Run(ctx context.Context) error { } properties := &corerp.EnvironmentRecipeProperties{ + TemplateKind: &r.TemplateKind, TemplatePath: &r.TemplatePath, Parameters: bicep.ConvertToMapStringInterface(r.Parameters), } @@ -168,11 +173,16 @@ func (r *Runner) Run(ctx context.Context) error { return nil } -func requireTemplatePath(cmd *cobra.Command) (string, error) { - templatePath, err := cmd.Flags().GetString("template-path") +func requireRecipeProperties(cmd *cobra.Command) (templateKind, templatePath string, err error) { + templateKind, err = cmd.Flags().GetString("template-kind") if err != nil { - return templatePath, err + return "", "", err } - return templatePath, nil + templatePath, err = cmd.Flags().GetString("template-path") + if err != nil { + return "", "", err + } + + return templateKind, templatePath, nil } diff --git a/pkg/cli/cmd/recipe/register/register_test.go b/pkg/cli/cmd/recipe/register/register_test.go index 3a42c2c6fc..12e2ec903b 100644 --- a/pkg/cli/cmd/recipe/register/register_test.go +++ b/pkg/cli/cmd/recipe/register/register_test.go @@ -16,6 +16,7 @@ import ( v1 "github.com/project-radius/radius/pkg/armrpc/api/v1" "github.com/project-radius/radius/pkg/cli/clients" + types "github.com/project-radius/radius/pkg/cli/cmd/recipe" "github.com/project-radius/radius/pkg/cli/connections" "github.com/project-radius/radius/pkg/cli/framework" "github.com/project-radius/radius/pkg/cli/output" @@ -35,7 +36,7 @@ func Test_Validate(t *testing.T) { testcases := []radcli.ValidateInput{ { Name: "Valid Register Command with parameters", - Input: []string{"test_recipe", "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType, "--parameters", "a=b"}, + Input: []string{"test_recipe", "--template-kind", types.TemplateKindBicep, "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType, "--parameters", "a=b"}, ExpectedValid: true, ConfigHolder: framework.ConfigHolder{ ConfigFilePath: "", @@ -44,7 +45,7 @@ func Test_Validate(t *testing.T) { }, { Name: "Valid Register Command with parameters passed as file", - Input: []string{"test_recipe", "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType, "--parameters", "@testdata/recipeparam.json"}, + Input: []string{"test_recipe", "--template-kind", types.TemplateKindBicep, "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType, "--parameters", "@testdata/recipeparam.json"}, ExpectedValid: true, ConfigHolder: framework.ConfigHolder{ ConfigFilePath: "", @@ -53,7 +54,7 @@ func Test_Validate(t *testing.T) { }, { Name: "Register Command with fallback workspace", - Input: []string{"-e", "myenvironment", "test_recipe", "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType}, + Input: []string{"-e", "myenvironment", "test_recipe", "--template-kind", types.TemplateKindBicep, "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType}, ExpectedValid: true, ConfigHolder: framework.ConfigHolder{ ConfigFilePath: "", @@ -62,7 +63,16 @@ func Test_Validate(t *testing.T) { }, { Name: "Register Command without name", - Input: []string{"--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType}, + Input: []string{"--template-kind", types.TemplateKindBicep, "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType}, + ExpectedValid: false, + ConfigHolder: framework.ConfigHolder{ + ConfigFilePath: "", + Config: configWithWorkspace, + }, + }, + { + Name: "Register Command without template kind", + Input: []string{"test_recipe", "--template-path", "test_template", "--link-type", linkrp.MongoDatabasesResourceType}, ExpectedValid: false, ConfigHolder: framework.ConfigHolder{ ConfigFilePath: "", @@ -71,7 +81,7 @@ func Test_Validate(t *testing.T) { }, { Name: "Register Command without template path", - Input: []string{"test_recipe", "--link-type", linkrp.MongoDatabasesResourceType}, + Input: []string{"test_recipe", "--template-kind", types.TemplateKindBicep, "--link-type", linkrp.MongoDatabasesResourceType}, ExpectedValid: false, ConfigHolder: framework.ConfigHolder{ ConfigFilePath: "", @@ -80,7 +90,7 @@ func Test_Validate(t *testing.T) { }, { Name: "Register Command without link-type", - Input: []string{"test_recipe", "--template-path", "test_template"}, + Input: []string{"test_recipe", "--template-kind", types.TemplateKindBicep, "--template-path", "test_template"}, ExpectedValid: false, ConfigHolder: framework.ConfigHolder{ ConfigFilePath: "", @@ -107,6 +117,7 @@ func Test_Run(t *testing.T) { testRecipes := map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, @@ -141,6 +152,7 @@ func Test_Run(t *testing.T) { ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, + TemplateKind: types.TemplateKindBicep, TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", LinkType: linkrp.MongoDatabasesResourceType, RecipeName: "cosmosDB_new", @@ -251,6 +263,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), Parameters: map[string]any{"throughput": 400}, }, @@ -285,6 +298,7 @@ func Test_Run(t *testing.T) { ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, + TemplateKind: types.TemplateKindBicep, TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/rediscaches:v1", LinkType: linkrp.RedisCachesResourceType, RecipeName: "redis", @@ -312,6 +326,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, @@ -339,6 +354,7 @@ func Test_Run(t *testing.T) { ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, + TemplateKind: types.TemplateKindBicep, TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", LinkType: linkrp.MongoDatabasesResourceType, RecipeName: "cosmosDB_no_namespace", @@ -390,6 +406,7 @@ func Test_Run(t *testing.T) { ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, + TemplateKind: types.TemplateKindBicep, TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/rediscaches:v1", LinkType: linkrp.RedisCachesResourceType, RecipeName: "redis", diff --git a/pkg/cli/cmd/recipe/show/show.go b/pkg/cli/cmd/recipe/show/show.go index 4eaa30bbb7..912b1baf53 100644 --- a/pkg/cli/cmd/recipe/show/show.go +++ b/pkg/cli/cmd/recipe/show/show.go @@ -12,6 +12,7 @@ import ( "github.com/project-radius/radius/pkg/cli" "github.com/project-radius/radius/pkg/cli/cmd/commonflags" + types "github.com/project-radius/radius/pkg/cli/cmd/recipe" "github.com/project-radius/radius/pkg/cli/connections" "github.com/project-radius/radius/pkg/cli/framework" "github.com/project-radius/radius/pkg/cli/objectformats" @@ -132,13 +133,20 @@ func (r *Runner) Run(ctx context.Context) error { if err != nil { return err } - recipe := Recipe{ + + recipe := types.EnvironmentRecipe{ Name: r.RecipeName, LinkType: r.LinkType, TemplatePath: *recipeDetails.TemplatePath, } + // Check to ensure backwards compatibility with existing environments. + // Remove this in next release once users have migrated their existing environments. + // https://dev.azure.com/azure-octo/Incubations/_workitems/edit/7939 + if recipeDetails.TemplateKind != nil { + recipe.TemplateKind = *recipeDetails.TemplateKind + } - err = r.Output.WriteFormatted(r.Format, recipe, objectformats.GetRecipeTableFormat()) + err = r.Output.WriteFormatted(r.Format, recipe, objectformats.GetEnvironmentRecipesTableFormat()) if err != nil { return err } @@ -197,9 +205,3 @@ type RecipeParameter struct { MaxValue string `json:"maxValue,omitempty"` MinValue string `json:"minValue,omitempty"` } - -type Recipe struct { - Name string `json:"name,omitempty"` - LinkType string `json:"linkType,omitempty"` - TemplatePath string `json:"templatePath,omitempty"` -} diff --git a/pkg/cli/cmd/recipe/show/show_test.go b/pkg/cli/cmd/recipe/show/show_test.go index d409fa0646..8291e58955 100644 --- a/pkg/cli/cmd/recipe/show/show_test.go +++ b/pkg/cli/cmd/recipe/show/show_test.go @@ -12,6 +12,7 @@ import ( "github.com/golang/mock/gomock" "github.com/project-radius/radius/pkg/cli/clients" + types "github.com/project-radius/radius/pkg/cli/cmd/recipe" "github.com/project-radius/radius/pkg/cli/connections" "github.com/project-radius/radius/pkg/cli/framework" "github.com/project-radius/radius/pkg/cli/objectformats" @@ -81,80 +82,141 @@ func Test_Validate(t *testing.T) { } func Test_Run(t *testing.T) { - t.Run("Show recipes details", func(t *testing.T) { - t.Run("Success", func(t *testing.T) { - ctrl := gomock.NewController(t) - - envRecipe := v20220315privatepreview.EnvironmentRecipeProperties{ - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), - Parameters: map[string]any{ - "throughput": map[string]any{ - "type": "float64", - "maxValue": float64(800), - }, - "sku": map[string]any{ - "type": "string", - }, + t.Run("Show recipes details - Success", func(t *testing.T) { + ctrl := gomock.NewController(t) + envRecipe := v20220315privatepreview.EnvironmentRecipeProperties{ + TemplateKind: to.Ptr(types.TemplateKindBicep), + TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + Parameters: map[string]any{ + "throughput": map[string]any{ + "type": "float64", + "maxValue": float64(800), }, - } - recipe := Recipe{ - Name: "cosmosDB", - LinkType: linkrp.MongoDatabasesResourceType, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", - } - recipeParams := []RecipeParameter{ - { - Name: "throughput", - Type: "float64", - MaxValue: "800", - MinValue: "-", - DefaultValue: "-", + "sku": map[string]any{ + "type": "string", }, - { - Name: "sku", - Type: "string", - MaxValue: "-", - MinValue: "-", - DefaultValue: "-", - }, - } - - appManagementClient := clients.NewMockApplicationsManagementClient(ctrl) - appManagementClient.EXPECT(). - ShowRecipe(gomock.Any(), gomock.Any(), gomock.Any()). - Return(envRecipe, nil).Times(1) - - outputSink := &output.MockOutput{} - - runner := &Runner{ - ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, - Output: outputSink, - Workspace: &workspaces.Workspace{}, - Format: "table", - RecipeName: "cosmosDB", - LinkType: linkrp.MongoDatabasesResourceType, - } - - err := runner.Run(context.Background()) - require.NoError(t, err) - - expected := []any{ - output.FormattedOutput{ - Format: "table", - Obj: recipe, - Options: objectformats.GetRecipeTableFormat(), - }, - output.LogOutput{ - Format: "", - }, - output.FormattedOutput{ - Format: "table", - Obj: recipeParams, - Options: objectformats.GetRecipeParamsTableFormat(), + }, + } + recipe := types.EnvironmentRecipe{ + Name: "cosmosDB", + LinkType: linkrp.MongoDatabasesResourceType, + TemplateKind: types.TemplateKindBicep, + TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + } + recipeParams := []RecipeParameter{ + { + Name: "throughput", + Type: "float64", + MaxValue: "800", + MinValue: "-", + DefaultValue: "-", + }, + { + Name: "sku", + Type: "string", + MaxValue: "-", + MinValue: "-", + DefaultValue: "-", + }, + } + + appManagementClient := clients.NewMockApplicationsManagementClient(ctrl) + appManagementClient.EXPECT(). + ShowRecipe(gomock.Any(), gomock.Any(), gomock.Any()). + Return(envRecipe, nil).Times(1) + + outputSink := &output.MockOutput{} + + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, + Output: outputSink, + Workspace: &workspaces.Workspace{}, + Format: "table", + RecipeName: "cosmosDB", + LinkType: linkrp.MongoDatabasesResourceType, + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + expected := []any{ + output.FormattedOutput{ + Format: "table", + Obj: recipe, + Options: objectformats.GetEnvironmentRecipesTableFormat(), + }, + output.LogOutput{ + Format: "", + }, + output.FormattedOutput{ + Format: "table", + Obj: recipeParams, + Options: objectformats.GetRecipeParamsTableFormat(), + }, + } + require.Equal(t, expected, outputSink.Writes) + }) + + t.Run("Show recipe details - empty template kind", func(t *testing.T) { + ctrl := gomock.NewController(t) + envRecipe := v20220315privatepreview.EnvironmentRecipeProperties{ + TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + Parameters: map[string]any{ + "throughput": map[string]any{ + "type": "float64", + "maxValue": float64(800), }, - } - require.Equal(t, expected, outputSink.Writes) + }, + } + recipe := types.EnvironmentRecipe{ + Name: "cosmosDB", + LinkType: linkrp.MongoDatabasesResourceType, + TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + } + recipeParams := []RecipeParameter{ + { + Name: "throughput", + Type: "float64", + MaxValue: "800", + MinValue: "-", + DefaultValue: "-", + }, + } + + appManagementClient := clients.NewMockApplicationsManagementClient(ctrl) + appManagementClient.EXPECT(). + ShowRecipe(gomock.Any(), gomock.Any(), gomock.Any()). + Return(envRecipe, nil).Times(1) - }) + outputSink := &output.MockOutput{} + + runner := &Runner{ + ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, + Output: outputSink, + Workspace: &workspaces.Workspace{}, + Format: "table", + RecipeName: "cosmosDB", + LinkType: linkrp.MongoDatabasesResourceType, + } + + err := runner.Run(context.Background()) + require.NoError(t, err) + + expected := []any{ + output.FormattedOutput{ + Format: "table", + Obj: recipe, + Options: objectformats.GetEnvironmentRecipesTableFormat(), + }, + output.LogOutput{ + Format: "", + }, + output.FormattedOutput{ + Format: "table", + Obj: recipeParams, + Options: objectformats.GetRecipeParamsTableFormat(), + }, + } + require.Equal(t, expected, outputSink.Writes) }) } diff --git a/pkg/cli/cmd/recipe/types.go b/pkg/cli/cmd/recipe/types.go new file mode 100644 index 0000000000..4aa23ea97d --- /dev/null +++ b/pkg/cli/cmd/recipe/types.go @@ -0,0 +1,25 @@ +/* +Copyright 2023 The Radius Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package recipe + +const ( + TemplateKindBicep = "bicep" +) + +type EnvironmentRecipe struct { + Name string `json:"name"` + LinkType string `json:"linkType"` + TemplateKind string `json:"templateKind"` + TemplatePath string `json:"templatePath"` +} diff --git a/pkg/cli/cmd/recipe/unregister/unregister_test.go b/pkg/cli/cmd/recipe/unregister/unregister_test.go index 6bc1cc9dce..2206b129db 100644 --- a/pkg/cli/cmd/recipe/unregister/unregister_test.go +++ b/pkg/cli/cmd/recipe/unregister/unregister_test.go @@ -16,6 +16,7 @@ import ( v1 "github.com/project-radius/radius/pkg/armrpc/api/v1" "github.com/project-radius/radius/pkg/cli/clients" + types "github.com/project-radius/radius/pkg/cli/cmd/recipe" "github.com/project-radius/radius/pkg/cli/connections" "github.com/project-radius/radius/pkg/cli/framework" "github.com/project-radius/radius/pkg/cli/output" @@ -91,6 +92,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, @@ -201,6 +203,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, @@ -260,6 +263,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "cosmosDB": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, @@ -297,6 +301,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "testResource": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, @@ -360,11 +365,13 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]*v20220315privatepreview.EnvironmentRecipeProperties{ linkrp.MongoDatabasesResourceType: { "testResource": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), }, }, linkrp.RedisCachesResourceType: { "testResource": { + TemplateKind: to.Ptr(types.TemplateKindBicep), TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/rediscaches:v1"), }, }, diff --git a/pkg/cli/objectformats/objectformats.go b/pkg/cli/objectformats/objectformats.go index a7752901e2..b614947774 100644 --- a/pkg/cli/objectformats/objectformats.go +++ b/pkg/cli/objectformats/objectformats.go @@ -185,6 +185,10 @@ func GetEnvironmentRecipesTableFormat() output.FormatterOptions { Heading: "TYPE", JSONPath: "{ .LinkType }", }, + { + Heading: "TEMPLATE KIND", + JSONPath: "{ .TemplateKind }", + }, { Heading: "TEMPLATE", JSONPath: "{ .TemplatePath }", @@ -224,25 +228,6 @@ func GetUpdateEnvironmentTableFormat() output.FormatterOptions { } } -func GetRecipeTableFormat() output.FormatterOptions { - return output.FormatterOptions{ - Columns: []output.Column{ - { - Heading: "RECIPE NAME", - JSONPath: "{ .Name }", - }, - { - Heading: "TYPE", - JSONPath: "{ .LinkType }", - }, - { - Heading: "TEMPLATE", - JSONPath: "{ .TemplatePath }", - }, - }, - } -} - func GetRecipeParamsTableFormat() output.FormatterOptions { return output.FormatterOptions{ Columns: []output.Column{ diff --git a/pkg/corerp/api/v20220315privatepreview/environment_conversion.go b/pkg/corerp/api/v20220315privatepreview/environment_conversion.go index 51ced4eb13..fd1e7ac298 100644 --- a/pkg/corerp/api/v20220315privatepreview/environment_conversion.go +++ b/pkg/corerp/api/v20220315privatepreview/environment_conversion.go @@ -56,18 +56,15 @@ func (src *EnvironmentResource) ConvertTo() (v1.DataModelInterface, error) { envRecipes[resourceType] = map[string]datamodel.EnvironmentRecipeProperties{} for recipeName, recipeDetails := range recipes { if recipeDetails != nil { - // Temporary check until we make templateKind required and enum in the schema - var templateKind = "bicep" - if recipeDetails.TemplateKind != nil { - templateKind = *recipeDetails.TemplateKind - } - - if !isValidTemplateKind(templateKind) { - return &datamodel.Environment{}, v1.NewClientErrInvalidRequest(fmt.Sprintf("invalid template kind: %q", *recipeDetails.TemplateKind)) + // Allowed format hard coded to Bicep in the error until Terraform support is officially implemented. + // This check shouldn't be needed once we define an enum for templateKind in the schema. + // https://dev.azure.com/azure-octo/Incubations/_workitems/edit/7940 + if recipeDetails.TemplateKind == nil || !isValidTemplateKind(*recipeDetails.TemplateKind) { + return &datamodel.Environment{}, v1.NewClientErrInvalidRequest("invalid template kind. Allowed formats: \"bicep\"") } envRecipes[resourceType][recipeName] = datamodel.EnvironmentRecipeProperties{ - TemplateKind: templateKind, + TemplateKind: *recipeDetails.TemplateKind, TemplatePath: to.String(recipeDetails.TemplatePath), Parameters: recipeDetails.Parameters, } diff --git a/pkg/corerp/api/v20220315privatepreview/environment_conversion_test.go b/pkg/corerp/api/v20220315privatepreview/environment_conversion_test.go index 69f7a8c2c5..81acdce6de 100644 --- a/pkg/corerp/api/v20220315privatepreview/environment_conversion_test.go +++ b/pkg/corerp/api/v20220315privatepreview/environment_conversion_test.go @@ -234,7 +234,11 @@ func TestConvertVersionedToDataModel(t *testing.T) { }, { filename: "environmentresource-invalid-templatekind.json", - err: &v1.ErrClientRP{Code: v1.CodeInvalid, Message: "invalid template kind: \"helm\""}, + err: &v1.ErrClientRP{Code: v1.CodeInvalid, Message: "invalid template kind. Allowed formats: \"bicep\""}, + }, + { + filename: "environmentresource-missing-templatekind.json", + err: &v1.ErrClientRP{Code: v1.CodeInvalid, Message: "invalid template kind. Allowed formats: \"bicep\""}, }, } @@ -312,6 +316,29 @@ func TestConvertDataModelToVersioned(t *testing.T) { } } +func TestConvertDataModelToVersioned_EmptyTemplateKind(t *testing.T) { + rawPayload := testutil.ReadFixture("environmentresourcedatamodelemptytemplatekind.json") + r := &datamodel.Environment{} + err := json.Unmarshal(rawPayload, r) + require.NoError(t, err) + + // act + versioned := &EnvironmentResource{} + err = versioned.ConvertFrom(r) + + // assert + require.NoError(t, err) + require.Equal(t, r.ID, string(*versioned.ID)) + require.Equal(t, r.Name, string(*versioned.Name)) + require.Equal(t, r.Type, string(*versioned.Type)) + require.Equal(t, string(r.Properties.Compute.Kind), string(*versioned.Properties.Compute.GetEnvironmentCompute().Kind)) + require.Equal(t, r.Properties.Compute.KubernetesCompute.ResourceID, string(*versioned.Properties.Compute.GetEnvironmentCompute().ResourceID)) + require.Equal(t, len(r.Properties.Recipes), len(versioned.Properties.Recipes)) + require.Equal(t, r.Properties.Recipes[linkrp.MongoDatabasesResourceType]["cosmos-recipe"].TemplatePath, string(*versioned.Properties.Recipes[linkrp.MongoDatabasesResourceType]["cosmos-recipe"].TemplatePath)) + require.Equal(t, r.Properties.Recipes[linkrp.MongoDatabasesResourceType]["cosmos-recipe"].TemplateKind, string(*versioned.Properties.Recipes[linkrp.MongoDatabasesResourceType]["cosmos-recipe"].TemplateKind)) + require.Equal(t, r.Properties.Providers.Azure.Scope, string(*versioned.Properties.Providers.Azure.Scope)) +} + func TestConvertDataModelWithIdentityToVersioned(t *testing.T) { // arrange rawPayload := testutil.ReadFixture("environmentresourcedatamodel-with-workload-identity.json") diff --git a/pkg/corerp/api/v20220315privatepreview/environmentrecipeproperties_conversion_test.go b/pkg/corerp/api/v20220315privatepreview/environmentrecipeproperties_conversion_test.go index f7aa836b6f..874184fbc2 100644 --- a/pkg/corerp/api/v20220315privatepreview/environmentrecipeproperties_conversion_test.go +++ b/pkg/corerp/api/v20220315privatepreview/environmentrecipeproperties_conversion_test.go @@ -11,7 +11,6 @@ import ( "github.com/project-radius/radius/pkg/corerp/datamodel" "github.com/project-radius/radius/pkg/linkrp" - "github.com/project-radius/radius/pkg/recipes" "github.com/project-radius/radius/test/testutil" "github.com/stretchr/testify/require" @@ -38,21 +37,30 @@ func TestEnvironmentRecipePropertiesConvertDataModelToVersioned(t *testing.T) { // act versioned := &EnvironmentRecipeProperties{} err = versioned.ConvertFrom(r) - expectedOutput := map[string]any{ - "location": map[string]any{ - "defaultValue": "[resourceGroup().location]", - "type": "string", - }, - "throughput": map[string]any{ - "defaultValue": (float64(200)), - "maxValue": (float64(400)), - }, - } // assert require.NoError(t, err) - require.Equal(t, "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", string(*versioned.TemplatePath)) - require.Equal(t, recipes.TemplateKindBicep, string(*versioned.TemplateKind)) - require.Equal(t, expectedOutput, versioned.Parameters) + require.Equal(t, r.TemplatePath, string(*versioned.TemplatePath)) + require.Equal(t, r.TemplateKind, string(*versioned.TemplateKind)) + require.Equal(t, r.Parameters, versioned.Parameters) + }) +} + +func TestEnvironmentRecipePropertiesConvertDataModelToVersioned_EmptyTemplateKind(t *testing.T) { + filename := "environmentrecipepropertiesdatamodel-missingtemplatekind.json" + t.Run(filename, func(t *testing.T) { + rawPayload := testutil.ReadFixture(filename) + r := &datamodel.EnvironmentRecipeProperties{} + err := json.Unmarshal(rawPayload, r) + require.NoError(t, err) + + // act + versioned := &EnvironmentRecipeProperties{} + err = versioned.ConvertFrom(r) + // assert + require.NoError(t, err) + require.Equal(t, r.TemplatePath, string(*versioned.TemplatePath)) + require.Equal(t, r.TemplateKind, string(*versioned.TemplateKind)) + require.Equal(t, r.Parameters, versioned.Parameters) }) } diff --git a/pkg/corerp/api/v20220315privatepreview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json b/pkg/corerp/api/v20220315privatepreview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json new file mode 100644 index 0000000000..a692c5bd3a --- /dev/null +++ b/pkg/corerp/api/v20220315privatepreview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json @@ -0,0 +1,13 @@ +{ + "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "parameters": { + "throughput": { + "maxValue": 400, + "defaultValue": 200 + }, + "location": { + "type" : "string", + "defaultValue" : "[resourceGroup().location]" + } + } +} \ No newline at end of file diff --git a/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-missing-templatekind.json b/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-missing-templatekind.json new file mode 100644 index 0000000000..b4729202b2 --- /dev/null +++ b/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-missing-templatekind.json @@ -0,0 +1,24 @@ +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/environments/env0", + "name": "env0", + "type": "Applications.Core/environments", + "properties": { + "compute": { + "kind": "kubernetes", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.ContainerService/managedClusters/radiusTestCluster", + "namespace": "default" + }, + "providers": { + "azure": { + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup" + } + }, + "recipes": { + "Applications.Link/mongoDatabases":{ + "cosmos-recipe": { + "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/mongo" + } + } + } + } + } \ No newline at end of file diff --git a/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-with-workload-identity.json b/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-with-workload-identity.json index 0f671c8087..76dedf0711 100644 --- a/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-with-workload-identity.json +++ b/pkg/corerp/api/v20220315privatepreview/testdata/environmentresource-with-workload-identity.json @@ -21,6 +21,7 @@ "recipes": { "Applications.Link/mongoDatabases":{ "cosmos-recipe": { + "templateKind": "bicep", "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" } } diff --git a/pkg/corerp/api/v20220315privatepreview/testdata/environmentresourcedatamodelemptytemplatekind.json b/pkg/corerp/api/v20220315privatepreview/testdata/environmentresourcedatamodelemptytemplatekind.json new file mode 100644 index 0000000000..4e50f8ac6e --- /dev/null +++ b/pkg/corerp/api/v20220315privatepreview/testdata/environmentresourcedatamodelemptytemplatekind.json @@ -0,0 +1,37 @@ +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/environments/env0", + "name": "env0", + "type": "Applications.Core/environments", + "systemData": { + "createdBy": "fakeid@live.com", + "createdByType": "User", + "createdAt": "2021-09-24T19:09:54.2403864Z", + "lastModifiedBy": "fakeid@live.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-24T20:09:54.2403864Z" + }, + "tags": { + "env": "dev" + }, + "properties": { + "compute": { + "kind": "kubernetes", + "kubernetes": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.ContainerService/managedClusters/radiusTestCluster", + "namespace": "default" + } + }, + "providers": { + "azure": { + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup" + } + }, + "recipes": { + "Applications.Link/mongoDatabases":{ + "cosmos-recipe": { + "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + } + } + } + } + } \ No newline at end of file diff --git a/pkg/corerp/api/v20220315privatepreview/util.go b/pkg/corerp/api/v20220315privatepreview/util.go index 2d01a4324c..280c5de51b 100644 --- a/pkg/corerp/api/v20220315privatepreview/util.go +++ b/pkg/corerp/api/v20220315privatepreview/util.go @@ -126,6 +126,6 @@ func isValidLinkType(link string) bool { return slices.Contains(linkTypes, link) } -func isValidTemplateKind(link string) bool { - return slices.Contains(recipes.SupportedTemplateKind, link) +func isValidTemplateKind(templateKind string) bool { + return slices.Contains(recipes.SupportedTemplateKind, templateKind) } diff --git a/pkg/corerp/api/v20220315privatepreview/zz_generated_models.go b/pkg/corerp/api/v20220315privatepreview/zz_generated_models.go index 8409b9ce8f..bb6480ec6d 100644 --- a/pkg/corerp/api/v20220315privatepreview/zz_generated_models.go +++ b/pkg/corerp/api/v20220315privatepreview/zz_generated_models.go @@ -550,14 +550,14 @@ type EnvironmentProperties struct { // EnvironmentRecipeProperties - Properties of a Recipe linked to an Environment. type EnvironmentRecipeProperties struct { + // REQUIRED; Format of the template provided by the recipe. Allowed values: bicep + TemplateKind *string `json:"templateKind,omitempty"` + // REQUIRED; Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported. TemplatePath *string `json:"templatePath,omitempty"` // Key/value parameters to pass to the recipe template at deployment Parameters map[string]interface{} `json:"parameters,omitempty"` - - // Format of the template provided by the recipe. Allowed values: bicep - TemplateKind *string `json:"templateKind,omitempty"` } // EnvironmentResource - Application environment. diff --git a/pkg/corerp/datamodel/environment.go b/pkg/corerp/datamodel/environment.go index 1896150747..db7c18ab6b 100644 --- a/pkg/corerp/datamodel/environment.go +++ b/pkg/corerp/datamodel/environment.go @@ -34,8 +34,8 @@ type EnvironmentProperties struct { // EnvironmentRecipeProperties represents the properties of environment's recipe. type EnvironmentRecipeProperties struct { - TemplateKind string `json:"templateKind,omitempty"` - TemplatePath string `json:"templatePath,omitempty"` + TemplateKind string `json:"templateKind"` + TemplatePath string `json:"templatePath"` Parameters map[string]any `json:"parameters,omitempty"` } diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2022-03-15-privatepreview/environments.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2022-03-15-privatepreview/environments.json index a0f1b603a0..ad4ecfb87d 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2022-03-15-privatepreview/environments.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2022-03-15-privatepreview/environments.json @@ -495,6 +495,7 @@ } }, "required": [ + "templateKind", "templatePath" ] }, diff --git a/test/functional/corerp/cli/cli_test.go b/test/functional/corerp/cli/cli_test.go index 62bf585547..c597e4bbdb 100644 --- a/test/functional/corerp/cli/cli_test.go +++ b/test/functional/corerp/cli/cli_test.go @@ -48,10 +48,11 @@ func verifyRecipeCLI(ctx context.Context, t *testing.T, test corerp.CoreRPTest) envName := test.Steps[0].CoreRPResources.Resources[0].Name recipeName := "recipeName" recipeTemplate := "testpublicrecipe.azurecr.io/bicep/modules/testTemplate:v1" + templateKind := "bicep" linkType := "Applications.Link/mongoDatabases" t.Run("Validate rad recipe register", func(t *testing.T) { - output, err := cli.RecipeRegister(ctx, envName, recipeName, recipeTemplate, linkType) + output, err := cli.RecipeRegister(ctx, envName, recipeName, templateKind, recipeTemplate, linkType) require.NoError(t, err) require.Contains(t, output, "Successfully linked recipe") }) @@ -74,7 +75,7 @@ func verifyRecipeCLI(ctx context.Context, t *testing.T, test corerp.CoreRPTest) showRecipeName := "mongodbtest" showRecipeTemplate := "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0" showRecipeLinkType := "Applications.Link/mongoDatabases" - output, err := cli.RecipeRegister(ctx, envName, showRecipeName, showRecipeTemplate, showRecipeLinkType) + output, err := cli.RecipeRegister(ctx, envName, showRecipeName, templateKind, showRecipeTemplate, showRecipeLinkType) require.NoError(t, err) require.Contains(t, output, "Successfully linked recipe") output, err = cli.RecipeShow(ctx, envName, showRecipeName, linkType) @@ -90,7 +91,7 @@ func verifyRecipeCLI(ctx context.Context, t *testing.T, test corerp.CoreRPTest) }) t.Run("Validate rad recipe register with recipe name conflicting with dev recipe", func(t *testing.T) { - output, err := cli.RecipeRegister(ctx, envName, "mongo-azure", recipeTemplate, linkType) + output, err := cli.RecipeRegister(ctx, envName, "mongo-azure", templateKind, recipeTemplate, linkType) require.Contains(t, output, "Successfully linked recipe") require.NoError(t, err) output, err = cli.RecipeList(ctx, envName) diff --git a/test/functional/corerp/cli/testdata/corerp-resources-recipe-env.bicep b/test/functional/corerp/cli/testdata/corerp-resources-recipe-env.bicep index cd8cc25f7b..22ce74e598 100644 --- a/test/functional/corerp/cli/testdata/corerp-resources-recipe-env.bicep +++ b/test/functional/corerp/cli/testdata/corerp-resources-recipe-env.bicep @@ -15,6 +15,7 @@ resource env 'Applications.Core/environments@2022-03-15-privatepreview' = { recipes: { 'Applications.Link/mongoDatabases':{ recipe1: { + templateKind: 'bicep' templatePath: 'testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1' } } diff --git a/test/functional/corerp/resources/testdata/corerp-resources-dapr-statestore-recipe.bicep b/test/functional/corerp/resources/testdata/corerp-resources-dapr-statestore-recipe.bicep index 6701fa5f45..d1d37a392e 100644 --- a/test/functional/corerp/resources/testdata/corerp-resources-dapr-statestore-recipe.bicep +++ b/test/functional/corerp/resources/testdata/corerp-resources-dapr-statestore-recipe.bicep @@ -27,6 +27,7 @@ resource env 'Applications.Core/environments@2022-03-15-privatepreview' = { recipes: { 'Applications.Link/daprStateStores':{ daprstatestore: { + templateKind: 'bicep' templatePath: '${registry}/test/functional/corerp/recipes/dapr_state_store_recipe:${version}' } } diff --git a/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-context.bicep b/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-context.bicep index 37307e1912..3ac0c2c36a 100644 --- a/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-context.bicep +++ b/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-context.bicep @@ -27,6 +27,7 @@ resource env 'Applications.Core/environments@2022-03-15-privatepreview' = { recipes: { 'Applications.Link/mongoDatabases':{ mongodb: { + templateKind: 'bicep' templatePath: '${registry}/test/functional/corerp/recipes/mongodb-recipe-context:${version}' } } diff --git a/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-parameters.bicep b/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-parameters.bicep index 05a3bdc6ae..04d775464d 100644 --- a/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-parameters.bicep +++ b/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe-parameters.bicep @@ -27,6 +27,7 @@ resource env 'Applications.Core/environments@2022-03-15-privatepreview' = { recipes: { 'Applications.Link/mongoDatabases' :{ mongodb: { + templateKind: 'bicep' templatePath: '${registry}/test/functional/corerp/recipes/mongodb-recipe-parameter:${version}' parameters: { documentdbName: 'acnt-operator-${rg}' diff --git a/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe.bicep b/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe.bicep index a4bf510453..1cb65edf11 100644 --- a/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe.bicep +++ b/test/functional/corerp/resources/testdata/corerp-resources-mongodb-recipe.bicep @@ -27,6 +27,7 @@ resource env 'Applications.Core/environments@2022-03-15-privatepreview' = { recipes: { 'Applications.Link/mongoDatabases':{ mongodb: { + templateKind: 'bicep' templatePath: '${registry}/test/functional/corerp/recipes/mongodb-recipe-kubernetes:${version}' } } diff --git a/test/functional/corerp/resources/testdata/corerp-resources-redis-value-backed-recipe.bicep b/test/functional/corerp/resources/testdata/corerp-resources-redis-value-backed-recipe.bicep index db5d9ef8ea..4b90420665 100644 --- a/test/functional/corerp/resources/testdata/corerp-resources-redis-value-backed-recipe.bicep +++ b/test/functional/corerp/resources/testdata/corerp-resources-redis-value-backed-recipe.bicep @@ -23,6 +23,7 @@ resource env 'Applications.Core/environments@2022-03-15-privatepreview' = { recipes: { 'Applications.Link/redisCaches':{ rediscache: { + templateKind: 'bicep' templatePath: '${registry}/test/functional/corerp/recipes/redis-recipe-value-backed:${version}' } } diff --git a/test/radcli/cli.go b/test/radcli/cli.go index b3d19f1eae..8e9be7f369 100644 --- a/test/radcli/cli.go +++ b/test/radcli/cli.go @@ -272,12 +272,13 @@ func (cli *CLI) RecipeList(ctx context.Context, envName string) (string, error) return cli.RunCommand(ctx, args) } -func (cli *CLI) RecipeRegister(ctx context.Context, envName, recipeName, templatePath, linkType string) (string, error) { +func (cli *CLI) RecipeRegister(ctx context.Context, envName, recipeName, templateKind, templatePath, linkType string) (string, error) { args := []string{ "recipe", "register", recipeName, "--environment", envName, + "--template-kind", templateKind, "--template-path", templatePath, "--link-type", linkType, } diff --git a/test/radcli/shared.go b/test/radcli/shared.go index 46dda7d934..9e203bb02c 100644 --- a/test/radcli/shared.go +++ b/test/radcli/shared.go @@ -127,7 +127,7 @@ func SharedValidateValidation(t *testing.T, factory func(framework framework.Fac err = cmd.ValidateArgs(cmd.Flags().Args()) if err != nil && testcase.ExpectedValid { - require.NoError(t, err, "validation should have failed but it passed") + require.NoError(t, err, "validation should have passed but it failed") } else if err != nil { // We expected this to fail, so it's OK if it does. No need to run Validate. return @@ -135,7 +135,7 @@ func SharedValidateValidation(t *testing.T, factory func(framework framework.Fac err = validateRequiredFlags(cmd) if err != nil && testcase.ExpectedValid { - require.NoError(t, err, "validation should have failed but it passed") + require.NoError(t, err, "validation should have passed but it failed") } else if err != nil { // We expected this to fail, so it's OK if it does. No need to run Validate. return