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.74k stars 9.1k forks source link

[Bug]: aws_pipes_pipe -- `basic_auth` should not be required for `self_managed_kafka_parameters.credentials` #35891

Closed erlandsen-tech closed 2 weeks ago

erlandsen-tech commented 6 months ago

Terraform Core Version

1.7.3

AWS Provider Version

5.7.0

Affected Resource(s)

Event pipes pipe

Expected Behavior

Should have basic_auth as optional

Actual Behavior

Does not have basic auth as optional, but rather required, which causes issues if you use sasl encrypted secrets.

Relevant Error/Panic Output Snippet

╷
│ Error: Missing required argument
│ 
│   on event_bridge/main.tf line 22, in resource "aws_pipes_pipe" "public_party":
│   22:       credentials {
│ 
│ The argument "basic_auth" is required, but no definition was found.

Terraform Configuration Files

resource "aws_pipes_pipe" "public_party" {
  name     = "${var.environment_prefix}-public-party-individual-${var.region}"
  role_arn = aws_iam_role.role_for_event_pipes.arn
  source   = "smk://${var.kafka_bootstrap_servers[0]}"
  source_parameters {
    self_managed_kafka_parameters {
      topic_name                   = "some.topic.no"
      additional_bootstrap_servers = [var.kafka_bootstrap_servers[1], var.kafka_bootstrap_servers[2]]
      batch_size                   = 1
      starting_position            = "TRIM_HORIZON"
      credentials {
        sasl_scram_512_auth = var.kafka_secret_public_party_individual
      }
      vpc {
        security_groups = [var.dummy_security_group_id]
        # This  could be done with a for loop, but the linter does not like it, and makes red squiglies. It's annoying.
        subnets = [var.private_subnets[0].subnet_id, var.private_subnets[1].subnet_id, var.private_subnets[2].subnet_id]
      }
    }
  }

Steps to Reproduce

Create event pipes pipe without basic_auth

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

https://github.com/hashicorp/terraform-provider-aws/pull/34293

I found this that fixes this issue, but has been open since november 2023. Maybe just merge it?

Would you like to implement a fix?

None

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

LetsGetStartedWithBub commented 1 month ago

Hi @justinretzolk ,I am interested in working on this issue. Could you please assign it to me?

erlandsen-tech commented 2 weeks ago

The issue is already fixed in another MR already. This is a duplicate. :)

Hi @justinretzolk ,I am interested in working on this issue. Could you please assign it to me?

github-actions[bot] commented 2 weeks 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.