We recommend using Azure Native.
azure.appplatform.SpringCloudAppRedisAssociation
Explore with Pulumi AI
Associates a Spring Cloud Application with a Redis Cache.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleSpringCloudService = new Azure.AppPlatform.SpringCloudService("exampleSpringCloudService", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
});
var exampleSpringCloudApp = new Azure.AppPlatform.SpringCloudApp("exampleSpringCloudApp", new()
{
ResourceGroupName = exampleResourceGroup.Name,
ServiceName = exampleSpringCloudService.Name,
});
var exampleCache = new Azure.Redis.Cache("exampleCache", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Capacity = 0,
Family = "C",
SkuName = "Basic",
EnableNonSslPort = true,
});
var exampleSpringCloudAppRedisAssociation = new Azure.AppPlatform.SpringCloudAppRedisAssociation("exampleSpringCloudAppRedisAssociation", new()
{
SpringCloudAppId = exampleSpringCloudApp.Id,
RedisCacheId = exampleCache.Id,
RedisAccessKey = exampleCache.PrimaryAccessKey,
SslEnabled = true,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appplatform"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/redis"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "exampleSpringCloudService", &appplatform.SpringCloudServiceArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
})
if err != nil {
return err
}
exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "exampleSpringCloudApp", &appplatform.SpringCloudAppArgs{
ResourceGroupName: exampleResourceGroup.Name,
ServiceName: exampleSpringCloudService.Name,
})
if err != nil {
return err
}
exampleCache, err := redis.NewCache(ctx, "exampleCache", &redis.CacheArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Capacity: pulumi.Int(0),
Family: pulumi.String("C"),
SkuName: pulumi.String("Basic"),
EnableNonSslPort: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = appplatform.NewSpringCloudAppRedisAssociation(ctx, "exampleSpringCloudAppRedisAssociation", &appplatform.SpringCloudAppRedisAssociationArgs{
SpringCloudAppId: exampleSpringCloudApp.ID(),
RedisCacheId: exampleCache.ID(),
RedisAccessKey: exampleCache.PrimaryAccessKey,
SslEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appplatform.SpringCloudService;
import com.pulumi.azure.appplatform.SpringCloudServiceArgs;
import com.pulumi.azure.appplatform.SpringCloudApp;
import com.pulumi.azure.appplatform.SpringCloudAppArgs;
import com.pulumi.azure.redis.Cache;
import com.pulumi.azure.redis.CacheArgs;
import com.pulumi.azure.appplatform.SpringCloudAppRedisAssociation;
import com.pulumi.azure.appplatform.SpringCloudAppRedisAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
var exampleSpringCloudApp = new SpringCloudApp("exampleSpringCloudApp", SpringCloudAppArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.serviceName(exampleSpringCloudService.name())
.build());
var exampleCache = new Cache("exampleCache", CacheArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.capacity(0)
.family("C")
.skuName("Basic")
.enableNonSslPort(true)
.build());
var exampleSpringCloudAppRedisAssociation = new SpringCloudAppRedisAssociation("exampleSpringCloudAppRedisAssociation", SpringCloudAppRedisAssociationArgs.builder()
.springCloudAppId(exampleSpringCloudApp.id())
.redisCacheId(exampleCache.id())
.redisAccessKey(exampleCache.primaryAccessKey())
.sslEnabled(true)
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_spring_cloud_service = azure.appplatform.SpringCloudService("exampleSpringCloudService",
resource_group_name=example_resource_group.name,
location=example_resource_group.location)
example_spring_cloud_app = azure.appplatform.SpringCloudApp("exampleSpringCloudApp",
resource_group_name=example_resource_group.name,
service_name=example_spring_cloud_service.name)
example_cache = azure.redis.Cache("exampleCache",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
capacity=0,
family="C",
sku_name="Basic",
enable_non_ssl_port=True)
example_spring_cloud_app_redis_association = azure.appplatform.SpringCloudAppRedisAssociation("exampleSpringCloudAppRedisAssociation",
spring_cloud_app_id=example_spring_cloud_app.id,
redis_cache_id=example_cache.id,
redis_access_key=example_cache.primary_access_key,
ssl_enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleSpringCloudService = new azure.appplatform.SpringCloudService("exampleSpringCloudService", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
});
const exampleSpringCloudApp = new azure.appplatform.SpringCloudApp("exampleSpringCloudApp", {
resourceGroupName: exampleResourceGroup.name,
serviceName: exampleSpringCloudService.name,
});
const exampleCache = new azure.redis.Cache("exampleCache", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
capacity: 0,
family: "C",
skuName: "Basic",
enableNonSslPort: true,
});
const exampleSpringCloudAppRedisAssociation = new azure.appplatform.SpringCloudAppRedisAssociation("exampleSpringCloudAppRedisAssociation", {
springCloudAppId: exampleSpringCloudApp.id,
redisCacheId: exampleCache.id,
redisAccessKey: exampleCache.primaryAccessKey,
sslEnabled: true,
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleSpringCloudService:
type: azure:appplatform:SpringCloudService
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
exampleSpringCloudApp:
type: azure:appplatform:SpringCloudApp
properties:
resourceGroupName: ${exampleResourceGroup.name}
serviceName: ${exampleSpringCloudService.name}
exampleCache:
type: azure:redis:Cache
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
capacity: 0
family: C
skuName: Basic
enableNonSslPort: true
exampleSpringCloudAppRedisAssociation:
type: azure:appplatform:SpringCloudAppRedisAssociation
properties:
springCloudAppId: ${exampleSpringCloudApp.id}
redisCacheId: ${exampleCache.id}
redisAccessKey: ${exampleCache.primaryAccessKey}
sslEnabled: true
Create SpringCloudAppRedisAssociation Resource
new SpringCloudAppRedisAssociation(name: string, args: SpringCloudAppRedisAssociationArgs, opts?: CustomResourceOptions);
@overload
def SpringCloudAppRedisAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
redis_access_key: Optional[str] = None,
redis_cache_id: Optional[str] = None,
spring_cloud_app_id: Optional[str] = None,
ssl_enabled: Optional[bool] = None)
@overload
def SpringCloudAppRedisAssociation(resource_name: str,
args: SpringCloudAppRedisAssociationArgs,
opts: Optional[ResourceOptions] = None)
func NewSpringCloudAppRedisAssociation(ctx *Context, name string, args SpringCloudAppRedisAssociationArgs, opts ...ResourceOption) (*SpringCloudAppRedisAssociation, error)
public SpringCloudAppRedisAssociation(string name, SpringCloudAppRedisAssociationArgs args, CustomResourceOptions? opts = null)
public SpringCloudAppRedisAssociation(String name, SpringCloudAppRedisAssociationArgs args)
public SpringCloudAppRedisAssociation(String name, SpringCloudAppRedisAssociationArgs args, CustomResourceOptions options)
type: azure:appplatform:SpringCloudAppRedisAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SpringCloudAppRedisAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SpringCloudAppRedisAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SpringCloudAppRedisAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SpringCloudAppRedisAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SpringCloudAppRedisAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SpringCloudAppRedisAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SpringCloudAppRedisAssociation resource accepts the following input properties:
- Redis
Access stringKey Specifies the Redis Cache access key.
- Redis
Cache stringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- Spring
Cloud stringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- Ssl
Enabled bool Should SSL be used when connecting to Redis? Defaults to
true
.
- Redis
Access stringKey Specifies the Redis Cache access key.
- Redis
Cache stringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- Spring
Cloud stringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- Ssl
Enabled bool Should SSL be used when connecting to Redis? Defaults to
true
.
- redis
Access StringKey Specifies the Redis Cache access key.
- redis
Cache StringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring
Cloud StringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- name String
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- ssl
Enabled Boolean Should SSL be used when connecting to Redis? Defaults to
true
.
- redis
Access stringKey Specifies the Redis Cache access key.
- redis
Cache stringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring
Cloud stringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- name string
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- ssl
Enabled boolean Should SSL be used when connecting to Redis? Defaults to
true
.
- redis_
access_ strkey Specifies the Redis Cache access key.
- redis_
cache_ strid Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring_
cloud_ strapp_ id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- name str
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- ssl_
enabled bool Should SSL be used when connecting to Redis? Defaults to
true
.
- redis
Access StringKey Specifies the Redis Cache access key.
- redis
Cache StringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring
Cloud StringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- name String
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- ssl
Enabled Boolean Should SSL be used when connecting to Redis? Defaults to
true
.
Outputs
All input properties are implicitly available as output properties. Additionally, the SpringCloudAppRedisAssociation resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing SpringCloudAppRedisAssociation Resource
Get an existing SpringCloudAppRedisAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SpringCloudAppRedisAssociationState, opts?: CustomResourceOptions): SpringCloudAppRedisAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
redis_access_key: Optional[str] = None,
redis_cache_id: Optional[str] = None,
spring_cloud_app_id: Optional[str] = None,
ssl_enabled: Optional[bool] = None) -> SpringCloudAppRedisAssociation
func GetSpringCloudAppRedisAssociation(ctx *Context, name string, id IDInput, state *SpringCloudAppRedisAssociationState, opts ...ResourceOption) (*SpringCloudAppRedisAssociation, error)
public static SpringCloudAppRedisAssociation Get(string name, Input<string> id, SpringCloudAppRedisAssociationState? state, CustomResourceOptions? opts = null)
public static SpringCloudAppRedisAssociation get(String name, Output<String> id, SpringCloudAppRedisAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Name string
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- Redis
Access stringKey Specifies the Redis Cache access key.
- Redis
Cache stringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- Spring
Cloud stringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- Ssl
Enabled bool Should SSL be used when connecting to Redis? Defaults to
true
.
- Name string
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- Redis
Access stringKey Specifies the Redis Cache access key.
- Redis
Cache stringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- Spring
Cloud stringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- Ssl
Enabled bool Should SSL be used when connecting to Redis? Defaults to
true
.
- name String
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- redis
Access StringKey Specifies the Redis Cache access key.
- redis
Cache StringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring
Cloud StringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- ssl
Enabled Boolean Should SSL be used when connecting to Redis? Defaults to
true
.
- name string
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- redis
Access stringKey Specifies the Redis Cache access key.
- redis
Cache stringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring
Cloud stringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- ssl
Enabled boolean Should SSL be used when connecting to Redis? Defaults to
true
.
- name str
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- redis_
access_ strkey Specifies the Redis Cache access key.
- redis_
cache_ strid Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring_
cloud_ strapp_ id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- ssl_
enabled bool Should SSL be used when connecting to Redis? Defaults to
true
.
- name String
Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
- redis
Access StringKey Specifies the Redis Cache access key.
- redis
Cache StringId Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
- spring
Cloud StringApp Id Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
- ssl
Enabled Boolean Should SSL be used when connecting to Redis? Defaults to
true
.
Import
Spring Cloud Application Redis Association can be imported using the resource id
, e.g.
$ pulumi import azure:appplatform/springCloudAppRedisAssociation:SpringCloudAppRedisAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.AppPlatform/spring/myservice/apps/myapp/bindings/bind1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.