New Resource: aws_lightsail_domain_entry #2815
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.
lightsail domain entry for #2731
This is my first attempt to implement a new resource. Comments and feedbacks are welcome.
The resource is at least working for now. But I do have a few questions about the implementation.
The resource schema follows the same schema as AWS API for CreateDomainEntryInput,
UpdateDomainEntryInput, DeleteDomainEntryInput. I'm not sure if it's good idea to flat all into common
TypeString
. In that case, it will make the implementation a bit easier but break the identical mapping betweenterraform
and AWS API.Name for the domain entry in AWS API is the full FQDN with domain name. From user perspective, it would be easier to just use a string without domain name. We can append domain name before sending request to AWS. The same concern of identical mapping applies here as well. Still I'm following convention for AWS API.
In AWS API DomainEntry,
options
is already marked asDeprecated
. So I didn't add this parameter at all.I haven't fully figured out how import works, so support for import is not there yet.
I'd like to validate
target
argument based onis_alias
. AFAIK,ValidateFunc
works only for the current argument. I don't have it in mind where similar logic is implemented.