cn-terraform / terraform-aws-nexus Goto Github PK
View Code? Open in Web Editor NEWSonatype Nexus Terraform Module for AWS
Home Page: https://registry.terraform.io/modules/cn-terraform/nexus
License: Apache License 2.0
Sonatype Nexus Terraform Module for AWS
Home Page: https://registry.terraform.io/modules/cn-terraform/nexus
License: Apache License 2.0
When we run nexus in fargate an initial admin pw is stored inside the container at /nexus-data/admin.password
But on fargate we can NOT run something like
docker container exec -it $(docker ps -q --filter "name=nexus") cat /nexus-data/admin.password
How do you set/get the admin password?
It seems to me, that there are two ecs cluster created.
first from this code here:
https://github.com/cn-terraform/terraform-aws-nexus/blob/0.0.3-alpha/main.tf#L1-L7
# ---------------------------------------------------------------------------------------------------------------------
# ECS Cluster
# ---------------------------------------------------------------------------------------------------------------------
resource "aws_ecs_cluster" "nexus_cluster" {
name = "${var.name_preffix}-nexus"
}
and second from here used fargate module:
https://github.com/cn-terraform/terraform-aws-ecs-fargate/blob/master/main.tf#L1-L10
which is referenced here
https://github.com/cn-terraform/terraform-aws-nexus/blob/0.0.3-alpha/main.tf#L21
I'm trying to use this module, but it fails.
I'm passing on VPC parameters from the https://github.com/terraform-aws-modules/terraform-aws-vpc module.
module "nexus" {
source = "cn-terraform/nexus/aws"
version = "0.0.3-alpha"
name_preffix = var.name_prefix
vpc_id = var.vpc_id
availability_zones = var.availability_zones
public_subnets_ids = var.public_subnets_ids
private_subnets_ids = var.private_subnets_ids
}
Error: Invalid count argument
on .terraform/modules/nexus.ecs_fargate.ecs-alb/terraform-aws-ecs-alb-1.0.0/main.tf line 172, in resource "aws_lb_listener" "lb_https_listeners":
172: count = length(aws_lb_target_group.lb_https_tgs)
The "count" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the count depends on.
Error: Invalid count argument
on .terraform/modules/nexus.ecs_fargate.ecs-fargate-service/terraform-aws-ecs-fargate-service-2.0.2/main.tf line 123, in resource "aws_security_group_rule" "ingress_through_https":
123: count = length(data.aws_lb_target_group.lb_https_target_groups)
The "count" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the count depends on.
Also name_preffix can cause an error limited to 32 chars
. But this can be mitigated, when we use a shorter value.
Error: "name" cannot be longer than 32 characters
on .terraform/modules/nexus.ecs_fargate.ecs-alb/terraform-aws-ecs-alb-1.0.0/main.tf line 83, in resource "aws_lb_target_group" "lb_http_tgs":
83: resource "aws_lb_target_group" "lb_http_tgs" {
Hello, while using the module I came across this error.
│ status code: 400, request id: 403d97a0-b257-42c4-af1b-d15345c53cad
│
│ with module.ecs_fargate.module.ecs-fargate-service.module.ecs-alb.aws_lb_listener.lb_https_listeners["default"],
│ on .terraform/modules/ecs_fargate.ecs-fargate-service.ecs-alb/main.tf line 239, in resource "aws_lb_listener" "lb_https_listeners":
│ 239: resource "aws_lb_listener" "lb_https_listeners" {
│
╷
│ Error: error creating ECS service (Nexus-nexus-service): InvalidParameterException: The target group with targetGroupArn arn:aws:elasticloadbalancing:us-west-2:941851596731:targetgroup/Nexus-nexus-https-8081/d896c8243b7088aa does not have an associated load balancer.
│
│ with module.ecs_fargate.module.ecs-fargate-service.aws_ecs_service.service,
│ on .terraform/modules/ecs_fargate.ecs-fargate-service/main.tf line 63, in resource "aws_ecs_service" "service":
│ 63: resource "aws_ecs_service" "service" {
I used both 2.0.0
and 2.0.1
and no luck.
Does anyone have an idea on how to solve this?
I tried the following approaches and I was unsuccessful.
[configure_loadbalancer_ssl](https://registry.terraform.io/modules/cn-terraform/nexus/aws/2.0.1#input_configure_loadbalancer_ssl)
and only use the domain name for the certificate I previously imported.Thank you!
CannotStartContainerError: Error response from daemon: failed to initialize logging driver: failed to create Cloudwatch log stream: ResourceNotFoundException: The specified log group does not exist
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/pipeline.yml
actions/checkout v4
actions/checkout v4
main.tf
terraform-aws-modules/acm/aws 4.3.2
cn-terraform/cloudwatch-logs/aws 1.0.12
cn-terraform/ecs-fargate/aws 2.0.52
versions.tf
aws >= 4
hashicorp/terraform >= 0.13
Your submodule reference is broken at: https://github.com/cn-terraform/terraform-aws-nexus/blob/master/main.tf#L29
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.