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

feat: add aws batch compute and job queue #1489

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sachinmalanki
Copy link

Description of your changes

Adding AWS Batch Compute Environment(aws_batch_compute_environment) and Job Queue(aws_batch_job_queue)

Fixes #

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Manually tested as per the guide
Batch compute environment
image

Job Queue
image

@sachinmalanki
Copy link
Author

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

1 similar comment
@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

1 similar comment
@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

1 similar comment
@sachinmalanki
Copy link
Author

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

@sachinmalanki
Copy link
Author

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

1 similar comment
@turkenf
Copy link
Collaborator

turkenf commented Sep 23, 2024

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Sep 23, 2024

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Sep 24, 2024

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@sachinmalanki
Copy link
Author

sachinmalanki commented Sep 25, 2024

The test fails because of hardcoding securityGroupIds: and subnets: values. Can I know how to fix this? The computeenvironment crd does not allow subnet and securitygroupid reference.

@mergenci
Copy link
Collaborator

@sachinmalanki
Copy link
Author

Thanks for the help @mergenci, I have updated the MR with reference and selector.

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml"

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/computeenvironment.yaml"

Signed-off-by: sachinmalanki <[email protected]>
@jeanduplessis
Copy link
Collaborator

/test-examples="examples/batch/v1beta1/jobqueue.yaml,examples/batch/v1beta1/computeenvironment.yaml"

@sachinmalanki
Copy link
Author

sachinmalanki commented Sep 30, 2024

Looks like computeEnvironment resource fails to delete because of statusReason: 'CLIENT_ERROR - User: batch.amazonaws.com is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::153891904029:role/aws-batch-service-role (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied; Request ID: 3006240f-9511-4141-928e-1dd0258ebb24; Proxy: null)'
I believe this is because the service role is deleted before the MR is deleted.
Similar issue - hashicorp/terraform-provider-aws#8549
Any idea, how to add dependency so computeEnvironment is deleted before the serviceRole?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants