-
Notifications
You must be signed in to change notification settings - Fork 8
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 new service package Support and new resource Case #132
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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.
Welcome @mergenci 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
ffdbe91
to
f8a861f
Compare
Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
f8a861f
to
9925c2b
Compare
Hi @mergenci, Could you please document the steps needed to add a new framework resource (including the generator commands). It would be helpful as a reference. |
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.
Thank you @mergenci for working on the new SupportCase
resource. Left some minor comments. Let's discuss.
AWS Support SDK documentation states that ten CC email addresses are allowed, but eleven email addresses are accepted in practice. https://docs.aws.amazon.com/awssupport/latest/APIReference/API_CreateCase.html Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
According to resource naming rules in Contributor Guide, "Case" is a better name than "SuportCase". https://hashicorp.github.io/terraform-provider-aws/naming/#rule_2 Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
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 @mergenci, lgtm. Thank you for implementing the new resource with the Terraform plugin framework.
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. |
Description
Add new service package Support and new resource Case.
Details
Terraform AWS Provider's Contributor Guide, /docs directory of the repo, documents everything about provider development.
As part of this PR, we first configured our development environment by running
make tools
and then testing our setup by runningmake build
.In order to introduce our new service, AWS Support, we followed Adding a New AWS Service section. More specifically, we applied the following steps.
names/names_data.csv
. UncheckNotImplemented
column, by removing “x”. Disable AWS SDK Go v1 client, by removing “1”, and enable AWS SDK Go v2 client, by adding “2” to the next column.internal/service/support/generate.go
.make gen
andgo mod tidy
.Above commands generated AWS client (
internal/conns/awsclient_gen.go
) and configure the service package (internal/provider/service_packages_gen.go
).Finally, we implemented our new resource Case by following Adding a New Resource. Adding a resource requires another
make gen
that registers the resource tointernal/service/support/service_package_gen.go
We frequently referred to existing Plugin Framework resource implementations, which could be easily located by searching@FrameworkResource
in the repository.Contributor Guide has a dedicated section for debugging. First, we step-debugged an acceptance test, which creates resources in the cloud. Then, we end-to-end tested using Terraform CLI. In order to do so, we wrote a .terraformrc, to point Terraform to our provider build with a provider installation section.