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

[Bug]: aws_batch_job_queue generateConfigForImport throw error Missing Attribute Configuration #38481

Open
canle1404 opened this issue Jul 23, 2024 · 1 comment
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service.

Comments

@canle1404
Copy link

canle1404 commented Jul 23, 2024

Terraform Core Version

1.9.2

AWS Provider Version

5.59.0

Affected Resource(s)

aws_batch_job_queue

Expected Behavior

Generate attributes of imported resource successfully

Actual Behavior

│ Error: Missing Attribute Configuration
│ 
│   with aws_batch_job_queue.job-queue,
│   on generated_resources.tf line 1:
│   (source code not available)
│ 
│ Exactly one of these attributes must be configured:
│ [compute_environments,compute_environment_order]

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Default CDKTF setup

Steps to Reproduce

CDKTF Code:

import { Construct } from "constructs";
import { App, S3Backend, TerraformStack } from "cdktf";
import { AwsProvider } from "@cdktf/provider-aws/lib/provider";
import { BatchJobQueue } from "@cdktf/provider-aws/lib/batch-job-queue";

class Stack extends TerraformStack {
  constructor(scope: Construct, id: string) {
    super(scope, id);
    new AwsProvider(this, "aws", {
      region: "us-east-2",
    });

    new S3Backend(this, {
      bucket: "XXXXXXXXXXXXXXXXX-terraform-state",
      key: "terraform.tfstate",
      region: "us-east-2",
      dynamodbTable: "terraform-lock",
    });

    BatchJobQueue.generateConfigForImport(
      this,
      "job-queue",
      "arn:aws:batch:us-east-2:XXXXXXXXX:job-queue/job-queue-asdfasdfasdf",
    );
  }
}

const app = new App();
new Stack(app, "stack");
app.synth();

Then run cdktf diff

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@canle1404 canle1404 added the bug Addresses a defect in current functionality. label Jul 23, 2024
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.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 23, 2024
@justinretzolk justinretzolk added service/batch Issues and PRs that pertain to the batch service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service.
Projects
None yet
Development

No branches or pull requests

2 participants