Add initial Direct Connect resources #12567
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is based in part on the work started in #5212 however I've just adapted the single resource I need:
aws_directconnect_public_virtual_interface_confirm
I've updated it with the missing attributes and import functionality and also renamed the resource slightly so it fits better with the naming convention of other resources, (IMHO!).
Sadly this has the same sticking point in that testing it the same way as most other AWS resources doesn't really work as a) it involves more than one AWS account and b) Direct Connect infrastructure quite often involves some manual operator involvement or can take some time to be verified by AWS staff.
The directconnectiface package gives the ability to mock the API so I could test the Terraform resource without having to create anything physical/virtual however I'm struggling to work out how I can slot it in to the testing framework, it looks like I need to make my own
AWSClient
with a mockeddcconn
.I can't see any existing resources that I can copy or use for inspiration so I'm asking for some guidance here. I'd really like to get this resource added as it's the last outstanding piece I have left and maybe once the tests are figured out it'll help with adding the remaining Direct Connect resources.