Open kva1966 opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
If I understand correctly, then, no_open_ports
or whatever no-ports approach used would imply issuing a: close ports 22 and 80 post-instance creation, to close the defaults. Or, be more deterministic: deliberately open one port, overriding the defaults, then close that port that we know. In case defaults change. Comes down to the API calls underneath.
I don't mind implementing a fix with some guidance, quite new to Terraform, though I've played with parts of the AWS CLI.
Description
I wish to say: close all public ports, when an instance is created.
Or put differently: don't open any public ports when an instance is created.
Thus, possibly, this could be implemented by
aws_lightsail_instance
instead.However, assuming the issue is here:
port_info
block is always required in anaws_lightsail_instance_public_ports
block.aws_lightsail_instance_public_port
block at all, LightSail will create rules for the SSH and HTTP port by default, instead of having no public ports open on the instance.Error example for case (1):
Affected Resource(s) and/or Data Source(s)
aws_lightsail_instance_public_ports
Potential Terraform Configuration
References
Would you like to implement a fix?
Yes