Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement ec2_instance_connect_endpoint #1358

Conversation

josegonzalez
Copy link

Description of your changes

This pull request implements the ec2_instance_connect_endpoint resource, allowing folks to setup EC2 Instance Connect against a given subnet. This allows for remote instance access without exposing any resources publicly or having a bastion.

https://aws.amazon.com/blogs/compute/secure-connectivity-from-public-to-private-introducing-ec2-instance-connect-endpoint-june-13-2023/

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

I haven't tested this PR yet, wanted to know if the automated testing would pick this up or maybe get some help from folks to figure out how to get this running/tested. I'll reach out via slack tomorrow for help on the latter :)

@mbbush
Copy link
Collaborator

mbbush commented Jun 13, 2024

/test-examples="examples/ec2/v1beta1/instanceconnectendpoint.yaml"

@mbbush
Copy link
Collaborator

mbbush commented Jun 13, 2024

Thanks for the PR @josegonzalez!

I kicked off the testing pipelines for you, and I can take a more detailed look tomorrow.

@josegonzalez
Copy link
Author

@mbbush is there an easy way to see what exactly failed? There's thousands of lines of output in the logs and its not clear what I can fix :)

@mbbush
Copy link
Collaborator

mbbush commented Jun 15, 2024

From the artifacts section of https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/9493572569, download the control plane dump, and look at the logs for the provider-aws-ec2 pod in the upbound-system namespace. Here it is

==== START logs for container package-runtime of pod upbound-system/provider-aws-ec2-provider-aws-d5ddccd65-fzwm2 ====
2024-06-13T04:40:25Z	DEBUG	provider-aws	Starting	{"sync-interval": "1h0m0s", "poll-interval": "10m0s", "poll-jitter": "30s", "max-reconcile-rate": 100}
panic: resource "aws_ec2_instance_connect_endpoint" is configured to be reconciled with Terraform Plugin SDKbut either config.Provider.TerraformProvider is not configured or the Go schema does not exist for the resource

goroutine 1 [running]:
github.com/crossplane/upjet/pkg/config.NewProvider({0xc004df2000?, 0xc00170d1e8?, 0x0?}, {0x16926652, 0x3}, {0x16a8f959, 0x1f}, {0x2420e4e0, 0x54ff55, 0x54ff55}, ...)
	github.com/crossplane/[email protected]/pkg/config/provider.go:346 +0xe1c
github.com/upbound/provider-aws/config.GetProvider({0x19731f80?, 0x24dd1800?}, 0x0)
	github.com/upbound/provider-aws/config/registry.go:96 +0xa2b
main.main()
	github.com/upbound/provider-aws/cmd/provider/ec2/zz_main.go:159 +0x2e85
==== END logs for container package-runtime of pod upbound-system/provider-aws-ec2-provider-aws-d5ddccd65-fzwm2 ====

This probably means that the resource you're implementing uses the terraform plugin framework, not the terraform sdk. There's a separate map to add it to at the top of externalname.go

@turkenf
Copy link
Collaborator

turkenf commented Jun 24, 2024

Hi @josegonzalez,

Thank you for your effort in this PR, as @mbbush said, this is a Framework Resource, you should move the external name configuration under TerraformPluginFrameworkExternalNameConfigs.

@josegonzalez
Copy link
Author

Sounds good! I'll get to that on thursday when I'm back at work :)

Copy link

This provider repo does not have enough maintainers to address every pull request. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Sep 24, 2024
Copy link

github-actions bot commented Oct 9, 2024

This pull request is being closed since there has been no activity for 14 days since marking it as stale. If you're still working on this, feel free to reopen the PR or create a new one!

@github-actions github-actions bot closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants