-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnullstone.tf
More file actions
39 lines (32 loc) · 828 Bytes
/
nullstone.tf
File metadata and controls
39 lines (32 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
terraform {
required_providers {
ns = {
source = "nullstone-io/ns"
version = "~> 0.3"
}
}
}
data "ns_workspace" "this" {}
data "ns_connection" "cluster" {
name = "cluster"
type = "cluster/aws-fargate"
}
data "ns_connection" "network" {
name = "network"
type = "network/aws"
via = data.ns_connection.cluster.name
}
data "ns_connection" "postgres" {
name = "postgres"
type = "postgres/aws-rds"
optional = true
}
locals {
db_user_security_group_id = try(data.ns_connection.postgres.outputs.db_user_security_group_id, "")
}
data "aws_ecs_cluster" "cluster" {
cluster_name = data.ns_connection.cluster.outputs.cluster_name
}
data "aws_iam_role" "execution" {
name = data.ns_connection.cluster.outputs.cluster_execution_role_name
}