-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for Elasticache Parameter Groups (for redis)
- Loading branch information
1 parent
d99d77c
commit b60231d
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
pkg/infra/iac/templates/aws/elasticache_parameter_group/factory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as aws from '@pulumi/aws' | ||
import { ModelCaseWrapper } from '../../wrappers' | ||
|
||
interface Args { | ||
Name: string | ||
Description: string | ||
Family: string | ||
Parameters: Record<string, string> | ||
Tags: ModelCaseWrapper<Record<string, string>> | ||
} | ||
|
||
function create(args: Args): aws.elasticache.SubnetGroup { | ||
return new aws.elasticache.ParameterGroup(args.Name, { | ||
name: args.Name, | ||
family: args.Family, | ||
description: args.Description, | ||
//TMPL {{- if .Parameters }} | ||
parameters: args.Parameters, | ||
//TMPL {{- end }} | ||
//TMPL {{- if .Tags }} | ||
tags: args.Tags, | ||
//TMPL {{- end }} | ||
}) | ||
} | ||
|
||
function properties(object: aws.elasticache.ParameterGroup, args: Args) { | ||
return { | ||
Arn: object.arn, | ||
Name: object.name, | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
pkg/infra/iac/templates/aws/elasticache_parameter_group/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "elasticache_parameter_group", | ||
"dependencies": { | ||
"@pulumi/aws": "^5.37.0" | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
pkg/templates/aws/edges/elasticache_cluster-elasticache_parameter_group.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source: aws:elasticache_cluster | ||
target: aws:elasticache_parameter_group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
pkg/templates/aws/resources/elasticache_parameter_group.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
qualified_type_name: aws:elasticache_parameter_group | ||
display_name: ElastiCache Parameter Group | ||
|
||
properties: | ||
Family: | ||
type: string | ||
description: The family of the parameter group corresponding to an engine version. | ||
# TODO: make version configurable on elasticache clusters and determine the family based on the version | ||
default_value: "redis7" | ||
required: true | ||
allowed_values: | ||
- redis4.0 | ||
- redis5.0 | ||
- redis6.x | ||
- redis7 | ||
Description: | ||
type: string | ||
Parameters: | ||
type: list | ||
properties: | ||
Name: | ||
type: string | ||
description: The name of the ElastiCache parameter. | ||
Value: | ||
type: string | ||
description: The value of the ElastiCache parameter. | ||
aws:tags: | ||
type: model | ||
Arn: | ||
type: string | ||
description: The Amazon Resource Name (ARN) of the parameter group. | ||
configuration_disabled: true | ||
deploy_time: true | ||
required: true | ||
|
||
delete_context: | ||
requires_no_upstream: true | ||
views: | ||
dataflow: small | ||
|
||
deployment_permissions: | ||
deploy: | ||
[ | ||
'elasticache:*ParameterGroup', | ||
] |