https://github.com/jameswoolfenden/terraform-aws-artifactory-oss
EC2 based solution for Artifactory OSS edition.
https://github.com/jameswoolfenden/terraform-aws-artifactory-oss
artifactory aws jfrog module oss terraform
Last synced: 3 months ago
JSON representation
EC2 based solution for Artifactory OSS edition.
- Host: GitHub
- URL: https://github.com/jameswoolfenden/terraform-aws-artifactory-oss
- Owner: JamesWoolfenden
- License: apache-2.0
- Created: 2020-11-20T14:03:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-29T20:01:21.000Z (almost 2 years ago)
- Last Synced: 2025-01-25T19:28:05.115Z (5 months ago)
- Topics: artifactory, aws, jfrog, module, oss, terraform
- Language: HCL
- Homepage:
- Size: 65.4 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-aws-artifactory-oss
[](https://github.com/JamesWoolfenden/terraform-aws-artifactory-oss)
[](https://github.com/JamesWoolfenden/terraform-aws-artifactory-oss/releases/latest)
[](https://github.com/JamesWoolfenden/terraform-aws-artifactory-oss/releases/latest)

[](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-aws-artifactory-oss&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-artifactory-oss&benchmark=INFRASTRUCTURE+SECURITY)Terraform module -
---
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
## Usage
This is just a very basic example using Bitnamis AMI.

Copy the example or just include **module.art.tf** from this repository as a module in your existing Terraform code:
```terraform
module "art" {
source = "JamesWoolfenden/artifactory-oss/aws"
version = "0.1.0"
common_tags = var.common_tags
instance_type = var.instance_type
key_name = var.key_name
vpc_id = var.vpc_id
ssl_certificate_id = var.ssl_certificate_id
sec_group_name = var.sec_group_name
allowed_cidr = var.allowed_cidr
subnet_id = var.subnet_id
ssh_cidr = var.ssh_cidr
record = var.record
zone_id = var.zone_id
}
```## Costs
```text
Monthly cost estimateProject: .
Name Monthly Qty Unit Monthly Cost
module.art.aws_elb.service_elb
├─ Classic load balancer 730 hours $21.46
└─ Data processed Cost depends on usage: $0.0084 per GBmodule.art.aws_instance.art
├─ Instance usage (Linux/UNIX, on-demand, t2.small) 730 hours $18.98
├─ EC2 detailed monitoring 7 metrics $2.10
└─ root_block_device
└─ Storage (general purpose SSD, gp2) 100 GB-months $11.60PROJECT TOTAL $54.14
```## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | n/a |
| [local](#provider\_local) | n/a |
| [tls](#provider\_tls) | n/a |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_elb.service_elb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb) | resource |
| [aws_instance.art](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
| [aws_key_pair.art](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair) | resource |
| [aws_route53_record.www](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_security_group.art](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group.elb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [local_file.private_ssh](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.public_ssh](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [tls_private_key.ssh](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
| [aws_ami.art](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
| [aws_ebs_default_kms_key.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ebs_default_kms_key) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [allowed\_cidr](#input\_allowed\_cidr) | n/a | `list(any)` | n/a | yes |
| [common\_tags](#input\_common\_tags) | Implements the common\_tags scheme | `map(any)` | n/a | yes |
| [instance\_type](#input\_instance\_type) | Instance type for your Artifactory instance | `string` | `"t2.small"` | no |
| [key\_name](#input\_key\_name) | n/a | `string` | n/a | yes |
| [record](#input\_record) | The DNS name for Route53 | `string` | n/a | yes |
| [sec\_group\_name](#input\_sec\_group\_name) | n/a | `string` | n/a | yes |
| [ssh\_cidr](#input\_ssh\_cidr) | n/a | `list(any)` | n/a | yes |
| [ssl\_certificate\_id](#input\_ssl\_certificate\_id) | Your SSL certificate ID from ACM to add to your Load balancer | `string` | n/a | yes |
| [subnet\_id](#input\_subnet\_id) | Your Subnets... | `string` | n/a | yes |
| [vpc\_id](#input\_vpc\_id) | n/a | `string` | n/a | yes |
| [zone\_id](#input\_zone\_id) | The ZOne to use for your DNS record | `string` | n/a | yes |## Outputs
| Name | Description |
|------|-------------|
| [elb](#output\_elb) | n/a |
| [instance](#output\_instance) | n/a |
| [record](#output\_record) | n/a |## Policy
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:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CreateKeyPair",
"ec2:CreateSecurityGroup",
"ec2:CreateTags",
"ec2:DeleteKeyPair",
"ec2:DeleteSecurityGroup",
"ec2:DeleteTags",
"ec2:DescribeAccountAttributes",
"ec2:DescribeImages",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstanceCreditSpecifications",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInstances",
"ec2:DescribeKeyPairs",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeSecurityGroups",
"ec2:DescribeTags",
"ec2:DescribeVolumes",
"ec2:GetEbsDefaultKmsKeyId",
"ec2:ImportKeyPair",
"ec2:ModifyInstanceAttribute",
"ec2:MonitorInstances",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"ec2:UnmonitorInstances"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:AddTags",
"elasticloadbalancing:AttachLoadBalancerToSubnets",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateLoadBalancerListeners",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:RemoveTags"
],
"Resource": "*"
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:GetChange",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
],
"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-artifactory-oss/issues).
## Contributing
### Bug Reports & Feature Requests
Please use the [issue tracker](https://github.com/JamesWoolfenden/terraform-aws-artifactory-oss/issues) to report any bugs or file feature requests.
## Copyrights
Copyright © 2019-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 atUnless 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