You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/07/15 14:34:16 UTC

[incubator-dlab] branch DLAB-terraform updated: [DLAB-792]: refactored DLab terraform

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-terraform
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-terraform by this push:
     new 0200cad  [DLAB-792]: refactored DLab terraform
0200cad is described below

commit 0200cad22f1084394501f2728cc050d1fb7a88b2
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Mon Jul 15 17:34:07 2019 +0300

    [DLAB-792]: refactored DLab terraform
---
 infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf | 4 ++--
 infrastructure-provisioning/terraform/bin/terraform-cli.py     | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf
index 3500486..d4b7202 100644
--- a/infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf
+++ b/infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf
@@ -26,12 +26,12 @@ locals {
 }
 
 data "template_file" "endpoint_policy" {
-  template = file("../modules/endpoint/files/endpoint-policy.json")
+  template = file("./files/endpoint-policy.json")
 }
 
 resource "aws_iam_role" "endpoint_role" {
   name               = local.role_name
-  assume_role_policy = file("../modules/endpoint/files/assume-policy.json")
+  assume_role_policy = file("./files/assume-policy.json")
   tags = {
     product = "${var.product}"
     Name = "${local.role_name}"
diff --git a/infrastructure-provisioning/terraform/bin/terraform-cli.py b/infrastructure-provisioning/terraform/bin/terraform-cli.py
index e136b4e..8bafad5 100755
--- a/infrastructure-provisioning/terraform/bin/terraform-cli.py
+++ b/infrastructure-provisioning/terraform/bin/terraform-cli.py
@@ -371,12 +371,14 @@ class AWSK8sSourceBuilder(AbstractDeployBuilder):
     def copy_terraform_to_remote(self):
         args = self.parse_args()
         tf_dir = os.path.abspath(os.path.join(os.getcwd(), os.path.pardir))
-        source = os.path.join(tf_dir, 'aws/ss-helm-charts')
+        source = os.path.join(tf_dir, 'aws/ssn-helm-charts')
         user_name = args.get('terraform_args').get('os_user')
         put(source, '/home/{}/terraform/'.format(user_name))
 
     def run_remote_terraform(self):
-        run('terraform apply')
+        with cd('terraform/ssn-helm-charts/'):
+            run('terraform init')
+            run('terraform apply')
 
     def deploy(self):
         self.check_k8s_cluster_status()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org