Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support target when running terraform plan and apply #102

Closed
kmanning opened this issue Sep 3, 2019 · 1 comment · Fixed by #229
Closed

Support target when running terraform plan and apply #102

kmanning opened this issue Sep 3, 2019 · 1 comment · Fixed by #229
Labels
enhancement New feature or request
Milestone

Comments

@kmanning
Copy link
Collaborator

kmanning commented Sep 3, 2019

  • Support the ability to run apply on selective resource targets
@kmanning
Copy link
Collaborator Author

Sample Code:

// Jenkinsfile
@Library(['terraform-pipeline']) _

Jenkinsfile.init(this, env)
TargetPlugin.init() // Optionally limit plan/apply to specific targets

def validate = new TerraformValidateStage()

def deployQA = new TerraformEnvironmentStage('qa')
def deployUat = new TerraformEnvironmentStage('uat')
def deployProd = new TerraformEnvironmentStage('prod')

// Pipeline can now be built with "Build with Parameters"
//     New 'target' option in parameter list can limit plan/apply to specific targets
//     By default, builds should skip the 'target' option, and build as-normal
validate.then(deployQa)
        .then(deployUat)
        .then(deployProd)
        .build()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant