Skip to content

Commit 6ec616d

Browse files
tas50claude
andauthored
Expand Redshift, EMR, and ElastiCache resources (#7158)
* ⭐ Expand Redshift and EMR with subnet groups, events, steps, and more Redshift additions (4 new top-level resources): - subnetGroup: cluster subnet groups with VPC, subnets, and status - eventSubscription: SNS event notifications with categories and severity - scheduledAction: scheduled resize/pause/resume with cron schedules - snapshotSchedule: automated snapshot schedule definitions EMR additions (1 account-level + 3 per-cluster resources): - blockPublicAccessConfiguration: account-level security setting - step: cluster job steps with status, JAR, args, and timeline - instanceGroup: cluster topology (MASTER/CORE/TASK) with instance types - bootstrapAction: initialization scripts with args Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ⭐ Expand ElastiCache with parameter groups, subnet groups, users, updates, snapshots Add 5 new top-level resources to aws.elasticache: - parameterGroup: cache parameter groups with family and global flag - subnetGroup: subnet groups with VPC reference and network types - user: RBAC users with access strings and authentication details - serviceUpdate: available service updates with severity and status - snapshot: cache snapshots with engine, KMS key, and VPC references Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🧹 Address PR review: Redshift region errors, ElastiCache dedup, spell check - Add IsServiceNotAvailableInRegionError check to 4 new Redshift methods (subnet groups, event subscriptions, scheduled actions, snapshot schedules) - Fetch ElastiCache service updates from single region (global data, not per-region) to eliminate N duplicate copies - Add "xlarge" to spell check expect list Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update permissions Signed-off-by: Tim Smith <tsmith84@gmail.com> * 🐛 Fix ElastiCache kmsKey N+1 and EMR encryption config error handling - Batch-fetch replication groups per region during cluster discovery to cache KMS key IDs, eliminating per-cluster DescribeReplicationGroups API calls when kmsKey is accessed - Add warnings for unexpected type assertions in EMR encryption configuration parsing (prevents silent false negatives) - Propagate convert.JsonToDict errors instead of silently discarding them Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Signed-off-by: Tim Smith <tsmith84@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d4ec9e1 commit 6ec616d

File tree

8 files changed

+3772
-24
lines changed

8 files changed

+3772
-24
lines changed

.github/actions/spelling/expect.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ workdir
335335
WORKSPACESUSER
336336
workspacesweb
337337
Xff
338+
xlarge
338339
xssmatchstatement
339340
yara
340341
zerolog

providers/aws/resources/aws.lr

Lines changed: 288 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3801,6 +3801,8 @@ private aws.ecs.taskDefinition.ephemeralStorage {
38013801
aws.emr {
38023802
// List of EMR clusters
38033803
clusters() []aws.emr.cluster
3804+
// Block public access configuration (account-level)
3805+
blockPublicAccessConfiguration() dict
38043806
}
38053807

38063808
// Amazon EMR cluster
@@ -3833,6 +3835,12 @@ private aws.emr.cluster @defaults("arn") {
38333835
masterPublicDnsName() string
38343836
// KMS key used for log encryption
38353837
logEncryptionKmsKey() aws.kms.key
3838+
// Steps associated with the cluster
3839+
steps() []aws.emr.cluster.step
3840+
// Instance groups in the cluster
3841+
instanceGroups() []aws.emr.cluster.instanceGroup
3842+
// Bootstrap actions for the cluster
3843+
bootstrapActions() []aws.emr.cluster.bootstrapAction
38363844
}
38373845

38383846
// EMR cluster encryption configuration from the security configuration
@@ -3847,6 +3855,62 @@ private aws.emr.cluster.encryptionConfiguration @defaults("atRestEnabled inTrans
38473855
inTransitConfiguration dict
38483856
}
38493857

3858+
// Amazon EMR cluster step
3859+
private aws.emr.cluster.step @defaults("name status") {
3860+
// Step identifier
3861+
id string
3862+
// Step name
3863+
name string
3864+
// Action to take on failure: TERMINATE_CLUSTER, CANCEL_AND_WAIT, CONTINUE
3865+
actionOnFailure string
3866+
// Step execution state: PENDING, CANCEL_PENDING, RUNNING, COMPLETED, CANCELLED, FAILED, INTERRUPTED
3867+
status string
3868+
// Path to the JAR file for the step
3869+
jar string
3870+
// Arguments passed to the step
3871+
args []string
3872+
// When the step was created
3873+
createdAt time
3874+
// When the step started running
3875+
startedAt time
3876+
// When the step finished
3877+
endedAt time
3878+
}
3879+
3880+
// Amazon EMR cluster instance group
3881+
private aws.emr.cluster.instanceGroup @defaults("name instanceGroupType instanceType") {
3882+
// Instance group identifier
3883+
id string
3884+
// Instance group name
3885+
name string
3886+
// Group type: MASTER, CORE, TASK
3887+
instanceGroupType string
3888+
// EC2 instance type (e.g., m5.xlarge)
3889+
instanceType string
3890+
// Market type: ON_DEMAND, SPOT
3891+
market string
3892+
// Target number of instances
3893+
requestedInstanceCount int
3894+
// Currently running instances
3895+
runningInstanceCount int
3896+
// Instance group state
3897+
status string
3898+
// Spot bid price (if market is SPOT)
3899+
bidPrice string
3900+
// Whether EBS optimization is enabled
3901+
ebsOptimized bool
3902+
}
3903+
3904+
// Amazon EMR cluster bootstrap action
3905+
private aws.emr.cluster.bootstrapAction @defaults("name scriptPath") {
3906+
// Bootstrap action name
3907+
name string
3908+
// Path to the bootstrap script (S3 or local)
3909+
scriptPath string
3910+
// Arguments passed to the bootstrap script
3911+
args []string
3912+
}
3913+
38503914
// Amazon EventBridge
38513915
aws.eventbridge @defaults("eventBuses") {
38523916
// List of EventBridge event buses
@@ -5556,6 +5620,16 @@ aws.elasticache @defaults("cacheClusters") {
55565620
cacheClusters() []aws.elasticache.cluster
55575621
// List of serverless caches
55585622
serverlessCaches() []aws.elasticache.serverlessCache
5623+
// List of cache parameter groups
5624+
parameterGroups() []aws.elasticache.parameterGroup
5625+
// List of cache subnet groups
5626+
subnetGroups() []aws.elasticache.subnetGroup
5627+
// List of RBAC users
5628+
users() []aws.elasticache.user
5629+
// List of available service updates
5630+
serviceUpdates() []aws.elasticache.serviceUpdate
5631+
// List of cache snapshots
5632+
snapshots() []aws.elasticache.snapshot
55595633
}
55605634

55615635
// Amazon ElastiCache cluster
@@ -5659,10 +5733,140 @@ private aws.elasticache.serverlessCache @defaults("name description status engin
56595733
subnets() []aws.vpc.subnet
56605734
}
56615735

5736+
// Amazon ElastiCache parameter group
5737+
private aws.elasticache.parameterGroup @defaults("name family") {
5738+
// ARN of the parameter group
5739+
arn string
5740+
// Parameter group name
5741+
name string
5742+
// Region where the parameter group exists
5743+
region string
5744+
// Engine family (e.g., redis7, memcached1.6)
5745+
family string
5746+
// Description of the parameter group
5747+
description string
5748+
// Whether the parameter group is associated with a Global datastore
5749+
isGlobal bool
5750+
}
5751+
5752+
// Amazon ElastiCache subnet group
5753+
private aws.elasticache.subnetGroup @defaults("name") {
5754+
// ARN of the subnet group
5755+
arn string
5756+
// Subnet group name
5757+
name string
5758+
// Region where the subnet group exists
5759+
region string
5760+
// Description of the subnet group
5761+
description string
5762+
// Subnets in this group
5763+
subnets []dict
5764+
// Supported network types (ipv4, ipv6, dual_stack)
5765+
supportedNetworkTypes []string
5766+
// VPC associated with this subnet group
5767+
vpc() aws.vpc
5768+
}
5769+
5770+
// Amazon ElastiCache RBAC user
5771+
private aws.elasticache.user @defaults("userName status engine") {
5772+
// ARN of the user
5773+
arn string
5774+
// User ID
5775+
userId string
5776+
// Username
5777+
userName string
5778+
// Region where the user exists
5779+
region string
5780+
// Access permissions string
5781+
accessString string
5782+
// Engine type (valkey or redis)
5783+
engine string
5784+
// Minimum engine version required
5785+
minimumEngineVersion string
5786+
// User status: active, modifying, deleting
5787+
status string
5788+
// User group IDs the user belongs to
5789+
userGroupIds []string
5790+
// Authentication details
5791+
authentication dict
5792+
}
5793+
5794+
// Amazon ElastiCache service update
5795+
private aws.elasticache.serviceUpdate @defaults("name severity status") {
5796+
// Service update name
5797+
name string
5798+
// Region where the update was discovered
5799+
region string
5800+
// Description of the service update
5801+
description string
5802+
// Engine the update applies to (Valkey, Redis, Memcached)
5803+
engine string
5804+
// Engine version the update applies to
5805+
engineVersion string
5806+
// Severity: critical, important, medium, low
5807+
severity string
5808+
// Status: available, cancelled, expired
5809+
status string
5810+
// Update type
5811+
updateType string
5812+
// Date the update was released
5813+
releaseDate time
5814+
// Recommended apply-by date
5815+
recommendedApplyByDate time
5816+
// Date after which the update is no longer available
5817+
endDate time
5818+
// Estimated time to apply the update
5819+
estimatedUpdateTime string
5820+
// Whether update auto-applies after recommended date
5821+
autoUpdateAfterRecommendedApplyByDate bool
5822+
}
5823+
5824+
// Amazon ElastiCache snapshot
5825+
private aws.elasticache.snapshot @defaults("name status engine") {
5826+
// ARN of the snapshot
5827+
arn string
5828+
// Snapshot name
5829+
name string
5830+
// Region where the snapshot exists
5831+
region string
5832+
// Source cluster ID
5833+
cacheClusterId string
5834+
// Source replication group ID
5835+
replicationGroupId string
5836+
// Snapshot status: creating, available, restoring, copying, deleting
5837+
status string
5838+
// Snapshot source: automated or manual
5839+
snapshotSource string
5840+
// Cache engine name
5841+
engine string
5842+
// Cache engine version
5843+
engineVersion string
5844+
// Cache node type
5845+
cacheNodeType string
5846+
// Number of cache nodes
5847+
numCacheNodes int
5848+
// Snapshot retention limit in days
5849+
snapshotRetentionLimit int
5850+
// KMS key used to encrypt the snapshot
5851+
kmsKey() aws.kms.key
5852+
// VPC of the cache subnet group
5853+
vpc() aws.vpc
5854+
// When the source cluster was created
5855+
cacheClusterCreatedAt time
5856+
}
5857+
56625858
// Amazon Redshift
56635859
aws.redshift @defaults("clusters") {
56645860
// List of clusters
56655861
clusters() []aws.redshift.cluster
5862+
// List of cluster subnet groups
5863+
subnetGroups() []aws.redshift.subnetGroup
5864+
// List of event notification subscriptions
5865+
eventSubscriptions() []aws.redshift.eventSubscription
5866+
// List of scheduled actions (resize, pause, resume)
5867+
scheduledActions() []aws.redshift.scheduledAction
5868+
// List of snapshot schedules
5869+
snapshotSchedules() []aws.redshift.snapshotSchedule
56665870
}
56675871

56685872
// Amazon Redshift cluster
@@ -5794,6 +5998,90 @@ private aws.redshift.snapshot @defaults("arn clusterIdentifier status createdAt"
57945998
kmsKey() aws.kms.key
57955999
}
57966000

6001+
// Amazon Redshift cluster subnet group
6002+
private aws.redshift.subnetGroup @defaults("name status") {
6003+
// Subnet group name
6004+
name string
6005+
// Description of the subnet group
6006+
description string
6007+
// Region where the subnet group exists
6008+
region string
6009+
// Status of the subnet group (e.g., Complete)
6010+
status string
6011+
// Subnets in this group
6012+
subnets []dict
6013+
// Supported cluster IP address types
6014+
supportedClusterIpAddressTypes []string
6015+
// VPC associated with this subnet group
6016+
vpc() aws.vpc
6017+
// Tags for the subnet group
6018+
tags map[string]string
6019+
}
6020+
6021+
// Amazon Redshift event notification subscription
6022+
private aws.redshift.eventSubscription @defaults("name status") {
6023+
// Subscription name
6024+
name string
6025+
// Region where the subscription exists
6026+
region string
6027+
// Whether the subscription is enabled
6028+
enabled bool
6029+
// List of event categories for the subscription
6030+
eventCategories []string
6031+
// Event severity filter (ERROR or INFO)
6032+
severity string
6033+
// ARN of the SNS topic for notifications
6034+
snsTopicArn string
6035+
// List of source IDs the subscription applies to
6036+
sourceIds []string
6037+
// Type of source (cluster, cluster-snapshot, cluster-parameter-group, cluster-security-group, scheduled-action)
6038+
sourceType string
6039+
// Subscription status (active, no-permission, topic-not-exist)
6040+
status string
6041+
// When the subscription was created
6042+
createdAt time
6043+
// Tags for the subscription
6044+
tags map[string]string
6045+
}
6046+
6047+
// Amazon Redshift scheduled action (resize, pause, resume)
6048+
private aws.redshift.scheduledAction @defaults("name state") {
6049+
// Scheduled action name
6050+
name string
6051+
// Region where the action exists
6052+
region string
6053+
// Description of the scheduled action
6054+
description string
6055+
// Cron-like schedule expression
6056+
schedule string
6057+
// State of the action: ACTIVE, DISABLED
6058+
state string
6059+
// IAM role ARN used to run the action
6060+
iamRole string
6061+
// Start time of the action schedule
6062+
startTime time
6063+
// End time of the action schedule
6064+
endTime time
6065+
// Target action details (resize, pause, or resume parameters)
6066+
targetAction dict
6067+
}
6068+
6069+
// Amazon Redshift snapshot schedule
6070+
private aws.redshift.snapshotSchedule @defaults("id description") {
6071+
// Schedule identifier
6072+
id string
6073+
// Region where the schedule exists
6074+
region string
6075+
// Description of the schedule
6076+
description string
6077+
// List of cron-like schedule definitions
6078+
scheduleDefinitions []string
6079+
// Number of clusters associated with this schedule
6080+
associatedClusterCount int
6081+
// Tags for the schedule
6082+
tags map[string]string
6083+
}
6084+
57976085
// Amazon Route 53 DNS service
57986086
aws.route53 {
57996087
// List of all hosted zones in the account

0 commit comments

Comments
 (0)