SecurityGroup
The SecurityGroup resource lets you manage AWS ElastiCache SecurityGroups for controlling access to your ElastiCache clusters.
Minimal Example
Section titled “Minimal Example”Create a basic ElastiCache SecurityGroup with a description and tags.
import AWS from "alchemy/aws/control";
const basicSecurityGroup = await AWS.ElastiCache.SecurityGroup("basicSecurityGroup", { Description: "Basic Security Group for ElastiCache", Tags: [ { Key: "Environment", Value: "Development" }, { Key: "Project", Value: "SampleProject" } ]});
Advanced Configuration
Section titled “Advanced Configuration”Configure a SecurityGroup with existing resource adoption.
const advancedSecurityGroup = await AWS.ElastiCache.SecurityGroup("advancedSecurityGroup", { Description: "Advanced Security Group for ElastiCache with adoption", Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "CriticalProject" } ], adopt: true});
Security Group with Custom Properties
Section titled “Security Group with Custom Properties”Create a SecurityGroup with a specific description and without tags.
const customSecurityGroup = await AWS.ElastiCache.SecurityGroup("customSecurityGroup", { Description: "Custom Security Group for specific use cases"});
Security Group Adoption
Section titled “Security Group Adoption”Demonstrate how to adopt an existing SecurityGroup.
const existingSecurityGroup = await AWS.ElastiCache.SecurityGroup("existingSecurityGroup", { Description: "Adopting an existing Security Group", adopt: true});