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

create self-signed cert and import into ACM #1

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

arcanez
Copy link
Contributor

@arcanez arcanez commented Mar 4, 2024

Any background context you want to provide for reviewers?

What is the focus or goal of the code changes?

create self-signed cert and import into ACM

Where should the reviewer start?

Does this add new dependencies? Is there an installation or build procedure?

openssl and aws binaries (required for this step, optional overall)

How should this be manually tested?

make cert

Screenshots (if applicable)

Optional: What gif best describes this PR or how it makes you feel?

.SILENT: cert
cert:
ACM_ARN=$(shell openssl req -new -x509 -sha256 -nodes -newkey rsa:4096 -keyout /tmp/private_mdai.key -out /tmp/certificate_mdai.crt -subj "/CN=${MDAI_UI_HOSTNAME}" && \
aws acm import-certificate --region ${AWS_REGION} --certificate fileb:///tmp/certificate_mdai.crt --private-key fileb:///tmp/private_mdai.key --output text) ; \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do an error handling here for the case when aws acm import-certificate fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should happen in the event of a failure?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User should see the error, so they would know that certificate was not created successfully and ideally the reason.

@arcanez arcanez merged commit f40abbb into main Mar 6, 2024
1 check passed
@arcanez arcanez deleted the self-signed-cert branch March 6, 2024 00:07
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.

None yet

4 participants