Skip to content

Commit 84b9431

Browse files
authored
Merge pull request #181 from pymonger/main
Updates for deployment via Unity Marketplace
2 parents 7b1538b + b9a4954 commit 84b9431

27 files changed

+277
-80
lines changed

common/aws.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ locals {
22
cost_tags = {
33
ServiceArea = "аds"
44
Proj = "${var.project}"
5-
Venue = "${var.venue_prefix}${var.venue}"
5+
Venue = "${var.deployment_name}-${var.venue}"
66
Component = "${var.component_cost_name}"
77
CreatedBy = "ads"
88
Env = "${var.resource_prefix}"

common/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ variable "venue" {
99
type = string
1010
}
1111

12-
variable "venue_prefix" {
12+
variable "deployment_name" {
1313
description = "Optional string to place before the venue name in resource names"
1414
type = string
1515
default = ""

dev_env/cognito/cognito_client.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ data "aws_cognito_user_pools" "unity_user_pool" {
33
}
44

55
resource "aws_cognito_user_pool_client" "jupyter_cognito_client" {
6-
name = "${var.resource_prefix}-jupyter-${var.venue_prefix}${var.venue}-client"
6+
name = "${var.resource_prefix}-jupyter-${var.deployment_name}-${var.venue}-client"
77
user_pool_id = tolist(data.aws_cognito_user_pools.unity_user_pool.ids)[0]
88

99
callback_urls = var.jupyter_base_url != null ? ["${var.jupyter_base_url}/${var.jupyter_base_path}/hub/oauth_callback"] : null

dev_env/jupyterhub/aws.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.

dev_env/jupyterhub/aws.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
locals {
2+
cost_tags = {
3+
ServiceArea = "аds"
4+
Proj = "${var.project}"
5+
Venue = "${var.deployment_name}-${var.venue}"
6+
Component = "${var.component_cost_name}"
7+
CreatedBy = "ads"
8+
Env = "${var.resource_prefix}"
9+
Stack = "${var.component_cost_name}"
10+
}
11+
}
12+
13+
provider "aws" {
14+
default_tags {
15+
tags = local.cost_tags
16+
}
17+
}

dev_env/jupyterhub/common_variables.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
variable "project" {
2+
description = "The name of the project matching the /unity/<{project>/<venue</project-name SSM parameter"
3+
type = string
4+
default = "unity"
5+
}
6+
7+
variable "venue" {
8+
description = "The name of the unity venue matching the /unity/<project>/<venue>/venue-name SSM parameter"
9+
type = string
10+
}
11+
12+
variable "deployment_name" {
13+
description = "Optional string to place before the venue name in resource names"
14+
type = string
15+
default = ""
16+
}
17+
18+
variable "resource_prefix" {
19+
description = "String used at the beginning of the names for all resources to identify them according to the UADS subsystem"
20+
type = string
21+
default = "uads"
22+
}
23+
24+
variable "efs_identifier" {
25+
description = "EFS file system to connect Jupyter shared storage with"
26+
type = string
27+
# Example value:uads-development-efs-fs"
28+
}
29+
30+
variable "installprefix" {
31+
description = "Installation prefix"
32+
type = string
33+
default = ""
34+
}
35+
36+
variable "tags" {
37+
type = map(string)
38+
}

dev_env/jupyterhub/csi_driver.tf

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ module "ebs_csi_irsa_role" {
2323
"eks_addon" = "ebs-csi"
2424
"terraform" = "true"
2525
}
26+
27+
depends_on = [
28+
module.eks,
29+
null_resource.eks_post_deployment_actions
30+
]
2631
}
2732

2833
resource "aws_eks_addon" "ebs-csi" {
@@ -36,7 +41,11 @@ resource "aws_eks_addon" "ebs-csi" {
3641
"terraform" = "true"
3742
}
3843

39-
depends_on = [ module.eks ]
44+
depends_on = [
45+
module.eks,
46+
module.ebs_csi_irsa_role,
47+
null_resource.eks_post_deployment_actions
48+
]
4049
}
4150

4251
################
@@ -65,6 +74,11 @@ module "efs_csi_irsa_role" {
6574
"eks_addon" = "efs-csi"
6675
"terraform" = "true"
6776
}
77+
78+
depends_on = [
79+
module.eks,
80+
null_resource.eks_post_deployment_actions
81+
]
6882
}
6983

7084
resource "aws_eks_addon" "efs-csi" {
@@ -76,5 +90,9 @@ resource "aws_eks_addon" "efs-csi" {
7690
"terraform" = "true"
7791
}
7892

79-
depends_on = [ module.eks ]
93+
depends_on = [
94+
module.eks,
95+
module.efs_csi_irsa_role,
96+
null_resource.eks_post_deployment_actions
97+
]
8098
}

dev_env/jupyterhub/devenv_variables.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.

dev_env/jupyterhub/devenv_variables.tf

Whitespace-only changes.

0 commit comments

Comments
 (0)