@@ -117,7 +117,7 @@ func resourceEBSSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta
117117 conn := meta .(* conns.AWSClient ).EC2Client (ctx )
118118
119119 volumeID := d .Get ("volume_id" ).(string )
120- input := & ec2.CreateSnapshotInput {
120+ input := ec2.CreateSnapshotInput {
121121 TagSpecifications : getTagSpecificationsIn (ctx , awstypes .ResourceTypeSnapshot ),
122122 VolumeId : aws .String (volumeID ),
123123 }
@@ -132,7 +132,7 @@ func resourceEBSSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta
132132
133133 outputRaw , err := tfresource .RetryWhenAWSErrMessageContains (ctx , 1 * time .Minute ,
134134 func () (interface {}, error ) {
135- return conn .CreateSnapshot (ctx , input )
135+ return conn .CreateSnapshot (ctx , & input )
136136 },
137137 errCodeSnapshotCreationPerVolumeRateExceeded , "The maximum per volume CreateSnapshot request rate has been exceeded" )
138138
@@ -156,10 +156,11 @@ func resourceEBSSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta
156156 }
157157
158158 if v , ok := d .GetOk ("storage_tier" ); ok && v .(string ) == string (awstypes .TargetStorageTierArchive ) {
159- _ , err = conn . ModifySnapshotTier ( ctx , & ec2.ModifySnapshotTierInput {
159+ input := ec2.ModifySnapshotTierInput {
160160 SnapshotId : aws .String (d .Id ()),
161161 StorageTier : awstypes .TargetStorageTier (v .(string )),
162- })
162+ }
163+ _ , err = conn .ModifySnapshotTier (ctx , & input )
163164
164165 if err != nil {
165166 return sdkdiag .AppendErrorf (diags , "updating EBS Snapshot (%s) Storage Tier: %s" , d .Id (), err )
@@ -218,10 +219,11 @@ func resourceEBSSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta
218219
219220 if d .HasChange ("storage_tier" ) {
220221 if tier := d .Get ("storage_tier" ).(string ); tier == string (awstypes .TargetStorageTierArchive ) {
221- _ , err := conn . ModifySnapshotTier ( ctx , & ec2.ModifySnapshotTierInput {
222+ input := ec2.ModifySnapshotTierInput {
222223 SnapshotId : aws .String (d .Id ()),
223224 StorageTier : awstypes .TargetStorageTier (tier ),
224- })
225+ }
226+ _ , err := conn .ModifySnapshotTier (ctx , & input )
225227
226228 if err != nil {
227229 return sdkdiag .AppendErrorf (diags , "updating EBS Snapshot (%s) Storage Tier: %s" , d .Id (), err )
@@ -231,7 +233,7 @@ func resourceEBSSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta
231233 return sdkdiag .AppendErrorf (diags , "waiting for EBS Snapshot (%s) Storage Tier archive: %s" , d .Id (), err )
232234 }
233235 } else {
234- input := & ec2.RestoreSnapshotTierInput {
236+ input := ec2.RestoreSnapshotTierInput {
235237 SnapshotId : aws .String (d .Id ()),
236238 }
237239
@@ -244,7 +246,7 @@ func resourceEBSSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta
244246 }
245247
246248 //Skipping waiter as restoring a snapshot takes 24-72 hours so state will reamin (https://aws.amazon.com/blogs/aws/new-amazon-ebs-snapshots-archive/)
247- _ , err := conn .RestoreSnapshotTier (ctx , input )
249+ _ , err := conn .RestoreSnapshotTier (ctx , & input )
248250
249251 if err != nil {
250252 return sdkdiag .AppendErrorf (diags , "restoring EBS Snapshot (%s): %s" , d .Id (), err )
0 commit comments