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

ElastiCache cluster does not document ARN output field #15267

Closed
kalyansundar opened this issue Sep 22, 2020 · 5 comments · Fixed by #15348
Closed

ElastiCache cluster does not document ARN output field #15267

kalyansundar opened this issue Sep 22, 2020 · 5 comments · Fixed by #15348
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues.

Comments

@kalyansundar
Copy link

kalyansundar commented Sep 22, 2020

HI,
I uable to get a elastic cache arn value after created the resource. Could you please give some suggestion to get that value ?

I have tried with data and output blocks, and using the pycharm with terraform support plugin

@kalyansundar kalyansundar added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 22, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 22, 2020
@gdavison gdavison changed the title unable to get elasticache arn value since created resource ElastiCache cluster does not document ARN output field Sep 22, 2020
@gdavison
Copy link
Contributor

Hi @kalyansundar. Unfortunately, the field is not in the documentation.

The field is named arn, so to access the ARN of the following ElastiCache cluster

resource "aws_elasticache_cluster" "example" {
    ...
}

use aws_elasticache_cluster.example.arn.

@gdavison gdavison added documentation Introduces or discusses updates to documentation. bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. and removed enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Sep 22, 2020
@kalyansundar
Copy link
Author

hi @gdavison I am getting the following error message

Step-1

Actual my code is given below

resource "aws_elasticache_replication_group" "default" {
  for_each = { for item in var.replication_groups : item.name => item }

  replication_group_id          = each.value.name
......

locals {
 arn = [for replication_group in aws_elasticache_replication_group.default : (replication_group.arn)]
 }

switched into terraform console
Enter this command on terraform console **local.arn**

Error: Unsupported attribute

 arn = [for replication_group in aws_elasticache_replication_group.default : (replication_group.arn)]
This object does not have an attribute named "arn".

Step-2

And then i have tried by general way
code

resource "aws_elasticache_replication_group" "default" {
  replication_group_id = "testing4"
  replication_group_description = "testing4-desc"
  number_cache_clusters = 2
  node_type = "cache.t3.micro"
  engine_version = "5.0.5"
  subnet_group_name = "redis-subnet-qa-group"
  security_group_ids = ["ffffffff",]
  maintenance_window = "sun:02:00-sun:04:00"
  apply_immediately  = true

  # Options we mandate
  automatic_failover_enabled = true
  auto_minor_version_upgrade = true
  engine                     = "redis"
  at_rest_encryption_enabled = true
  port                       = 6379



}

output "test" {
  value = aws_elasticache_replication_group.default.arn
}

Error: Unsupported attribute

  on main.tf line 168, in output "test":
 168:   value = aws_elasticache_replication_group.default.arn

This object has no argument, nested block, or exported attribute named "arn".


@angelabad
Copy link
Contributor

Hi, @gdavison is talking about aws_elasticache_cluster and @kalyansundar about aws_elasticache_replication_group. So,

  • aws_elasticache_cluster: hasnt arn documented
  • aws_elasticache_replication_group: hasnt arn attribute in go code

I will try to fix this in next days.

Bye!

@angelabad
Copy link
Contributor

Hi, @bflad or @gdavison , could you review this?

Thanks!

@ghost
Copy link

ghost commented Feb 15, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants