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

Unable to update compute environments that have associated job queues #9

Closed
flowinh2o opened this issue Nov 17, 2022 · 5 comments
Closed

Comments

@flowinh2o
Copy link

Description

When trying to update a compute environment that has an associated queue I am getting the following error:

Error: error deleting Batch Compute Environment (ec2_spot-20221103182652341500000006): : Cannot delete, found existing JobQueue relationship

As a workaround I am having to to a destroy and then re-apply.

Versions

  • Module version: 1.2.0
  • Terraform version: 1.1.7
  • Terragrunt version v0.36.7
  • Provider version(s): 1.1.7

Reproduction Code [Required]

I am running this in terragrunt but the inputs to terraform are similar to this

inputs = {

  instance_iam_role_name = "INSTANCE_ROLE"
  service_iam_role_name  = "SERVICE_ROLE"


  compute_environments = {
    a_ec2_spot = {
      name_prefix = "test"

      compute_resources = {
        type                = "SPOT"
        allocation_strategy = "BEST_FIT_PROGRESSIVE"
        min_vcpus      = 0
        max_vcpus      = 512
        desired_vcpus  = 0
        instance_types = ["c5.large", "c6i.large", "c5.xlarge", "c6i.xlarge", "m5.large", "m6i.large", "m5.xlarge", "m6i.xlarge", "r5.large", "r6i.large", "r5.xlarge", "r6i.xlarge"]

        security_group_ids = ["${dependency.security_group.outputs.security_group_id}"]
        subnets            = dependency.vpc.outputs.private_subnets
      }
    }
  }

  job_queues = {
    test = {
      name     = "test"
      state    = "ENABLED"
      priority = 0
    }

  }


  job_definitions = {

    test = {
      name                  = "test"
      propagate_tags        = true
      platform_capabilities = ["EC2"]
      priority              = 1

      container_properties = jsonencode({
        command = ["ls", "-la"]
        image   = "SOME_ECR_IMAGE"
        resourceRequirements = [
          { type = "VCPU", value = "4" },
          { type = "MEMORY", value = "1024" }
        ]
        jobRoleArn = dependency.role_job.outputs.iam_role_arn
      })

      attempt_duration_seconds = 900
      retry_strategy = {
        attempts = 5
        evaluate_on_exit = {
          retry_error = {
            action           = "RETRY"
            on_status_reason = "Host EC2*"
          }
          exit_success = {
            action    = "EXIT"
            on_reason = "*"
          }
        }
      }
    }
  }
}
@bryantbiggs
Copy link
Member

Reference: hashicorp/terraform-provider-aws#13221

@mrdrprofuroboros
Copy link

@github-actions
Copy link

github-actions bot commented Feb 3, 2023

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Feb 3, 2023
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants