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

instance script execution resource and ecloud credentials data source added #69

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

PCloughster
Copy link
Contributor

Added code and testing to allow the users to execute scripts on ecloud instances in terraform and retrieve instance credentials.

Copy link
Member

@0x4c6565 0x4c6565 left a comment

Choose a reason for hiding this comment

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

A few suggestions, but other than that LGTM


credentials, err := service.GetInstanceCredentials(d.Get("instance_id").(string), params)
if err != nil {
return diag.Errorf("Error retrieving active instances: %s", err)
Copy link
Member

Choose a reason for hiding this comment

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

active instances in error should be instance credentials

}

if len(credentials) < 1 {
return diag.Errorf("No instances found with provided arguments")
Copy link
Member

Choose a reason for hiding this comment

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

instances in error should be credentials

}

if len(credentials) > 1 {
return diag.Errorf("More than 1 instance found with provided arguments")
Copy link
Member

Choose a reason for hiding this comment

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

instance in error should be credential

@PCloughster PCloughster merged commit 45c47e3 into master Aug 1, 2024
@PCloughster PCloughster deleted the 33419-Guest-Script-and-instance-creds branch August 1, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants