#terraform-aws-modules (2020-05)
Terraform Modules
Discussions related to https://github.com/terraform-aws-modules
Archive: https://archive.sweetops.com/terraform-aws-modules/
2020-05-05
Very cool! @Erik Osterman (Cloud Posse) you guys might look at this if you get the time. https://github.com/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms/pull/18
Looks like the one blocker for me in the past was resolved by rfvermut contribution.
@sheldonh thanks for your contribution
the module is not converted to TF 0.12 yet
I can review your 0.12 changes for 0.11 version and if ok, will merge
but it’s not a long-term solution, we need to convert it to TF 0.12 and add tests. We have a few modules in the pipeline, this one will be converted soon
I didn’t change I just flagged the PR . . I would love to have done it but no sense redoing someone else’s work. I think they submitted 0.12 changes
2020-05-08
Hello all, quick question, why do you guys use this enable
flag in all your modules?
@Carlos R. this is not the correct channel (not about CloudPosse modules), but anyway, here is a short answer
imagine you use the same TF code (a set of modules) for many diff environments (prod, staging, dev, testing)
and you have settings for all of those environments in xxx.tfvars
files (where xxxx
is the env name)
now, you have the same code for all environments, e.g. RDS, EMR, ElasticSearch, etc.
but if you don’t want to deploy some of the modules to some of the environments, let’s say you don’t want Elastcsearch and EMR on dev/testing to save on cost, you set enabled=false
only for those environments
so without changing/updating or commenting out any of the code, you can control what you want to deploy to each environment. You can also destroy a module by simply setting enabled=false
on it
there are more small use-cases for that, but this is the main one
Ty for the reply @Andriy Knysh (Cloud Posse) I was wondering that would be something like that. I was trying to understand if that’s a good practice or not in case I do my own module. It seems important at least until they release tf 0.13
again apologies for asking in the wrong channel and ty for the prompt reply
Dang. Had no idea 0.13 was even a thing. Reading the change log I couldn’t even get a feel for eta but the decentralized providers piece intriguing. Not sure what it means
2020-05-13
2020-05-14
Hi there, we’ve encountered a bug with terraform-aws-elasticache-redis that I believe https://github.com/cloudposse/terraform-aws-elasticache-redis/pull/65 resolves. Could we get a review please?
what fix creation on cluster_mode_enabled don't send number_cache_clusters or availability_zones for cluster mode why neither parameter are supported for cluster mode; more info: number_cac…
thanks @Jim Park
what fix creation on cluster_mode_enabled don't send number_cache_clusters or availability_zones for cluster mode why neither parameter are supported for cluster mode; more info: number_cac…
Codefresh is down so we can’t run our tests now
2020-05-20
hello I am having the following code to create a launch configuration which creates one secondary volume but I need to create multiple EBS volumes as per the requirement … can anyone suggest what would be the best approach to have that functionality
resource "aws_launch_configuration" "launch_config_with_secondary_ebs" {
count = var.secondary_ebs_volume_size != "" ? 1 : 0
ebs_optimized = var.enable_ebs_optimization
enable_monitoring = var.detailed_monitoring
image_id = var.image_id != "" ? var.image_id : data.aws_ami.asg_ami.image_id
instance_type = var.instance_type
key_name = var.key_pair
name_prefix = join("-", compact(["LaunchConfigWith2ndEbs", var.name, format("%03d-", count.index + 1)]))
placement_tenancy = var.tenancy
security_groups = var.security_groups
user_data_base64 = base64encode(data.template_file.user_data.rendered)
ebs_block_device {
device_name = local.ebs_device_map[local.ec2_os]
encrypted = var.secondary_ebs_volume_existing_id == "" ? var.encrypt_secondary_ebs_volume : false
iops = var.secondary_ebs_volume_iops
snapshot_id = var.secondary_ebs_volume_existing_id
volume_size = var.secondary_ebs_volume_size
volume_type = var.secondary_ebs_volume_type
}
iam_instance_profile = element(
coalescelist(
aws_iam_instance_profile.instance_role_instance_profile.*.name,
[var.instance_profile_override_name],
),
0,
)
root_block_device {
iops = var.primary_ebs_volume_type == "io1" ? var.primary_ebs_volume_size : 0
volume_size = var.primary_ebs_volume_size
volume_type = var.primary_ebs_volume_type
}
lifecycle {
create_before_destroy = true
}
}
2020-05-21
@Rajesh Babu Gangula Have you tried just adding another ebs_block_device block and running a plan?
That works but I want to have it as an arbitrary option
Tried dynamic block but it did not work as expected
The docs are a bit unclear, but if you look in the provider code it’s clear that multiple ebs blocks are supported, so dynamic
should be the way to go.
Could you show us what you’ve tried so far with using dynamic blocks?
Terraform AWS provider. Contribute to terraform-providers/terraform-provider-aws development by creating an account on GitHub.
2020-05-29
@Andriy Knysh (Cloud Posse) hey Andriy, thanks for reviewing my pr, could you take one more look please ?
what If the old arn format is still used, then this module should not tag the service as that’s not possible with the old arn. why Fixes #50 references N/A
also @Andriy Knysh (Cloud Posse) this is the one that i really want to push through, if possible
what If the old arn format is still used, then this module should not tag the service as that’s not possible with the old arn. why Fixes #50 references N/A