-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add Lightsail load balancer resource #11405
Add Lightsail load balancer resource #11405
Conversation
1d37955
to
26862f2
Compare
I'm not sure how this will close #11403. |
Notification of Recent and Upcoming Changes to ContributionsThank you for this contribution! There have been a few recent development changes that affect this pull request. We apologize for the inconvenience, especially if there have been long review delays up until now. Please note that this is automated message from an unmonitored account. See the FAQ for additional information on the maintainer team and review prioritization. If you are unable to complete these updates, please leave a comment for the community and maintainers so someone can potentially continue the work. The maintainers will encourage other contributors to use the existing contribution as the base for additional changes as appropriate. Otherwise, contributions that do not receive updated code or comments from the original contributor may be closed in the future so the maintainers can focus on active items. For the most up to date information about Terraform AWS Provider development, see the Contributing Guide. Additional technical debt changes can be tracked with the As part of updating a pull request with these changes, the most current unit testing and linting will run. These may report issues that were not previously reported. Terraform 0.12 SyntaxReference: #8950 Version 3 and later of the Terraform AWS Provider, which all existing contributions would potentially be added, only supports Terraform 0.12 and later. Certain syntax elements of Terraform 0.11 and earlier show deprecation warnings during runs with Terraform 0.12. Documentation and test configurations, such as those including deprecated string interpolations ( Action Required: Terraform Plugin SDK Version 2Reference: #14551 The Terraform AWS Provider has been upgraded to the latest version of the Terraform Plugin SDK. Generally, most changes to contributions should only involve updating Go import paths in source code files. Please see the referenced issue for additional information. Action Required: Removal of website/aws.erb FileReference: #14712 Any changes to the Upcoming Change of Git Branch NamingReference: #14292 Development environments will need their upstream Git branch updated from Upcoming Change of GitHub OrganizationReference: #14715 This repository will be migrating from https://github.com/terraform-providers/terraform-provider-aws to https://github.com/hashicorp/terraform-provider-aws. No practitioner or developer action is anticipated and most GitHub functionality will automatically redirect to the new location. Go import paths including |
Hey @akonrath, are you able to finish this pull request? Do you need any help on it? I'd like to move Lightsail resources forward :) |
Hi @ianrodrigues ! Thanks for commenting. Heh, my hope, too, was to get more Lightsail resources going as well! This PR has been sitting for quite some time and I've moved most of my time and effort over to the Azure provider. If you'd like to bring the existing work I put together in this PR back up to speed, you're more than welcome to contribute and I can help out as needed. Thanks! |
Hello @akonrath, I would like to help make the required updates in order to move this pull request forward. Are you able to grant me access to your branch so that i am able to push new commits? |
@akonrath I have opened a pull request to your branch with changes to get this pull request updated with the comments outlined in the comment from TeamTerraform. Please review when you get time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the changes to the aws/resource_aws_lightsail_domain_test.go file from the pull request.
There are merge conflicts and the spelling error has been since resolved in the main branch.
Action Required: Removal of website/aws.erb File
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments to get you started.
also please add a test case for path update.
} | ||
} | ||
|
||
func TestAccAWSLightsailLoadBalancer_disappear(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, this change will be implemented once the following pull request is merged by @akonrath akonrath#96
op := resp.Operations[0] | ||
d.SetId(d.Get("name").(string)) | ||
|
||
stateConf := &resource.StateChangeConf{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this to an internal waiter function? see https://github.com/hashicorp/terraform-provider-aws/tree/main/aws/internal/service/glue for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, this change will be implemented once the following pull request is merged by @akonrath akonrath#96
} | ||
return err | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lb := resp.LoadBalancer
and reuse it for all others instead repeating it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, this change will be implemented once the following pull request is merged by @akonrath akonrath#96
{ | ||
Config: testAccAWSLightsailLoadBalancerConfig_basic(lightsailLoadBalancerName), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
testAccCheckAWSLightsailLoadBalancerExists("aws_lightsail_load_balancer.lightsail_load_balancer_test", &loadBalancer), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract aws_lightsail_load_balancer.lightsail_load_balancer_test
to resourceName := "aws_lightsail_load_balancer.lightsail_load_balancer_test"
instead of repeating.
it would be also best to use test
instead of lightsail_load_balancer_test
to be less verbose and more similar to other acceptance tests in the provider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, this change will be implemented once the following pull request is merged by @akonrath akonrath#96
|
||
func TestAccAWSLightsailLoadBalancer_basic(t *testing.T) { | ||
var loadBalancer lightsail.LoadBalancer | ||
lightsailLoadBalancerName := fmt.Sprintf("tf-test-lightsail-%d", acctest.RandInt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to rename to rName
and use acctest.RandomWithPrefix("tf-acc-test")
and make tests configs more generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, this change will be implemented once the following pull request is merged by @akonrath akonrath#96
}) | ||
} | ||
|
||
func TestAccAWSLightsailLoadBalancer_Tags(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, this change will be implemented once the following pull request is merged by @akonrath akonrath#96
Feature: Path acctests added
@DrFaust92 Thank you for your feedback and detailed recommendations. (This will be my fist contribution to any terraform provider so the detail and examples provided really helped.) I plan on being a regular contributor to this provider starting with Lightsail (and reviving the many stale pull requests), to get all Lightsail resources and data sources implemented. I have implemented all of your recommendations to the best of my knowledge (remember i'm new to this, so please feel free to let me know where I may have missed what you were recommending) in the following pull request akonrath#96. Once @akonrath approves the PR the changes will be updated in this pull request. Looking forward to contributing in any way i can to this provider. |
comment showing the newly added test passing
|
@DrFaust92 The pull request with the changes has been merged. Please review as you have time. My next steps is that I am currently working on a resource for aws_lightsail_load_balancer_attachment (I already have working code for this locally) which I will be submitting in a separate PR once this one is merged (Since I will need the resource in order to write proper tests). Then I will be writing 2 additional resources in an additional PR. One to create a Load Balancer certificate, and one for attaching the certificate to the load balancer. Is there a preference for the reviewer team to have many smaller PR requests (Split each new resource into its own PR)? or a few large PR requests (containing multiple new resources)? Again thank you ahead of time for any feedback. |
@DrFaust92 any chance I can get another review on this soon? This internal service waiter will be useful and needed for all of the other lightsail contributions I am wanting to make. |
Am I doing something incorrect in order to get another review? Or is this a standard wait time on a contribution? Sorry for the stupid question, I am newish to contributing to open source and just want to make sure I doing it correctly. |
Any chance of getting another review on this PR? |
Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding. Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author. For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000. For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide. |
For Awareness I have begun work on creating a separate AWS lightsail provider in order to help with Speeding up contributions and to give it dedicated attention. The Github repo is located here: https://github.com/DeYoungTech/terraform-provider-awslightsail The provider and documentation is published here: https://registry.terraform.io/providers/DeYoungTech/awslightsail/latest With the most recent version, the provider has moved past resource parity for lightsail services and It includes this resource. If you want to start using this resource now, feel free to check it out and provide feedback. |
@akonrath If I where to put in the time to make a Pull request against your branch to bring this change up to date, would you be available to merge it? |
This functionality has been released in v4.36.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #11049
Release note for CHANGELOG:
Output from acceptance testing:
Hello,
This PR:
make build
)make website
)Next Steps: