aws: kms resources - gofmt all the code

This commit is contained in:
Radek Simko 2015-11-14 20:27:23 +00:00 committed by Radek Simko
parent fd4be284da
commit 5466d69450
2 changed files with 9 additions and 9 deletions

View File

@ -53,7 +53,7 @@ func resourceAwsKmsAliasCreate(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] KMS alias create name: %s, target_key: %s", name, targetKeyId)
req := &kms.CreateAliasInput{
AliasName: aws.String(name),
AliasName: aws.String(name),
TargetKeyId: aws.String(targetKeyId),
}
_, err := conn.CreateAlias(req)
@ -73,7 +73,7 @@ func resourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error {
if err != nil {
return err
}
for _,e := range resp.Aliases {
for _, e := range resp.Aliases {
if name == *e.AliasName {
if err := d.Set("arn", e.AliasArn); err != nil {
return err
@ -108,7 +108,7 @@ func resourceAwsKmsAliasTargetUpdate(conn *kms.KMS, d *schema.ResourceData) erro
log.Printf("[DEBUG] KMS alias: %s, update target: %s", name, targetKeyId)
req := &kms.UpdateAliasInput{
AliasName: aws.String(name),
AliasName: aws.String(name),
TargetKeyId: aws.String(targetKeyId),
}
_, err := conn.UpdateAlias(req)
@ -121,7 +121,7 @@ func resourceAwsKmsAliasDelete(d *schema.ResourceData, meta interface{}) error {
name := d.Get("name").(string)
req := &kms.DeleteAliasInput{
AliasName: aws.String(name),
AliasName: aws.String(name),
}
_, err := conn.DeleteAlias(req)

View File

@ -55,7 +55,7 @@ func resourceAwsKmsKey() *schema.Resource {
Optional: true,
ValidateFunc: func(v interface{}, k string) (ws []string, es []error) {
value := v.(int)
if (value > 30 || value < 7) {
if value > 30 || value < 7 {
es = append(es, fmt.Errorf(
"deletion window must be between 7 and 30 days inclusive"))
}
@ -157,9 +157,9 @@ func resourceAwsKmsKeyPolicyUpdate(conn *kms.KMS, d *schema.ResourceData) error
log.Printf("[DEBUG] KMS key: %s, update policy: %s", keyId, policy)
req := &kms.PutKeyPolicyInput{
KeyId: aws.String(keyId),
Policy: aws.String(policy),
PolicyName: aws.String("default"),
KeyId: aws.String(keyId),
Policy: aws.String(policy),
PolicyName: aws.String("default"),
}
_, err := conn.PutKeyPolicy(req)
return err
@ -170,7 +170,7 @@ func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error {
keyId := d.Get("key_id").(string)
req := &kms.ScheduleKeyDeletionInput{
KeyId: aws.String(keyId),
KeyId: aws.String(keyId),
}
if v, exists := d.GetOk("deletion_window"); exists {
req.PendingWindowInDays = aws.Int64(int64(v.(int)))