-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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 aws_appfabric_appbundle resource #37542
base: main
Are you sure you want to change the base?
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 @walkoaw 👋
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! 😃
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.
Good Code, well done. Some minor edits required.
Also -- need 2 more files one is for change log and another for documentation - you can check the contributor guide for the same.
"github.com/hashicorp/terraform-provider-aws/names" | ||
) | ||
|
||
func newResourceAppBundle(_ context.Context) (resource.ResourceWithConfigure, error) { |
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 add framework @frameworkresource so that service gen can pick it up.
resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) | ||
} | ||
|
||
func (r *resourceAppBundle) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { |
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.
Add NoOps marker
resource.ParallelTest(t, resource.TestCase{ | ||
PreCheck: func() { | ||
acctest.PreCheck(ctx, t) | ||
testAccPreCheck(ctx, 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.
I dont understand this check, usually we run a precheck like this
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckPartitionHasService(t, names.servicendpointID)
},
{ | ||
ResourceName: resourceName, | ||
ImportState: true, | ||
ImportStateIdFunc: testAccAppBundleImportStateIDFunc(ctx, resourceName), |
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.
What is this test trying to do? I guess we can ignore this test
} | ||
} | ||
`) | ||
} |
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.
Add one more test called _full and ensure you can pass customer_managed_key_identifier and also ensure all fields are returned in the output. Idea is _basic test is too check minimum and _full test should check all fields possible (even optional fields)
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 are no required fields, so I just had :
testAccCheckAppBundleExists(ctx, resourceName, &appbundle),
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.
Could _basic be deleted altogether?
@@ -19,7 +19,15 @@ func (p *servicePackage) FrameworkDataSources(ctx context.Context) []*types.Serv | |||
} | |||
|
|||
func (p *servicePackage) FrameworkResources(ctx context.Context) []*types.ServicePackageFrameworkResource { | |||
return []*types.ServicePackageFrameworkResource{} | |||
return []*types.ServicePackageFrameworkResource{ |
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.
is this auto generated?
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.
I believe it was. Should it be deleted?
Thank you for your contribution! 🚀 A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored. For additional information refer to the AWS SDK for Go Versions page in the contributor guide. |
All comments have been addressed and documentation has been added. |
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.
Looks good . Some minor edits required
- As you have an optional field like
"customer_managed_key_identifier": schema.StringAttribute{ Optional: true, },
then you need a test for the same. - You need a couple of additional tests for tags.
Description
This PR adds a resource for aws_appfabric_appbundle
Relations
Relates #34549
References
AppFabric AppBundle Docs
Output from Acceptance Testing