@@ -44,11 +44,6 @@ resource "spacelift_aws_role" "terraform-stack" {
4444 role_arn = var. aws_role
4545}
4646
47- resource "spacelift_policy_attachment" "ignore-outside-project-root-terraform" {
48- policy_id = spacelift_policy. ignore-outside-project-root . id
49- stack_id = spacelift_stack. terraform-ansible-workflow-terraform . id
50- }
51-
5247resource "spacelift_policy_attachment" "trigger-dependent-stacks-terraform" {
5348 policy_id = spacelift_policy. trigger-dependent-stacks . id
5449 stack_id = spacelift_stack. terraform-ansible-workflow-terraform . id
@@ -59,7 +54,6 @@ resource "spacelift_stack_destructor" "terraform-stack" {
5954 spacelift_environment_variable . ansible_context_id ,
6055 spacelift_environment_variable . aws_region ,
6156 spacelift_aws_role . terraform-stack ,
62- spacelift_policy_attachment . ignore-outside-project-root-terraform ,
6357 spacelift_policy_attachment . trigger-dependent-stacks-terraform ,
6458 ]
6559
@@ -102,28 +96,11 @@ resource "spacelift_aws_role" "ansible-stack" {
10296 role_arn = var. aws_role
10397}
10498
105- resource "spacelift_policy_attachment" "ignore-outside-project-root-ansible" {
106- policy_id = spacelift_policy. ignore-outside-project-root . id
107- stack_id = spacelift_stack. terraform-ansible-workflow-ansible . id
108- }
109-
11099resource "spacelift_policy_attachment" "warn-on-unreachable-hosts-ansible" {
111100 policy_id = spacelift_policy. warn-on-unreachable-hosts . id
112101 stack_id = spacelift_stack. terraform-ansible-workflow-ansible . id
113102}
114103
115- # Ignore outside of project root for current stack
116- data "spacelift_current_stack" "this" {}
117-
118- data "spacelift_stack" "current_stack" {
119- stack_id = data. spacelift_current_stack . this . id
120- }
121-
122- resource "spacelift_policy_attachment" "ignore-outside-project-root-this" {
123- policy_id = spacelift_policy. ignore-outside-project-root . id
124- stack_id = data. spacelift_current_stack . this . id
125- }
126-
127104# Trigger a run in terraform stack
128105
129106resource "spacelift_run" "this" {
@@ -132,6 +109,5 @@ resource "spacelift_run" "this" {
132109 depends_on = [
133110 spacelift_environment_variable . ansible_context_id ,
134111 spacelift_aws_role . ansible-stack ,
135- spacelift_policy_attachment . ignore-outside-project-root-ansible ,
136112 ]
137113}
0 commit comments