Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheParameterGroupNotFound #18338

Closed
McCo0L opened this issue Mar 22, 2021 · 7 comments · Fixed by #32669
Closed

CacheParameterGroupNotFound #18338

McCo0L opened this issue Mar 22, 2021 · 7 comments · Fixed by #32669
Labels
service/elasticache Issues and PRs that pertain to the elasticache service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Milestone

Comments

@McCo0L
Copy link

McCo0L commented Mar 22, 2021

Terraform CLI and Terraform AWS Provider Version

Terraform v0.14.7

  • provider registry.terraform.io/hashicorp/aws v3.33.0

Affected Resource(s)

aws_elasticache_cluster

Terraform Configuration Files

resource "aws_elasticache_cluster" "sessionsmanager" {
  cluster_id           = "any-name"
  engine               = "memcached"
  node_type            = var.node_types
  num_cache_nodes      = 1
  parameter_group_name = var.parameter_group
  port                 = 11211
}

variable "node_types" {
  type        = string
  default     = "cache.t3.micro"
}

variable "parameter_group" {
  type    = string
  default = "default.memcached1.4"
}

Expected Behavior

aws elasticache created

Actual Behavior

Error: error creating ElastiCache Cache Cluster: CacheParameterGroupNotFound: CacheParameterGroup not found: default.memcached1.4
        status code: 404, request id: xxxxxx-xxxxxba-xxxxx-xxxxx-xxxxxxxxxxx

  on ../../modules/memcached/memcached.tf line 1, in resource "aws_elasticache_cluster" "sessionsmanager":
   1: resource "aws_elasticache_cluster" "sessionsmanager" {

Steps to Reproduce

  1. terraform apply
@ghost ghost added the service/elasticache Issues and PRs that pertain to the elasticache service. label Mar 22, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 22, 2021
@ewbankkit
Copy link
Contributor

@McCo0L Thanks for raising this issue.
Which AWS region are you creating the ElastiCache cluster in?
It seems that the default.memcached1.4 cache parameter group is not available in all regions:

$ aws --region us-west-2 elasticache describe-cache-parameter-groups
{
    "CacheParameterGroups": [
        {
            "CacheParameterGroupName": "default.memcached1.4",
            "CacheParameterGroupFamily": "memcached1.4",
            "Description": "Default parameter group for memcached1.4",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:us-west-2:123456789012:parametergroup:default.memcached1.4"
        },
        {
            "CacheParameterGroupName": "default.memcached1.5",
            "CacheParameterGroupFamily": "memcached1.5",
            "Description": "Default parameter group for memcached1.5",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:us-west-2:123456789012:parametergroup:default.memcached1.5"
        },
...
$ aws --region eu-south-1 elasticache describe-cache-parameter-groups
{
    "CacheParameterGroups": [
        {
            "CacheParameterGroupName": "default.memcached1.5",
            "CacheParameterGroupFamily": "memcached1.5",
            "Description": "Default parameter group for memcached1.5",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:eu-south-1:123456789012:parametergroup:default.memcached1.5"
        },
        {
            "CacheParameterGroupName": "default.memcached1.6",
            "CacheParameterGroupFamily": "memcached1.6",
            "Description": "Default parameter group for memcached1.6",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:eu-south-1:123456789012:parametergroup:default.memcached1.6"
        },
...

@ewbankkit ewbankkit added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 23, 2021
@McCo0L
Copy link
Author

McCo0L commented Mar 23, 2021

@ewbankkit the region is us-east-2, and looks like we have it there:

$ aws --region us-east-2 elasticache describe-cache-parameter-groups
{
    "CacheParameterGroups": [
        {
            "CacheParameterGroupName": "default.memcached1.4",
            "CacheParameterGroupFamily": "memcached1.4",
            "Description": "Default parameter group for memcached1.4",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:us-east-2:498145187150:parametergroup:default.memcached1.4"
        },
        {
            "CacheParameterGroupName": "default.memcached1.5",
            "CacheParameterGroupFamily": "memcached1.5",
            "Description": "Default parameter group for memcached1.5",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:us-east-2:498145187150:parametergroup:default.memcached1.5"
        },
        {
            "CacheParameterGroupName": "default.memcached1.6",
            "CacheParameterGroupFamily": "memcached1.6",
            "Description": "Default parameter group for memcached1.6",
            "IsGlobal": false,
            "ARN": "arn:aws:elasticache:us-east-2:498145187150:parametergroup:default.memcached1.6"
        },

@ghost ghost removed waiting-response Maintainers are waiting on response from community or contributor. labels Mar 23, 2021
@McCo0L
Copy link
Author

McCo0L commented Mar 23, 2021

was able to create it using default.memcached1.6 but not 1.4 or 1.5 besides both look avaiable on us-east-2

@ewbankkit
Copy link
Contributor

@McCo0L Could you try specifying an explicit engine_version attribute?

When I go to create a memcached cluster in us-east-2 using the AWS Console the default is version 1.6.6:

Screenshot 2021-03-24 074713

The AWS API Reference does not describe what the default EngineVersion value is, so it may be that "the latest" engine version is used and hence the default.memcached1.4 and default.memcached1.5 aren't applicable - The AWS error message is not very helpful in that case.

@ewbankkit ewbankkit added the waiting-response Maintainers are waiting on response from community or contributor. label Mar 24, 2021
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Mar 14, 2023
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 25, 2023
@github-actions github-actions bot added this to the v5.10.0 milestone Jul 25, 2023
@github-actions
Copy link

This functionality has been released in v5.10.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/elasticache Issues and PRs that pertain to the elasticache service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
2 participants