Add remaining VPCLattice resources and related examples - #1874
Conversation
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
Dear maintainers, @turkenf Could you review and trigger the tests for these resources, please?
|
|
/test-examples="examples/vpclattice/cluster/v1beta1/accesslogsubscription.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/authpolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/listenerrule.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkresourceassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkserviceassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkvpcassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkvpcassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkserviceassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkresourceassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/listenerrule.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/authpolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/accesslogsubscription.yaml" |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
@jeanduplessis Thanks for triggering the tests, I've tried a few blind fixes which I couldn't easily test locally myself. Could you please re-trigger them? On some issues I have no idea tbh! Below aren't fixed yet. Any clues?
Are the runs completely isolated or is it possible that duplicate resources in two tests conflict and race against each other? |
|
/test-examples="examples/vpclattice/cluster/v1beta1/accesslogsubscription.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/authpolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/listenerrule.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkresourceassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/listenerrule.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/servicenetworkresourceassociation.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
@turkenf Could you retrigger for the following, please?
Hopefully, this would be the last fix. Unfortunately, I haven't yet set up local testing yet which means I solely rely on CI test for now. I'll set that up before I start with next PRs. |
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/listenerrule.yaml" |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
@jeanduplessis @turkenf I believe 847b8c9 should fix the This leaves only the broken target-group-attachement failure which is beyond any reasoning. Could you have a look at this one, please? https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/18631722158/job/53117376685 I'm hitting a deadline so I might have to just ditch the TargetGroupAttachment in this PR if it's not easily fixable. |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
|
@turkenf I think the pipelines are failing now due to AWS outage in us-east-1 region. https://health.aws.amazon.com/health/status 🤦 |
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
…rkReadWrite Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
|
Hi @mirrajabi I just reviewed the PR and saw the failing tests for two resources. In locally, I have figured out the problems in the example manifests and one reference generation in the TargetGroupAttachment resource. Let me share my findings: The successful example manifests for the ResourcePolicy is here. I changed the Cluster-Scoped: # SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0
apiVersion: vpclattice.aws.upbound.io/v1beta1
kind: ResourcePolicy
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/resourcepolicy
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal":{
"AWS":"arn:aws:iam::153891904029:root"
},
"Action": [
"vpc-lattice:GetServiceNetwork",
"vpc-lattice:CreateServiceNetworkResourceAssociation",
"vpc-lattice:CreateServiceNetworkServiceAssociation",
"vpc-lattice:CreateServiceNetworkVpcAssociation",
"vpc-lattice:CreateServiceNetworkVpcEndpointAssociation"
]
}
]
}
region: us-west-1
resourceArnSelector:
matchLabels:
testing.upbound.io/example-name: example
---
apiVersion: vpclattice.aws.upbound.io/v1beta1
kind: ServiceNetwork
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/resourcepolicy
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
name: example-vpclattice-service-network
region: us-west-1Namespaced: # SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0
apiVersion: vpclattice.aws.m.upbound.io/v1beta1
kind: ResourcePolicy
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/resourcepolicy
labels:
testing.upbound.io/example-name: example
name: example
namespace: upbound-system
spec:
forProvider:
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal":{
"AWS":"arn:aws:iam::153891904029:root"
},
"Action": [
"vpc-lattice:GetServiceNetwork",
"vpc-lattice:CreateServiceNetworkResourceAssociation",
"vpc-lattice:CreateServiceNetworkServiceAssociation",
"vpc-lattice:CreateServiceNetworkVpcAssociation",
"vpc-lattice:CreateServiceNetworkVpcEndpointAssociation"
]
}
]
}
region: us-west-1
resourceArnSelector:
matchLabels:
testing.upbound.io/example-name: example
---
apiVersion: vpclattice.aws.m.upbound.io/v1beta1
kind: ServiceNetwork
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/resourcepolicy
labels:
testing.upbound.io/example-name: example
name: example
namespace: upbound-system
spec:
forProvider:
name: example-vpclattice-service-network
region: us-west-1For TargetGroupAttachment resource, firstly I have a comment about the refernced field In these type of situations, in upjet-based providers, we are removing the reference generation/field since not connecting this field to just a one resource. An example: So here is the correct convention removing the reference from this target.id field and the users directly pass the id of the corresponded resource to target.id field without use of reference. The configuration statement must be like: delete(r.References, "target.id")Let's continue with running example manifest. Since the generated example also refers to this one. If I understand correctly, for TargetGroupAttachment, first we need a So, I tried to make an attachment to a Instance field in my local and it worked: Cluster-Scoped: # SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0
apiVersion: vpclattice.aws.upbound.io/v1beta1
kind: TargetGroupAttachment
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/targetgroupattachment
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
region: us-west-1
target:
id: i-04a354440b0289895 # long-running instance
port: 80
targetGroupIdentifierSelector:
matchLabels:
testing.upbound.io/example-name: example
---
apiVersion: vpclattice.aws.upbound.io/v1beta1
kind: TargetGroup
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/targetgroupattachment
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
config:
port: 443
protocol: HTTPS
vpcIdentifier: vpc-0a388e462a64e3e56 # default VPC
name: example
region: us-west-1
type: INSTANCENamespaced: # SPDX-FileCopyrightText: 2025 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0
apiVersion: vpclattice.aws.m.upbound.io/v1beta1
kind: TargetGroupAttachment
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/targetgroupattachment
labels:
testing.upbound.io/example-name: example
name: example
namespace: upbound-system
spec:
forProvider:
region: us-west-1
target:
id: i-04a354440b0289895 # long-running instance
port: 80
targetGroupIdentifierSelector:
matchLabels:
testing.upbound.io/example-name: example
---
apiVersion: vpclattice.aws.m.upbound.io/v1beta1
kind: TargetGroup
metadata:
annotations:
meta.upbound.io/example-id: vpclattice/v1beta1/targetgroupattachment
labels:
testing.upbound.io/example-name: example
name: example
namespace: upbound-system
spec:
forProvider:
config:
port: 443
protocol: HTTPS
vpcIdentifier: vpc-0a388e462a64e3e56 # default VPC
name: example
region: us-west-1
type: INSTANCEIf there is any unclear point, please ping me. Thanks in advance for considering them. |
Signed-off-by: Mad Mirrajabi <mohammadmirrajabi@gmail.com>
|
Thanks a lot @sergenyalcin for the clear explanation! I've committed your suggestions. |
|
/test-examples="examples/vpclattice/cluster/v1beta1/resourcepolicy.yaml" |
|
/test-examples="examples/vpclattice/cluster/v1beta1/targetgroupattachment.yaml" |
sergenyalcin
left a comment
There was a problem hiding this comment.
@mirrajabi, Thank you very much for your effort on this PR, LGTM!
Description of your changes
This PR adds the missing VPC Lattice resources and examples for each.
I have:
make generateand committed the results (ideally in a separate commit).make check-diff.How has this code been tested
aws_vpclattice_access_log_subscriptionaws_vpclattice_auth_policyaws_vpclattice_service_network_service_associationaws_vpclattice_service_network_vpc_associationaws_vpclattice_listener_ruleaws_vpclattice_resource_policyaws_vpclattice_target_group_attachmentaws_vpclattice_service_network_resource_association