hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.86k stars 9.21k forks source link

Implementation of the new aws_servicecatalogappregistry_application is not working as expected #36697

Closed kevindesao closed 7 months ago

kevindesao commented 8 months ago

Hello, I was really excited to try this out but it turns out I'm not able to make it work smoothly.

The creation of the resource worked fine but the implementation of the ARN as a tag fails to link the resource to the app.

The doc is mentioning the following:

resource "aws_servicecatalogappregistry_application" "example" {
  name = "example-app"
}

resource "aws_s3_bucket" "bucket" {
  bucket = "example-bucket"

  tags = {
    awsApplication = aws_servicecatalogappregistry_application.example.arn
  }
}

But by looking into the created myApp in the console the tags is not simply the ARN of the myApplication resources.

Tag Value tried unsuccessfully:

So to resume, I think a new attribute is required (and the doc updated):

SOLUTION: In the meantime the ARN can be reconstructed like this: (Tested)

  common_tags = {
    awsApplication = "arn:aws:resource-groups:${data.aws_region.myApplication.name}:${data.aws_caller_identity.myApplication.id}:group/${aws_servicecatalogappregistry_application.this.name}/${aws_servicecatalogappregistry_application.this.id}"
  }

Originally posted by @kevindesao in https://github.com/hashicorp/terraform-provider-aws/issues/36277#issuecomment-2033148058

github-actions[bot] commented 8 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

jar-b commented 7 months ago

This was addressed by #36647, which added the application_tag attribute and will be released in v5.44.0 later this week.

jar-b commented 7 months ago

Closed by #36647

github-actions[bot] commented 7 months ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] commented 7 months ago

This functionality has been released in v5.44.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[bot] commented 6 months ago

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.