diff --git a/apis/ec2/v1beta1/zz_vpcendpoint_terraformed.go b/apis/ec2/v1beta1/zz_vpcendpoint_terraformed.go index 84cb42d177..90fd341b5c 100755 --- a/apis/ec2/v1beta1/zz_vpcendpoint_terraformed.go +++ b/apis/ec2/v1beta1/zz_vpcendpoint_terraformed.go @@ -118,6 +118,7 @@ func (tr *VPCEndpoint) LateInitialize(attrs []byte) (bool, error) { return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") } opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("SubnetConfiguration")) li := resource.NewGenericLateInitializer(opts...) return li.LateInitialize(&tr.Spec.ForProvider, params) diff --git a/apis/ec2/v1beta2/zz_vpcendpoint_terraformed.go b/apis/ec2/v1beta2/zz_vpcendpoint_terraformed.go index 90091e0619..e0c3c7bbdd 100755 --- a/apis/ec2/v1beta2/zz_vpcendpoint_terraformed.go +++ b/apis/ec2/v1beta2/zz_vpcendpoint_terraformed.go @@ -118,6 +118,7 @@ func (tr *VPCEndpoint) LateInitialize(attrs []byte) (bool, error) { return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") } opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("SubnetConfiguration")) li := resource.NewGenericLateInitializer(opts...) return li.LateInitialize(&tr.Spec.ForProvider, params) diff --git a/config/ec2/config.go b/config/ec2/config.go index ba0b4a2caf..e9c9eae023 100644 --- a/config/ec2/config.go +++ b/config/ec2/config.go @@ -153,6 +153,12 @@ func Configure(p *config.Provider) { //nolint:gocyclo // aws_vpc_endpoint_subnet_association // aws_vpc_endpoint_route_table_association // aws_vpc_endpoint_security_group_association + r.LateInitializer = config.LateInitializer{ + // Conflicts with VPCEndpointSubnetAssociation + IgnoredFields: []string{ + "subnet_configuration", + }, + } config.MoveToStatus(r.TerraformResource, "subnet_ids", "security_group_ids", "route_table_ids") delete(r.References, "vpc_endpoint_type") }) diff --git a/examples/ec2/v1beta1/vpcendpointsubnetassociation.yaml b/examples/ec2/v1beta1/vpcendpointsubnetassociation.yaml index 208c13b041..35c03a2b47 100644 --- a/examples/ec2/v1beta1/vpcendpointsubnetassociation.yaml +++ b/examples/ec2/v1beta1/vpcendpointsubnetassociation.yaml @@ -5,6 +5,8 @@ apiVersion: ec2.aws.upbound.io/v1beta1 kind: VPCEndpointSubnetAssociation metadata: + annotations: + uptest.upbound.io/disable-import: "true" labels: testing.upbound.io/example-name: sn_ec2 name: sn-ec2