driftctl/pkg/resource/aws/aws_iam_role_policy_attachm...

16 lines
649 B
Go
Raw Normal View History

package aws
2021-08-09 15:15:35 +00:00
import "github.com/cloudskiff/driftctl/pkg/resource"
const AwsIamRolePolicyAttachmentResourceType = "aws_iam_role_policy_attachment"
2021-08-09 15:15:35 +00:00
func initAwsIamRolePolicyAttachmentMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
resourceSchemaRepository.SetResolveReadAttributesFunc(AwsIamRolePolicyAttachmentResourceType, func(res *resource.Resource) map[string]string {
return map[string]string{
"role": *res.Attributes().GetString("role"),
"policy_arn": *res.Attributes().GetString("policy_arn"),
}
})
2021-09-17 15:16:06 +00:00
resourceSchemaRepository.SetFlags(AwsIamRolePolicyAttachmentResourceType, resource.FlagDeepMode)
2021-08-09 15:15:35 +00:00
}