update defaults

This commit is contained in:
a@a.ru 2019-04-24 14:30:29 +03:00
parent 74c2eefb19
commit f834c93eb6
4 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ resource "aws_launch_configuration" "explorer" {
}
{% for key, value in chain_custom_environment.iteritems() %}
{% if value['USE_PLACEMENT_GROUP'] == "true" %}
{% if value['USE_PLACEMENT_GROUP']|default('true') == "true" %}
resource "aws_placement_group" "explorer-{{key}}" {
name = "${var.prefix}-{{key}}-explorer-pg"
strategy = "cluster"
@ -54,7 +54,7 @@ resource "aws_autoscaling_group" "explorer-{{key}}" {
max_size = "4"
min_size = "1"
desired_capacity = "1"
{% if value['USE_PLACEMENT_GROUP'] == "true" %} placement_group = "${var.prefix}-{{key}}-explorer-pg" {% endif %}
{% if value['USE_PLACEMENT_GROUP']|default('true') == "true" %} placement_group = "${var.prefix}-{{key}}-explorer-pg" {% endif %}
launch_configuration = "${aws_launch_configuration.explorer.name}"
vpc_zone_identifier = ["${aws_subnet.default.id}"]
availability_zones = ["${data.aws_availability_zones.available.names}"]

View File

@ -63,7 +63,7 @@ resource "aws_alb_listener" "alb_listener{{loop.index-1}}" {
load_balancer_arn = "${aws_lb.explorer.*.arn[{{loop.index-1}}]}"
port = "${lookup(var.use_ssl,element(var.chains,{{loop.index-1}})) ? "443" : "80" }"
protocol = "${lookup(var.use_ssl,element(var.chains,{{loop.index-1}})) ? "HTTPS" : "HTTP" }"
{% if value['ECTO_USE_SSL'] == "true" %}
{% if value['ECTO_USE_SSL']|default('false') == "true" %}
ssl_policy = "${lookup(var.alb_ssl_policy,element(var.chains,{{loop.index-1}}))}"
certificate_arn = "${lookup(var.alb_certificate_arn,element(var.chains,{{loop.index-1}}))}"
{% endif %}

View File

@ -10,19 +10,19 @@ root_block_size = "{{ root_block_size }}"
pool_size = {
{% for key, value in chain_custom_environment.iteritems() %}
{{ key }}="{{ value['POOL_SIZE'] }}"{% if not loop.last %},{% endif %}
{{ key }}="{{ value['POOL_SIZE']|default('30') }}"{% if not loop.last %},{% endif %}
{% endfor %}
}
secret_key_base = {
{% for key, value in chain_custom_environment.iteritems() %}
{{ key }}="{{ value['SECRET_KEY_BASE'] }}"{% if not loop.last %},{% endif %}
{{ key }}="{{ value['SECRET_KEY_BASE']|default('TPGMvGK0iIwlXBQuQDA5KRqk77VETbEBlG4gAWeb93TvBsYAjvoAvdODMd6ZeguPwf2YTRY3n7uvxXzQP4WayQ==') }}"{% if not loop.last %},{% endif %}
{% endfor %}
}
use_ssl = {
{% for key, value in chain_custom_environment.iteritems() %}
{{ key }}="{{ value['ECTO_USE_SSL'] }}"{% if not loop.last %},{% endif %}
{{ key }}="{{ value['ECTO_USE_SSL']|default('false') }}"{% if not loop.last %},{% endif %}
{% endfor %}
}

View File

@ -175,7 +175,7 @@
- name: Upload output
debug:
msg: "If deployment will fail, you can try to deploy blockscout manually using the following commands: {{ push_output.stdout_lines }}"
msg: "If deployment will fail, you can try to deploy blockscout manually using the following commands: {{ 'AWS_ACCESS_KEY=XXXXXXXXXXXXXX AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXX AWS_DEFAULT_REGION='~aws_region if aws_profile is undefined else '' }} {{ push_output.stdout_lines }} {{ '--profile='~aws_profile if aws_profile is defined else '' }}"
- name: User prompt
pause: