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

Failed to destory resource awscc_logs_log_stream #986

Closed
naveen-amzn opened this issue Jun 12, 2023 · 2 comments · Fixed by #1015
Closed

Failed to destory resource awscc_logs_log_stream #986

naveen-amzn opened this issue Jun 12, 2023 · 2 comments · Fixed by #1015
Labels
upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.

Comments

@naveen-amzn
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.2.9
on darwin_arm64

  • provider registry.terraform.io/hashicorp/awscc v0.53.0

Your version of Terraform is out of date! The latest version
is 1.4.6. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • awscc_logs_log_stream

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
resource "awscc_logs_log_group" "this" {
  log_group_name    = "SampleLogGroup"
  retention_in_days = 90
  tags = [
    {
      key   = "Name"
      value = "SampleLogGroup"
    },
    {
      key   = "Environment"
      value = "Development"
    },
    {
      key   = "Modified By"
      value = "AWSCC"
    }
  ]
}

resource "awscc_logs_log_stream" "this" {
  log_group_name  = awscc_logs_log_group.this.id
  log_stream_name = "SampleStream"
}
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

Expected Behavior

Terraform destroy command should have been executed successfully and delete the resource.

Actual Behavior

Terraform destroy failed with below error

│ Error: Terraform Resource Identifier Not Found
│ 
│   with awscc_logs_log_stream.this,
│   on cloudwatch_log_stream.tf line 20, in resource "awscc_logs_log_stream" "this":
│   20: resource "awscc_logs_log_stream" "this" {
│ 
│ Terraform resource primary identifier not found in State. This is typically an error with the Terraform provider implementation. Original Error: 1 error occurred:
│       * An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│ 
│ Received null value, however the target type cannot handle null values. Use the corresponding `types` package type, a pointer type or a custom type that handles null values.
│ 
│ Path: id
│ Target Type: string
│ Suggested `types` Type: basetypes.StringValue
│ Suggested Pointer Type: *string

Steps to Reproduce

  1. terraform apply
  2. terraform destroy

Important Factoids

References

  • #0000
@kadrach
Copy link
Contributor

kadrach commented Jun 14, 2023

I'm a little confused by this resource (schema). The schema indicates that the resource returns a primary identifier Id - but it does not seem to. Because of the top-level Id the synthetic ID creation is disabled during generation.

"primaryIdentifier": [
"/properties/Id"
],

@kadrach
Copy link
Contributor

kadrach commented Jun 15, 2023

Digging a bit further, this "cached" definition in this repository is not up-to-date (compared to running aws cloudformation describe-type .... In turn, the schema that spits out contains properties not included in the meta-schema. See aws-cloudformation/cloudformation-resource-schema#145.

@ewbankkit ewbankkit added upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency. service/cloudwatchlogs and removed needs-triage labels Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants