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

[Enhancement]: Add vpc_id output of aws_elasticache_subnet_group data source #27398

Closed
posquit0 opened this issue Oct 23, 2022 · 3 comments · Fixed by #35887
Closed

[Enhancement]: Add vpc_id output of aws_elasticache_subnet_group data source #27398

posquit0 opened this issue Oct 23, 2022 · 3 comments · Fixed by #35887
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticache Issues and PRs that pertain to the elasticache service.
Milestone

Comments

@posquit0
Copy link
Contributor

Description

In #27114 , I requested a new data source aws_elasticache_subnet_group. And this data source was released in the release of https://github.com/hashicorp/terraform-provider-aws/blob/v4.36.0/CHANGELOG.md .

However, I needed aws_elasticache_subnet_group data source for vpc_id of a given ElastiCache subnet group.
The vpc_id can be used for creating a security group of the ElastiCache cluster like the below.

data "aws_elasticache_subnet_group" "this" {
  name = "default"
}

resource "aws_security_group" "this" {
  name        = "example"
  description = "Example Security Group."
  vpc_id      = data.aws_elasticache_subnet_group.this.vpc_id
}

Affected Resource(s) and/or Data Source(s)

  • aws_elasticache_subnet_group

Potential Terraform Configuration

data "aws_elasticache_subnet_group" "this" {
  name = "default"
}

resource "aws_security_group" "this" {
  name        = "example"
  description = "Example Security Group."
  vpc_id      = data.aws_elasticache_subnet_group.this.vpc_id
}

References

> aws elasticache describe-cache-subnet-groups --cache-subnet-group-name default
{
    "CacheSubnetGroups": [
        {
            "CacheSubnetGroupName": "default",
            "CacheSubnetGroupDescription": "Default CacheSubnetGroup",
            "VpcId": "vpc-xxxxxxx",
            "Subnets": [
                {
                    "SubnetIdentifier": "subnet-aaaaaaa
                    "SubnetAvailabilityZone": {
                        "Name": "ap-northeast-2d"
                    }
                },
                {
                    "SubnetIdentifier": "subnet-bbbbbbb",
                    "SubnetAvailabilityZone": {
                        "Name": "ap-northeast-2a"
                    }
                },
                {
                    "SubnetIdentifier": "subnet-ccccccc",
                    "SubnetAvailabilityZone": {
                        "Name": "ap-northeast-2c"
                    }
                },
                {
                    "SubnetIdentifier": "subnet-ddddddd",
                    "SubnetAvailabilityZone": {
                        "Name": "ap-northeast-2b"
                    }
                }
            ],
            "ARN": "arn:aws:elasticache:ap-northeast-2:xxxxxxx:subnetgroup:default"
        }
    ]
}

Would you like to implement a fix?

No response

@posquit0 posquit0 added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Oct 23, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/elasticache Issues and PRs that pertain to the elasticache service. service/vpc Issues and PRs that pertain to the vpc service. labels Oct 23, 2022
@ewbankkit ewbankkit removed needs-triage Waiting for first response or review from a maintainer. service/vpc Issues and PRs that pertain to the vpc service. labels Oct 24, 2022
@github-actions github-actions bot added this to the v5.38.0 milestone Feb 20, 2024
Copy link

This functionality has been released in v5.38.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!

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 Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticache Issues and PRs that pertain to the elasticache service.
Projects
None yet
2 participants