driftctl/pkg/resource/aws/aws_key_pair.go

41 lines
1.2 KiB
Go
Raw Normal View History

// GENERATED, DO NOT EDIT THIS FILE
package aws
2021-05-07 15:47:53 +00:00
import (
"github.com/cloudskiff/driftctl/pkg/resource"
"github.com/zclconf/go-cty/cty"
)
2021-03-25 11:13:52 +00:00
const AwsKeyPairResourceType = "aws_key_pair"
type AwsKeyPair struct {
Arn *string `cty:"arn" computed:"true"`
Fingerprint *string `cty:"fingerprint" computed:"true"`
Id string `cty:"id" computed:"true"`
KeyName *string `cty:"key_name" computed:"true"`
KeyNamePrefix *string `cty:"key_name_prefix" diff:"-"`
KeyPairId *string `cty:"key_pair_id" computed:"true"`
PublicKey *string `cty:"public_key" diff:"-"`
Tags map[string]string `cty:"tags"`
2021-03-25 11:13:52 +00:00
CtyVal *cty.Value `diff:"-"`
}
func (r *AwsKeyPair) TerraformId() string {
return r.Id
}
func (r *AwsKeyPair) TerraformType() string {
return AwsKeyPairResourceType
}
2021-03-25 11:13:52 +00:00
func (r *AwsKeyPair) CtyValue() *cty.Value {
return r.CtyVal
}
2021-05-07 15:47:53 +00:00
func initAwsKeyPairMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
resourceSchemaRepository.SetNormalizeFunc(AwsKeyPairResourceType, func(val *resource.Attributes) {
val.SafeDelete([]string{"key_name_prefix"})
val.SafeDelete([]string{"public_key"})
})
}