middlewares

package
v0.0.0-...-3750d73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsALBListenerTransformer

type AwsALBListenerTransformer struct {
	// contains filtered or unexported fields
}

AwsALBListenerTransformer is a simple middleware to turn all aws_alb_listener resources into aws_lb_listener ones Both types provide the same functionality, but we can't know which one was used to provision cloud resources. So we use aws_lb_listener as the common type.

func NewAwsALBListenerTransformer

func NewAwsALBListenerTransformer(resourceFactory resource.ResourceFactory) AwsALBListenerTransformer

func (AwsALBListenerTransformer) Execute

func (m AwsALBListenerTransformer) Execute(_, resourcesFromState *[]*resource.Resource) error

type AwsALBTransformer

type AwsALBTransformer struct {
	// contains filtered or unexported fields
}

AwsALBTransformer is a simple middleware to turn all aws_alb resources into aws_lb ones Both types provide the same functionality, but we can't know which one was used to provision cloud resources. So we use aws_lb as the common type.

func NewAwsALBTransformer

func NewAwsALBTransformer(resourceFactory resource.ResourceFactory) AwsALBTransformer

func (AwsALBTransformer) Execute

func (m AwsALBTransformer) Execute(_, resourcesFromState *[]*resource.Resource) error

type AwsApiGatewayApiExpander

type AwsApiGatewayApiExpander struct {
	// contains filtered or unexported fields
}

Explodes the body attribute of api gateway apis v1|v2 to dedicated resources as per Terraform documentations (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_rest_api) (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/apigatewayv2_api)

func NewAwsApiGatewayApiExpander

func NewAwsApiGatewayApiExpander(resourceFactory resource.ResourceFactory) AwsApiGatewayApiExpander

func (AwsApiGatewayApiExpander) Execute

func (m AwsApiGatewayApiExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsApiGatewayBasePathMappingReconciler

type AwsApiGatewayBasePathMappingReconciler struct{}

AwsApiGatewayBasePathMappingReconciler is used to reconcile API Gateway base path mapping (v1 and v2) from both remote and state resources because v1|v2 AWS SDK list endpoints return all mappings without distinction.

func NewAwsApiGatewayBasePathMappingReconciler

func NewAwsApiGatewayBasePathMappingReconciler() AwsApiGatewayBasePathMappingReconciler

func (AwsApiGatewayBasePathMappingReconciler) Execute

func (m AwsApiGatewayBasePathMappingReconciler) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsApiGatewayDeploymentExpander

type AwsApiGatewayDeploymentExpander struct {
	// contains filtered or unexported fields
}

Create a aws_api_gateway_stage resource from a aws_api_gateway_deployment resource and ignore the latter resource since we don't support it

func NewAwsApiGatewayDeploymentExpander

func NewAwsApiGatewayDeploymentExpander(resourceFactory resource.ResourceFactory) AwsApiGatewayDeploymentExpander

func (AwsApiGatewayDeploymentExpander) Execute

func (m AwsApiGatewayDeploymentExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type AwsApiGatewayDomainNamesReconciler

type AwsApiGatewayDomainNamesReconciler struct{}

Used to reconcile API Gateway domain names (v1 and v2) from both remote and state resources because v1|v2 AWS SDK list endpoints return all domain names without distinction

func NewAwsApiGatewayDomainNamesReconciler

func NewAwsApiGatewayDomainNamesReconciler() AwsApiGatewayDomainNamesReconciler

func (AwsApiGatewayDomainNamesReconciler) Execute

func (m AwsApiGatewayDomainNamesReconciler) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsApiGatewayResourceExpander

type AwsApiGatewayResourceExpander struct {
	// contains filtered or unexported fields
}

Explodes api gateway default resource found in aws_api_gateway_rest_api.root_resource_id from state resources to dedicated resources

func NewAwsApiGatewayResourceExpander

func NewAwsApiGatewayResourceExpander(resourceFactory resource.ResourceFactory) AwsApiGatewayResourceExpander

func (AwsApiGatewayResourceExpander) Execute

func (m AwsApiGatewayResourceExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type AwsApiGatewayRestApiPolicyExpander

type AwsApiGatewayRestApiPolicyExpander struct {
	// contains filtered or unexported fields
}

Explodes policy found in aws_api_gateway_rest_api.policy from state resources to dedicated resources

func NewAwsApiGatewayRestApiPolicyExpander

func NewAwsApiGatewayRestApiPolicyExpander(resourceFactory resource.ResourceFactory) AwsApiGatewayRestApiPolicyExpander

func (AwsApiGatewayRestApiPolicyExpander) Execute

func (m AwsApiGatewayRestApiPolicyExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type AwsBucketPolicyExpander

type AwsBucketPolicyExpander struct {
	// contains filtered or unexported fields
}

Explodes policy found in aws_s3_bucket.policy from state resources to dedicated resources

func NewAwsBucketPolicyExpander

func NewAwsBucketPolicyExpander(resourceFactory resource.ResourceFactory) AwsBucketPolicyExpander

func (AwsBucketPolicyExpander) Execute

func (m AwsBucketPolicyExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type AwsConsoleApiGatewayGatewayResponse

type AwsConsoleApiGatewayGatewayResponse struct{}

Each API Gateway rest API has by design all the gateway responses available to edit in the console which result in useless noises (e.g. lots of unmanaged resources) by driftctl. This middleware ignores all console responses if not managed by IAC.

func NewAwsConsoleApiGatewayGatewayResponse

func NewAwsConsoleApiGatewayGatewayResponse() AwsConsoleApiGatewayGatewayResponse

func (AwsConsoleApiGatewayGatewayResponse) Execute

func (m AwsConsoleApiGatewayGatewayResponse) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultApiGatewayAccount

type AwsDefaultApiGatewayAccount struct{}

AwsDefaultApiGatewayAccount is a middleware that ignores the default API Gateway account resource in the current region.

func NewAwsDefaultApiGatewayAccount

func NewAwsDefaultApiGatewayAccount() AwsDefaultApiGatewayAccount

func (AwsDefaultApiGatewayAccount) Execute

func (m AwsDefaultApiGatewayAccount) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultInternetGateway

type AwsDefaultInternetGateway struct{}

Each default vpc has an internet gateway attached that should not be seen as unmanaged if not managed by IaC This middleware ignores default internet gateway from unmanaged resources if not managed by IaC

func NewAwsDefaultInternetGateway

func NewAwsDefaultInternetGateway() AwsDefaultInternetGateway

func (AwsDefaultInternetGateway) Execute

func (m AwsDefaultInternetGateway) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultInternetGatewayRoute

type AwsDefaultInternetGatewayRoute struct{}

Each region has a default vpc which has an internet gateway attached and thus the route table of this same vpc has a default route (0.0.0.0/0) that should not be seen as unmanaged if not managed by IaC This middleware ignores the above route from unmanaged resources if not managed by IaC

func NewAwsDefaultInternetGatewayRoute

func NewAwsDefaultInternetGatewayRoute() AwsDefaultInternetGatewayRoute

func (AwsDefaultInternetGatewayRoute) Execute

func (m AwsDefaultInternetGatewayRoute) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultNetworkACL

type AwsDefaultNetworkACL struct{}

Default network ACL should not be shown as unmanaged as they are present by default This middleware ignores default network ACL from unmanaged resources if they are not managed by IaC

func NewAwsDefaultNetworkACL

func NewAwsDefaultNetworkACL() AwsDefaultNetworkACL

func (AwsDefaultNetworkACL) Execute

func (m AwsDefaultNetworkACL) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultNetworkACLRule

type AwsDefaultNetworkACLRule struct{}

Default network acl rules should not be shown as unmanaged as they are present by default This middleware ignores default network acl rules from unmanaged resources if they are not managed by IaC

func NewAwsDefaultNetworkACLRule

func NewAwsDefaultNetworkACLRule() AwsDefaultNetworkACLRule

func (AwsDefaultNetworkACLRule) Execute

func (m AwsDefaultNetworkACLRule) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultRoute

type AwsDefaultRoute struct{}

Default routes should not be shown as unmanaged as they are present by default This middleware ignores default routes from unmanaged resources if they are not managed by IaC

func NewAwsDefaultRoute

func NewAwsDefaultRoute() AwsDefaultRoute

func (AwsDefaultRoute) Execute

func (m AwsDefaultRoute) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultRouteTable

type AwsDefaultRouteTable struct{}

Default route table should not be shown as unmanaged as they are present by default This middleware ignores default route table from unmanaged resources if they are not managed by IaC

func NewAwsDefaultRouteTable

func NewAwsDefaultRouteTable() AwsDefaultRouteTable

func (AwsDefaultRouteTable) Execute

func (m AwsDefaultRouteTable) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultSQSQueuePolicy

type AwsDefaultSQSQueuePolicy struct{}

SQS queues from AWS have a weird behaviour when we fetch them. By default they have a Policy attached with only an ID "arn:aws:sqs:eu-west-3:XXXXXXXXXXXX:foobar/SQSDefaultPolicy" but on fetch the SDK return an empty policy (e.g. policy = ""). We need to ignore those policy from unmanaged resources if they are not managed by IaC.

func NewAwsDefaultSQSQueuePolicy

func NewAwsDefaultSQSQueuePolicy() AwsDefaultSQSQueuePolicy

func (AwsDefaultSQSQueuePolicy) Execute

func (m AwsDefaultSQSQueuePolicy) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultSecurityGroupRule

type AwsDefaultSecurityGroupRule struct{}

Remove default security group rules of the default security group from remote resources

func NewAwsDefaultSecurityGroupRule

func NewAwsDefaultSecurityGroupRule() AwsDefaultSecurityGroupRule

func (AwsDefaultSecurityGroupRule) Execute

func (m AwsDefaultSecurityGroupRule) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultSubnet

type AwsDefaultSubnet struct{}

Default subnet should not be shown as unmanaged as they are present by default This middleware ignores default subnet from unmanaged resources if they are not managed by IaC

func NewAwsDefaultSubnet

func NewAwsDefaultSubnet() AwsDefaultSubnet

func (AwsDefaultSubnet) Execute

func (m AwsDefaultSubnet) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaultVPC

type AwsDefaultVPC struct{}

Default VPC should not be shown as unmanaged as they are present by default This middleware ignores default VPC from unmanaged resources if they are not managed by IaC

func NewAwsDefaultVPC

func NewAwsDefaultVPC() AwsDefaultVPC

func (AwsDefaultVPC) Execute

func (m AwsDefaultVPC) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsDefaults

type AwsDefaults struct{}

AwsDefaults represents service-linked AWS resources When scanning a AWS account, some users may see irrelevant results about default AWS roles or role policies. We ignore these resources by default when strict mode is disabled.

func NewAwsDefaults

func NewAwsDefaults() AwsDefaults

func (AwsDefaults) Execute

func (m AwsDefaults) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsEbsEncryptionByDefaultReconciler

type AwsEbsEncryptionByDefaultReconciler struct {
	// contains filtered or unexported fields
}

AwsEbsEncryptionByDefaultReconciler is a middleware that either creates an 'aws_ebs_encryption_by_default' resource based on its equivalent state one just for the purpose of getting the Terraform custom Id, or removes the resource from our list of remote resources if it is not managed and is disabled.

func NewAwsEbsEncryptionByDefaultReconciler

func NewAwsEbsEncryptionByDefaultReconciler(resourceFactory resource.ResourceFactory) AwsEbsEncryptionByDefaultReconciler

func (AwsEbsEncryptionByDefaultReconciler) Execute

func (m AwsEbsEncryptionByDefaultReconciler) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsInstanceBlockDeviceResourceMapper

type AwsInstanceBlockDeviceResourceMapper struct {
	// contains filtered or unexported fields
}

Remove root_block_device from aws_instance resources and create dedicated aws_ebs_volume resources

func NewAwsInstanceBlockDeviceResourceMapper

func NewAwsInstanceBlockDeviceResourceMapper(resourceFactory resource.ResourceFactory) AwsInstanceBlockDeviceResourceMapper

func (AwsInstanceBlockDeviceResourceMapper) Execute

func (a AwsInstanceBlockDeviceResourceMapper) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsInstanceEIP

type AwsInstanceEIP struct{}

func (AwsInstanceEIP) Execute

func (a AwsInstanceEIP) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsNatGatewayEipAssoc

type AwsNatGatewayEipAssoc struct{}

func NewAwsNatGatewayEipAssoc

func NewAwsNatGatewayEipAssoc() AwsNatGatewayEipAssoc

func (AwsNatGatewayEipAssoc) Execute

func (a AwsNatGatewayEipAssoc) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

When creating a nat gateway, we associate an EIP to the gateway It implies that driftctl read a aws_eip_association resource from remote As we cannot use aws_eip_association in terraform to assign an eip to an aws_nat_gateway we should remove this association to ensure we do not output noise in unmanaged resources

type AwsNetworkACLExpander

type AwsNetworkACLExpander struct {
	// contains filtered or unexported fields
}

This middelware goal is to explode aws_network_acl ingress and egress block into a set of aws_network_acl_rule

func NewAwsNetworkACLExpander

func NewAwsNetworkACLExpander(resourceFactory resource.ResourceFactory) AwsNetworkACLExpander

func (AwsNetworkACLExpander) Execute

func (m AwsNetworkACLExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsRDSClusterInstanceExpander

type AwsRDSClusterInstanceExpander struct {
	// contains filtered or unexported fields
}

AwsRDSClusterInstanceExpander search for cluster instances from state to import corresponding remote db instances. RDS cluster instance does not represent an actual AWS resource, so shouldn't be used for comparison.

func NewRDSClusterInstanceExpander

func NewRDSClusterInstanceExpander(resourceFactory resource.ResourceFactory) AwsRDSClusterInstanceExpander

func (AwsRDSClusterInstanceExpander) Execute

func (m AwsRDSClusterInstanceExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsRoleManagedPolicyExpander

type AwsRoleManagedPolicyExpander struct {
	// contains filtered or unexported fields
}

func NewAwsRoleManagedPolicyExpander

func NewAwsRoleManagedPolicyExpander(resourceFactory resource.ResourceFactory) *AwsRoleManagedPolicyExpander

func (AwsRoleManagedPolicyExpander) Execute

func (a AwsRoleManagedPolicyExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsRouteTableExpander

type AwsRouteTableExpander struct {
	// contains filtered or unexported fields
}

Explodes routes found in aws_default_route_table.route and aws_route_table.route to dedicated resources

func NewAwsRouteTableExpander

func NewAwsRouteTableExpander(alerter alerter.AlerterInterface, resourceFactory resource.ResourceFactory) AwsRouteTableExpander

func (AwsRouteTableExpander) Execute

func (m AwsRouteTableExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsS3BucketPublicAccessBlockReconciler

type AwsS3BucketPublicAccessBlockReconciler struct{}

AwsS3BucketPublicAccessBlockReconciler middleware ignores every s3 bucket public block that is set to the default values (every option set to false) This is used to avoid displaying false positive unmanaged resources. The problem here is that the aws SDK can either return an error `NoSuchPublicAccessBlockConfiguration` while retrieving bucket public block, or a response with all fields set to false (the default)

To reproduce this edgy case you can do that: - Disable this middleware - Go to the folder of the test `TestAcc_Aws_S3Bucket_PublicAccessBlock` : `testdata/acc/aws_s3_bucket_public_access_block` - Apply tf code - Run a scan with the driftignore from the test folder (ignore everything but bucket and public access block)

  • Infra should be in sync (be sure that you have no dangling bucket in your aws test env)

- Create a new unmanaged bucket from the console, with every option from the policy block set to false - Run the scan again

  • One resource should be unmanaged: the bucket (expected behavior)

- Go to the console and update public access block for that bucket - Run the scan again

  • We should now have a new public access block resource unmanaged (expected)

- Now uncheck back all things in the public block you just updated - Run the scan again

  • We still have the public block as unmanaged, this is NOT expected since all values are back to default

This simple middleware is handling that edge case by removing resource that have every attribute set to false from remote. We do not remove it when a resource is found in IaC

func NewAwsS3BucketPublicAccessBlockReconciler

func NewAwsS3BucketPublicAccessBlockReconciler() *AwsS3BucketPublicAccessBlockReconciler

func (AwsS3BucketPublicAccessBlockReconciler) Execute

func (r AwsS3BucketPublicAccessBlockReconciler) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsSNSTopicPolicyExpander

type AwsSNSTopicPolicyExpander struct {
	// contains filtered or unexported fields
}

Explodes policy found in aws_sns_topic from state resources to aws_sns_topic_policy resources

func NewAwsSNSTopicPolicyExpander

func NewAwsSNSTopicPolicyExpander(resourceFactory resource.ResourceFactory, resourceSchemaRepository dctlresource.SchemaRepositoryInterface) AwsSNSTopicPolicyExpander

func (AwsSNSTopicPolicyExpander) Execute

func (m AwsSNSTopicPolicyExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AwsSQSQueuePolicyExpander

type AwsSQSQueuePolicyExpander struct {
	// contains filtered or unexported fields
}

Explodes policy found in aws_sqs_queue.policy from state resources to dedicated resources

func NewAwsSQSQueuePolicyExpander

func NewAwsSQSQueuePolicyExpander(resourceFactory resource.ResourceFactory, resourceSchemaRepository dctlresource.SchemaRepositoryInterface) AwsSQSQueuePolicyExpander

func (AwsSQSQueuePolicyExpander) Execute

func (m AwsSQSQueuePolicyExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type AzurermRouteExpander

type AzurermRouteExpander struct {
	// contains filtered or unexported fields
}

Explodes routes found in azurerm_route_table.route from state resources to dedicated resources

func NewAzurermRouteExpander

func NewAzurermRouteExpander(resourceFactory resource.ResourceFactory) AzurermRouteExpander

func (AzurermRouteExpander) Execute

func (m AzurermRouteExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type AzurermSubnetExpander

type AzurermSubnetExpander struct {
	// contains filtered or unexported fields
}

Explodes subnet found in azurerm_virtual_network.subnet from state resources to dedicated resources

func NewAzurermSubnetExpander

func NewAzurermSubnetExpander(resourceFactory resource.ResourceFactory) AzurermSubnetExpander

func (AzurermSubnetExpander) Execute

func (m AzurermSubnetExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type Chain

type Chain []Middleware

func NewChain

func NewChain(middlewares ...Middleware) Chain

func (Chain) Execute

func (c Chain) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type EipAssociationExpander

type EipAssociationExpander struct {
	// contains filtered or unexported fields
}

func NewEipAssociationExpander

func NewEipAssociationExpander(resourceFactory resource.ResourceFactory) EipAssociationExpander

func (EipAssociationExpander) Execute

func (m EipAssociationExpander) Execute(_, resourcesFromState *[]*resource.Resource) error

type GoogleComputeInstanceGroupManagerReconciler

type GoogleComputeInstanceGroupManagerReconciler struct{}

func NewGoogleComputeInstanceGroupManagerReconciler

func NewGoogleComputeInstanceGroupManagerReconciler() *GoogleComputeInstanceGroupManagerReconciler

NewGoogleComputeInstanceGroupManagerReconciler imports remote instance groups when they're managed by a managed instance group manager. Creating a "google_compute_instance_group_manager" resource via Terraform leads to having several unmanaged instance groups. This middleware adds remote instance groups to the state by matching them with managed instance group managers.

func (GoogleComputeInstanceGroupManagerReconciler) Execute

func (a GoogleComputeInstanceGroupManagerReconciler) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type GoogleDefaultIAMMember

type GoogleDefaultIAMMember struct{}

Some service accounts are created by default when activating APIs, this middleware will filter them unless they are managed.

func NewGoogleDefaultIAMMember

func NewGoogleDefaultIAMMember() *GoogleDefaultIAMMember

func (*GoogleDefaultIAMMember) Execute

func (m *GoogleDefaultIAMMember) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type GoogleIAMBindingTransformer

type GoogleIAMBindingTransformer struct {
	// contains filtered or unexported fields
}

GoogleIAMBindingTransformer Transforms Bucket IAM binding in bucket iam member to ease comparison.

func NewGoogleIAMBindingTransformer

func NewGoogleIAMBindingTransformer(resourceFactory resource.ResourceFactory) *GoogleIAMBindingTransformer

func (*GoogleIAMBindingTransformer) Execute

func (m *GoogleIAMBindingTransformer) Execute(_, resourcesFromState *[]*resource.Resource) error

type GoogleLegacyBucketIAMMember

type GoogleLegacyBucketIAMMember struct{}

Creating buckets add legacy role bindings, this middleware will filter them unless they are managed.

func NewGoogleLegacyBucketIAMMember

func NewGoogleLegacyBucketIAMMember() *GoogleLegacyBucketIAMMember

func (*GoogleLegacyBucketIAMMember) Execute

func (m *GoogleLegacyBucketIAMMember) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type GoogleStorageBucketIAMPolicyTransformer

type GoogleStorageBucketIAMPolicyTransformer struct {
	// contains filtered or unexported fields
}

GoogleStorageBucketIAMPolicyTransformer Transforms Bucket IAM policy in bucket iam binding to ease comparison.

func NewGoogleIAMPolicyTransformer

func NewGoogleIAMPolicyTransformer(resourceFactory resource.ResourceFactory) *GoogleStorageBucketIAMPolicyTransformer

func (*GoogleStorageBucketIAMPolicyTransformer) Execute

func (m *GoogleStorageBucketIAMPolicyTransformer) Execute(_, resourcesFromState *[]*resource.Resource) error

type IamPolicyAttachmentExpander

type IamPolicyAttachmentExpander struct {
	// contains filtered or unexported fields
}

Split Policy attachment when there is multiple user and groups and generate a repeatable id

func NewIamPolicyAttachmentExpander

func NewIamPolicyAttachmentExpander(resourceFactory resource.ResourceFactory) IamPolicyAttachmentExpander

func (IamPolicyAttachmentExpander) Execute

func (m IamPolicyAttachmentExpander) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type IamPolicyAttachmentTransformer

type IamPolicyAttachmentTransformer struct {
	// contains filtered or unexported fields
}

func NewIamPolicyAttachmentTransformer

func NewIamPolicyAttachmentTransformer(resourceFactory resource.ResourceFactory) IamPolicyAttachmentTransformer

func (IamPolicyAttachmentTransformer) Execute

func (m IamPolicyAttachmentTransformer) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type Middleware

type Middleware interface {
	Execute(remoteResources, resourcesFromState *[]*resource.Resource) error
}

type OpenAPIAwsExtensions

type OpenAPIAwsExtensions struct {
	GatewayResponses map[string]interface{} `json:"x-amazon-apigateway-gateway-responses"`
}

type OpenAPIAwsMethodExtensions

type OpenAPIAwsMethodExtensions struct {
	Integration map[string]interface{} `json:"x-amazon-apigateway-integration"`
}

type Route53DefaultZoneRecordSanitizer

type Route53DefaultZoneRecordSanitizer struct{}

Remote NS and SAO records from remote state if not managed by IAC

func NewRoute53DefaultZoneRecordSanitizer

func NewRoute53DefaultZoneRecordSanitizer() Route53DefaultZoneRecordSanitizer

func (Route53DefaultZoneRecordSanitizer) Execute

func (m Route53DefaultZoneRecordSanitizer) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type Route53RecordIDReconcilier

type Route53RecordIDReconcilier struct{}

Since AWS returns the FQDN as the name of the remote record, we must change the Id of the state record to be equivalent (ZoneId_FQDN_Type_SetIdentifier) For a TXT record toto for zone example.com with Id 1234 From AWS provider, we retrieve: 1234_toto.example.com_TXT From Terraform state, we retrieve: 1234_toto_TXT

func NewRoute53RecordIDReconcilier

func NewRoute53RecordIDReconcilier() Route53RecordIDReconcilier

func (Route53RecordIDReconcilier) Execute

func (m Route53RecordIDReconcilier) Execute(_, resourcesFromState *[]*resource.Resource) error

type S3BucketAcl

type S3BucketAcl struct{}

Remove grant field on remote resources when acl field != private in state

func NewS3BucketAcl

func NewS3BucketAcl() S3BucketAcl

func (S3BucketAcl) Execute

func (m S3BucketAcl) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type TagsAllManager

type TagsAllManager struct{}

Manage tags_all attribute on each compatible resources

func NewTagsAllManager

func NewTagsAllManager() TagsAllManager

func (TagsAllManager) Execute

func (a TagsAllManager) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type VPCDefaultSecurityGroupSanitizer

type VPCDefaultSecurityGroupSanitizer struct{}

Remove default security group from remote resources

func NewVPCDefaultSecurityGroupSanitizer

func NewVPCDefaultSecurityGroupSanitizer() VPCDefaultSecurityGroupSanitizer

func (VPCDefaultSecurityGroupSanitizer) Execute

func (m VPCDefaultSecurityGroupSanitizer) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

type VPCSecurityGroupRuleSanitizer

type VPCSecurityGroupRuleSanitizer struct {
	// contains filtered or unexported fields
}

Split security group rule if it needs to given its attributes

func NewVPCSecurityGroupRuleSanitizer

func NewVPCSecurityGroupRuleSanitizer(resourceFactory resource.ResourceFactory) VPCSecurityGroupRuleSanitizer

func (VPCSecurityGroupRuleSanitizer) Execute

func (m VPCSecurityGroupRuleSanitizer) Execute(remoteResources, resourcesFromState *[]*resource.Resource) error

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL