#terraform-aws-modules (2021-01)
Terraform Modules
Discussions related to https://github.com/terraform-aws-modules
Archive: https://archive.sweetops.com/terraform-aws-modules/
2021-01-05
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
I must be doing something wrong, but not sure what. I am getting
A managed resource "aws_iam_user" "this" has not been declared in the root
module.
when calling
source = "terraform-aws-modules/iam/aws//modules/iam-user"
version = "~> 3.0"
The resource is there. https://github.com/terraform-aws-modules/terraform-aws-iam/blob/master/modules/iam-user/main.tf#L1 Any ideas?
Terraform module which creates IAM resources on AWS - terraform-aws-modules/terraform-aws-iam
![pjaudiomv avatar](https://secure.gravatar.com/avatar/40f13c8f113a13f5b9730c8cd47ec9ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
what does the call to the module look like
Terraform module which creates IAM resources on AWS - terraform-aws-modules/terraform-aws-iam
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
provider "aws" {
region = "us-east-1"
}
module "iam_user" {
source = "terraform-aws-modules/iam/aws//modules/iam-user"
version = "~> 3.0"
... some vars ...
}
![pjaudiomv avatar](https://secure.gravatar.com/avatar/40f13c8f113a13f5b9730c8cd47ec9ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
what does the rest look like, its important to know flags and such
![pjaudiomv avatar](https://secure.gravatar.com/avatar/40f13c8f113a13f5b9730c8cd47ec9ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
obviously obfusicate
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
provider "aws" {
region = "us-east-1"
}
module "iam_user" {
source = "terraform-aws-modules/iam/aws//modules/iam-user"
version = "~> 3.0"
name = "xxx"
}
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
Terraform v0.14.3
+ provider registry.terraform.io/hashicorp/aws v3.22.0
![pjaudiomv avatar](https://secure.gravatar.com/avatar/40f13c8f113a13f5b9730c8cd47ec9ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
I am unable to reproduce i am on tested with terraform 0.14.3
and aws provider 3.22.0
with this config
provider "aws" {
region = "us-east-1"
}
module "test-iam" {
source = "terraform-aws-modules/iam/aws//modules/iam-user"
version = "~> 3.0"
name = "me.test"
pgp_key = "keybase:mykeybase"
}
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
Okay, confirmed it was my brain not working. My module had its own output, and that’s where the error came from. Can’t believe I missed that. Thanks for the help, and sorry that it turned out to be a user error
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
(output was in a separate outputs.tf file)
![pjaudiomv avatar](https://secure.gravatar.com/avatar/40f13c8f113a13f5b9730c8cd47ec9ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
no worries, glad you figured it out.
2021-01-25
![diogof avatar](https://secure.gravatar.com/avatar/9c815930b0df0d380d280607fae811a4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Hi everyone, been using ecs-alb-service-task
for a long time but now I have come up with a problem: how to make 2 services on the same Cluster to communicate with one another (or better A –> B)?
![Joe Niland avatar](https://secure.gravatar.com/avatar/b90c8e752dd648ef229096c60ba2408f.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0022-72.png)
assuming they have private IPs, you have to use service discovery / CloudMap
![diogof avatar](https://secure.gravatar.com/avatar/9c815930b0df0d380d280607fae811a4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
So several options all cumbersome (App Mesh, Service Discovery, etc)
![Ofek Solomon avatar](https://avatars.slack-edge.com/2021-01-25/1695973133920_28e507d53963a8c2288f_72.png)
@Ofek Solomon has joined the channel
![Ofek Solomon avatar](https://avatars.slack-edge.com/2021-01-25/1695973133920_28e507d53963a8c2288f_72.png)
Hi guys, when trying to use the terraform-aws-eks-workers module with terraform 0.14.3 im unable to do so because of the hard coded version of the terraform-aws-ec2-autoscale-group in here , is there a reason for that? it prevents me from using the module with our current terraform version. Appreciate the help!
Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers - cloudposse/terraform-aws-eks-workers
Terraform module to provision Auto Scaling Group and Launch Template on AWS - cloudposse/terraform-aws-ec2-autoscale-group
Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers - cloudposse/terraform-aws-eks-workers
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
@Maxim Mironenko (Cloud Posse)
Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers - cloudposse/terraform-aws-eks-workers
Terraform module to provision Auto Scaling Group and Launch Template on AWS - cloudposse/terraform-aws-ec2-autoscale-group
Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers - cloudposse/terraform-aws-eks-workers
![Ofek Solomon avatar](https://avatars.slack-edge.com/2021-01-25/1695973133920_28e507d53963a8c2288f_72.png)
@Erik Osterman (Cloud Posse) @Maxim Mironenko (Cloud Posse) I cloned the module and changed the asg module version to the latest and it works fine but i really want to be able to use the original module and stay updated with the new versions
![Maxim Mironenko (Cloud Posse) avatar](https://avatars.slack-edge.com/2019-01-14/522357805937_0a3ceb59638dd335f2c8_72.jpg)
@Ofek Solomon go ahead and try new release: <https://github.com/cloudposse/terraform-aws-eks-workers/releases/tag/0.17.0>
![Julian avatar](https://avatars.slack-edge.com/2021-01-05/1612347212771_41f818083cca66532513_72.jpg)
@Maxim Mironenko (Cloud Posse) I’m having a similar issue, and sorry, a bit more of a novice with terraform. In trying to use the following module I get the attached for a few sub-modules.
![Maxim Mironenko (Cloud Posse) avatar](https://avatars.slack-edge.com/2019-01-14/522357805937_0a3ceb59638dd335f2c8_72.jpg)
@Julian just checked, works for me on terraform v0.14.4 and module release 0.35.0: <https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/releases/tag/0.35.0>
![Maxim Mironenko (Cloud Posse) avatar](https://avatars.slack-edge.com/2019-01-14/522357805937_0a3ceb59638dd335f2c8_72.jpg)
could you share your code? or check if you are using latest module version
![Julian avatar](https://avatars.slack-edge.com/2021-01-05/1612347212771_41f818083cca66532513_72.jpg)
@Maxim Mironenko (Cloud Posse) I’m using tf 0.14.5
module "subnets" {
version = ""
source = "git::<https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0>"
availability_zones = var.availability_zones
namespace = var.namespace
stage = var.stage
name = var.name
vpc_id = module.vpc.vpc_id
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
nat_gateway_enabled = true
nat_instance_enabled = false
}
module "elastic_beanstalk_application" {
source = "git::<https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application.git?ref=tags/0.3.0>"
namespace = var.namespace
stage = var.stage
name = var.name
description = "${var.prefix}-test-application"
}
module "elastic_beanstalk_environment" {
source = "cloudposse/elastic-beanstalk-environment/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = var.namespace
stage = var.stage
name = var.name
description = "Test elastic_beanstalk_environment"
region = var.region
availability_zone_selector = "Any 3"
dns_zone_id = var.dns_zone_id
elastic_beanstalk_application_name = module.elastic_beanstalk_application.elastic_beanstalk_application_name
instance_type = "t3.micro"
autoscale_min = 3
autoscale_max = 10
updating_min_in_service = 0
updating_max_batch = 1
loadbalancer_type = "application"
vpc_id = module.networking.vpc_id
loadbalancer_subnets = module.networking.public_subnet_ids
application_subnets = module.networking.app_subnet_ids
allowed_security_groups = [module.networking.vpc_default_security_group_id]
// <https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html>
// <https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.docker>
solution_stack_name = "64bit Amazon Linux 2 v4.1.5 running Tomcat 8.5 Corretto 11"
...
...
...
![Julian avatar](https://avatars.slack-edge.com/2021-01-05/1612347212771_41f818083cca66532513_72.jpg)
and thanks for your help I’m guessing I need to edit the module version tag at the end of the source lines? I pulled the code as is from GH
![Maxim Mironenko (Cloud Posse) avatar](https://avatars.slack-edge.com/2019-01-14/522357805937_0a3ceb59638dd335f2c8_72.jpg)
yes, update tag with most recent release of the modules. for terraform-aws-dynamic-subnets
it is 0.36.0
. for terraform-aws-elastic-beanstalk-application
it is 0.9.0
. for terraform-aws-elastic-beanstalk-environment
it is 0.35.0
![Julian avatar](https://avatars.slack-edge.com/2021-01-05/1612347212771_41f818083cca66532513_72.jpg)
![Ofek Solomon avatar](https://avatars.slack-edge.com/2021-01-25/1695973133920_28e507d53963a8c2288f_72.png)
@Maxim Mironenko (Cloud Posse) the tag you told me to try is working, thanks!
2021-01-27
2021-01-31
![David Lozano avatar](https://avatars.slack-edge.com/2020-10-28/1453157962374_67b9b13d23898f6d2fda_72.png)
Hi everyone, Does anyone know if it is possible to build private and public subnets with different sizes (e.g: private subnets /27, public subnets /28) using terraform-aws-dynamic-subnet module? Or all subnets will be built the same size and there is no way to modify it?
Terraform module for public and private subnets provisioning in existing VPC - cloudposse/terraform-aws-dynamic-subnets
![Jeremy G (Cloud Posse) avatar](https://avatars.slack-edge.com/2020-07-04/1229022582372_22757dbc9ef96d371614_72.jpg)
Not possible with that module. That module takes the given CIDR and divides it into the largest equal-sized subnets the CIDR range will hold given the number of subnets to be created.
Terraform module for public and private subnets provisioning in existing VPC - cloudposse/terraform-aws-dynamic-subnets
![David Lozano avatar](https://avatars.slack-edge.com/2020-10-28/1453157962374_67b9b13d23898f6d2fda_72.png)
Hi @Jeremy G (Cloud Posse) thank you for confirming.