You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new beanstalk environment, some resources naming should be configurable independently from each other with a custom name.
Expected Behavior
For created EC2 instances, S3 Bucket, instance_profile, iam_roles, there should be a configuration that let us custom their name.
Like the s3_bucket_access_log_bucket_name variable.
We could use these to customize our resources naming.
Use Case
We are currently starting to use this module to deploy Beanstalk but we have specifics constraints on naming for our resources :
For EC2 : Product-Component-Environment-Blue_Green
For IAM Roles: Product-Component-Environment-AWS::Region
For S3: Product-Component-Environment-AWS::AccountId-AWS::Region
Since we are doing multi-regions deployments, there are main patterns standards we need to respect to ensure consistent naming of our resources. As you can see they are similar and could be implemented using context module mechanics but not the exact same.
Problem the module use the same naming pattern for these ressources.
For S3 we clearly need account ID in name to avoid conflicts since it's a global resource, same goes for IAM roles but not EC2 name which is specifics to the account.
Describe Ideal Solution
Being able to specify an alternative name to these resources as variable.
For example we could have these variables to specify explicit name:
iam_role_service_name
iam_role_ec2_name
iam_role_policy_default_name
iam_instance_profile_ec2_name
s3_bucket_elb_logs_bucket_name
Or maybe being able to specify a prefix or a global naming convention for each type of resource.
Alternatives Considered
Before opening this feature request I tried to use attributes option and label_order from context module.
Beanstalk env name: product-comp-env-862853942159-eu-west-1
ec2 name: product-comp-env-862853942159-eu-west-1-eb-ec2
ec2 iam instance: product-comp-env-862853942159-eu-west-1-eb-ec2
iam role service: product-comp-env-862853942159-eu-west-1-eb-service
s3 bucket for logs: product-comp-env-862853942159-eu-west-1-eb-loadbalancer-logs
Which allow us at least to respect widely our convention but flood some resources naming with useless information.
Additional Context
S3 limitation to 63 chars for bucket name make it hard to name our Bucket since the module append the -eb-loadbalancer-logs field consuming 21 chars of the 63 available.
This would require another issue I think but since we could replace it with this features it's good information.
I was thinking about using multiple context module to solve this but it's not possible in the end since there is a single one referenced.
The text was updated successfully, but these errors were encountered:
Describe the Feature
When creating a new beanstalk environment, some resources naming should be configurable independently from each other with a custom name.
Expected Behavior
For created EC2 instances, S3 Bucket, instance_profile, iam_roles, there should be a configuration that let us custom their name.
Like the s3_bucket_access_log_bucket_name variable.
We could use these to customize our resources naming.
Use Case
We are currently starting to use this module to deploy Beanstalk but we have specifics constraints on naming for our resources :
For EC2 : Product-Component-Environment-Blue_Green
For IAM Roles: Product-Component-Environment-AWS::Region
For S3: Product-Component-Environment-AWS::AccountId-AWS::Region
Since we are doing multi-regions deployments, there are main patterns standards we need to respect to ensure consistent naming of our resources. As you can see they are similar and could be implemented using context module mechanics but not the exact same.
Problem the module use the same naming pattern for these ressources.
terraform-aws-elastic-beanstalk-environment/main.tf
Line 20 in 2d146af
terraform-aws-elastic-beanstalk-environment/main.tf
Line 77 in 2d146af
terraform-aws-elastic-beanstalk-environment/main.tf
Line 83 in 2d146af
terraform-aws-elastic-beanstalk-environment/main.tf
Line 295 in 2d146af
terraform-aws-elastic-beanstalk-environment/main.tf
Line 932 in 2d146af
For S3 we clearly need account ID in name to avoid conflicts since it's a global resource, same goes for IAM roles but not EC2 name which is specifics to the account.
Describe Ideal Solution
Being able to specify an alternative name to these resources as variable.
For example we could have these variables to specify explicit name:
Or maybe being able to specify a prefix or a global naming convention for each type of resource.
Alternatives Considered
Before opening this feature request I tried to use attributes option and label_order from context module.
var.tfvars
main.tf
Plan give me
Beanstalk env name: product-comp-env-862853942159-eu-west-1
ec2 name: product-comp-env-862853942159-eu-west-1-eb-ec2
ec2 iam instance: product-comp-env-862853942159-eu-west-1-eb-ec2
iam role service: product-comp-env-862853942159-eu-west-1-eb-service
s3 bucket for logs: product-comp-env-862853942159-eu-west-1-eb-loadbalancer-logs
Which allow us at least to respect widely our convention but flood some resources naming with useless information.
Additional Context
S3 limitation to 63 chars for bucket name make it hard to name our Bucket since the module append the -eb-loadbalancer-logs field consuming 21 chars of the 63 available.
This would require another issue I think but since we could replace it with this features it's good information.
I was thinking about using multiple context module to solve this but it's not possible in the end since there is a single one referenced.
The text was updated successfully, but these errors were encountered: