eotk: deploy new module
This commit is contained in:
parent
e30733e0cd
commit
b742bccbfa
1 changed files with 15 additions and 26 deletions
|
@ -23,39 +23,28 @@ class EotkAutomation(BaseAutomation):
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
access_key = "{{ aws_access_key }}"
|
access_key = "{{ aws_access_key }}"
|
||||||
secret_key = "{{ aws_secret_key }}"
|
secret_key = "{{ aws_secret_key }}"
|
||||||
region = "us-east-1"
|
region = "us-east-2"
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "aws" {
|
||||||
|
access_key = "{{ aws_access_key }}"
|
||||||
|
secret_key = "{{ aws_secret_key }}"
|
||||||
|
region = "eu-central-1"
|
||||||
|
alias = "second_region"
|
||||||
}
|
}
|
||||||
|
|
||||||
{% for group in groups %}
|
{% for group in groups %}
|
||||||
module "label_{{ group.id }}" {
|
module "eotk_{{ group.id }}" {
|
||||||
source = "cloudposse/label/null"
|
providers = {
|
||||||
version = "0.25.0"
|
aws = aws,
|
||||||
|
aws.second_region = aws.second_region
|
||||||
|
}
|
||||||
|
source = "sr2c/eotk/aws"
|
||||||
namespace = "{{ global_namespace }}"
|
namespace = "{{ global_namespace }}"
|
||||||
tenant = "{{ group.group_name }}"
|
tenant = "{{ group.group_name }}"
|
||||||
|
name = "eotk"
|
||||||
label_order = ["namespace", "tenant", "name", "attributes"]
|
label_order = ["namespace", "tenant", "name", "attributes"]
|
||||||
}
|
}
|
||||||
|
|
||||||
module "bucket_{{ group.id }}" {
|
|
||||||
source = "cloudposse/s3-bucket/aws"
|
|
||||||
version = "0.49.0"
|
|
||||||
acl = "private"
|
|
||||||
enabled = true
|
|
||||||
user_enabled = true
|
|
||||||
versioning_enabled = false
|
|
||||||
allowed_bucket_actions = [
|
|
||||||
"s3:GetObject",
|
|
||||||
"s3:PutObject",
|
|
||||||
"s3:ListBucket",
|
|
||||||
"s3:GetBucketLocation"
|
|
||||||
]
|
|
||||||
context = module.label_{{ group.id }}.context
|
|
||||||
name = "logs"
|
|
||||||
attributes = ["eotk"]
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_sns_topic" "alarms_{{ group.id }}" {
|
|
||||||
name = "${module.label_{{ group.id }}.id}-eotk-alarms"
|
|
||||||
}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue