Terraspace Restricting Allowed Stacks for Specific Environments: Only Allow route53 to deploy Example 
            
        Terraspace Restricting Allowed Stacks for Specific Environments: Only Allow route53 to deploy Example
January 23, 2022
        
      Covers how to allow and deny specific stacks for specific environments. Good examples are route53 and ACM certs for CloudFront.
For the example, let's say you have these stacks:
$ terraspace list
app/stacks/route53
app/stacks/stack1
app/stacks/stack2
If might only want to allow the route53 stack to deploy when TS_ENV=global
TS_ENV=global terraspace up route53
And the stack1 and stack2 stacks, is allowed to be deploy for other TS_ENV environments.
TS_ENV=dev terraspace up stack1
TS_ENV=dev terraspace up stack2
TS_ENV=prod terraspace up stack1
TS_ENV=prod terraspace up stack2
We'll show you how to achieve this with
config/app.rb
config/app.rb
Terraspace.configure do |config|
  config.allow.stacks = ["stack1"]
  # config.deny.stacks = ["stack2"]
end
Interestingly, configuring config.allow.stacks and config.deny.stacks will be respected by terraspace all. So you don't have to do more configurations, Terraspace is smart enough to figure it out automatically.
Related Links
- Terraspace Docs: Terraspace Config Restricting Stacks
 - GitHub Repo: boltops-learn/terraspace-restricting-stacks
 
    
      AWS Console Guides
      
      
    
    
      
        3h 41m
      
    
  
  
        3h 41m
      
    
    
      Terraform Fundamentals 101
      
      
    
    
      
        1h 36m
      
    
  
  
        1h 36m
      
    
    
      Terraform AWS
      
      
    
    
      
        2h 4m
      
    
  
  
        2h 4m
      
    
    
      Terraform HCL Fundamentals
      
      
    
    
      
        1h 53m
      
    
  
  
        1h 53m
      
    
    
      Terraspace Fundamentals
      
      
    
    
      
        2h 30m
      
    
  
  
        2h 30m
      
    
    
      Terraspace Cloud
      
      
    
    
      
        2h 33m
      
    
  
  
        2h 33m
      
    
    
      Terraspace AWS Cloud
      
      
    
    
      
        1h 43m
      
    
  
  
        1h 43m
      
    
    
      AWS EKS Kubernetes
      
      
    
    
      
        4h 13m
      
    
  
  
        4h 13m
      
    Get full access to these great resources
All for less than the price of coffee a day
44 courses
        286 lessons
        46+ hours