https://github.com/jameswoolfenden/terraform-aws-lightsail
Basic lightsail module
https://github.com/jameswoolfenden/terraform-aws-lightsail
aws lightsail module terraform
Last synced: 3 months ago
JSON representation
Basic lightsail module
- Host: GitHub
- URL: https://github.com/jameswoolfenden/terraform-aws-lightsail
- Owner: JamesWoolfenden
- License: apache-2.0
- Created: 2022-09-28T06:37:26.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-11T12:44:12.000Z (over 3 years ago)
- Last Synced: 2026-02-12T09:41:13.576Z (5 months ago)
- Topics: aws, lightsail, module, terraform
- Language: Makefile
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-aws-lightsail
[](https://github.com/JamesWoolfenden/terraform-aws-lightsail)
[](https://github.com/JamesWoolfenden/terraform-aws-lightsail/releases/latest)
[](https://github.com/JamesWoolfenden/terraform-aws-lightsail/releases/latest)

[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-aws-lightsail&benchmark=CIS+AWS+V1.2)
[](https://github.com/pre-commit/pre-commit)
[](https://www.checkov.io/)
[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-aws-lightsail&benchmark=INFRASTRUCTURE+SECURITY)
---
Terraform module - Create and optionally shares kms key to other accounts.
---
It's 100% Open Source and licensed under the [APACHE2](LICENSE).

## Usage
Include this repository as a module in your existing Terraform code:
```hcl
module "lightsail" {
source = "JamesWoolfenden/lightsail/aws"
version = "v0.0.1"
tags = var.common_tags
}
```
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | n/a |
| [local](#provider\_local) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_lightsail_instance.pike](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lightsail_instance) | resource |
| [aws_lightsail_instance_public_ports.pike](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lightsail_instance_public_ports) | resource |
| [aws_lightsail_key_pair.pike](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lightsail_key_pair) | resource |
| [local_file.private_key](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.public_key](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [instance](#input\_instance) | n/a |
object({
name = string
availability_zone = string
blueprint_id = string
bundle_id = string
key_pair_name = string
user_data = string
}) | n/a | yes |
| [settings](#input\_settings) | n/a | list(object({
protocol = string
from_port = number
to_port = number
})) | [
{
"from_port": 80,
"protocol": "tcp",
"to_port": 80
}
]
| no |
| [tags](#input\_tags) | n/a | `map(any)` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| [instance](#output\_instance) | n/a |
| [public\_ports](#output\_public\_ports) | n/a |
## Policy
This is the policy required to build this project:
The Terraform resource required is:
```golang
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:DescribeAccountAttributes"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"lightsail:CloseInstancePublicPorts",
"lightsail:CreateInstances",
"lightsail:CreateKeyPair",
"lightsail:DeleteInstance",
"lightsail:DeleteKeyPair",
"lightsail:GetInstance",
"lightsail:GetInstancePortStates",
"lightsail:GetKeyPair",
"lightsail:GetOperation",
"lightsail:PutInstancePublicPorts",
"lightsail:ReleaseStaticIp",
"lightsail:TagResource",
"lightsail:UntagResource"
],
"Resource": "*"
}
]
})
}
```
## Related Projects
Check out these related projects.
- [terraform-aws-s3](https://github.com/jameswoolfenden/terraform-aws-s3) - S3 buckets
## Help
**Got a question?**
File a GitHub [issue](https://github.com/JamesWoolfenden/terraform-aws-lightsail/issues).
## Contributing
### Bug Reports & Feature Requests
Please use the [issue tracker](https://github.com/JamesWoolfenden/terraform-aws-lightsail/issues) to report any bugs or file feature requests.
## Copyrights
Copyright � 2022 James Woolfenden
## License
[](https://opensource.org/licenses/Apache-2.0)
See [LICENSE](LICENSE) for full details.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
### Contributors
[![James Woolfenden][jameswoolfenden_avatar]][jameswoolfenden_homepage]
[James Woolfenden][jameswoolfenden_homepage]
[jameswoolfenden_homepage]: https://github.com/jameswoolfenden
[jameswoolfenden_avatar]: https://github.com/jameswoolfenden.png?size=150