-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes output in CLI to unify returned ID's from providers in Cloud …
…ID. Provides ability to provider ARN as well adds ARN flag in CLI. Adds AWS Cloud Provider testing for provisioning in cucumber tests and also refactors code accordingly. Adds AWS client to delete certificate after certificate is provisioned afterward
- Loading branch information
1 parent
38f28d3
commit ab03020
Showing
16 changed files
with
175 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'aws-sdk-acm' | ||
|
||
# Initialize the Certificate Manager Client | ||
def create_aws_certificate_manager_client | ||
Aws::ACM::Client.new( | ||
region: ENV['AWS_REGION'], | ||
access_key_id: ENV['AWS_ACCESS_KEY_ID'], | ||
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] | ||
) | ||
end | ||
|
||
# Delete a certificate | ||
def delete_acm_certificate(client, certificate_arn) | ||
begin | ||
client.delete_certificate({ certificate_arn: certificate_arn }) | ||
puts "Certificate with ARN #{certificate_arn} deleted successfully." | ||
rescue Aws::ACM::Errors::ServiceError => e | ||
puts "Error deleting certificate: #{e.message}" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.