-
Notifications
You must be signed in to change notification settings - Fork 115
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
Enable setting a description for EBS Volume Snapshots #471
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,9 @@ type BlockDevice struct { | |
// Create a Snapshot of this Volume. | ||
SnapshotVolume bool `mapstructure:"snapshot_volume" required:"false"` | ||
|
||
// The description for the snapshot. | ||
SnapshotDescription string `mapstructure:"snapshot_description" required:"false"` | ||
|
||
Comment on lines
+30
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I chose to add this here instead of |
||
awscommon.SnapshotConfig `mapstructure:",squash"` | ||
} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to delve a bit into the code for understanding it better, but I believe we should add a check that if
snapshot_description
is set,snapshot_volume
must betrue
, and error if that's not the case.Probably the kind of thing to do in the
Prepare
function for the builder.Alternatively if you don't want to error, maybe at least warn that it'll be ignored as no snapshot will be created for the block device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've implemented something and the output looks like this:
This only shows up if
snapshot_description
is set butsnapshot_volume
is not (or is set to false).Do I need to do something to cause the code line to be printed here? The line number is also not quite correct, it's the line number of the
source
definition.