Skip to content

[Enhancement]: add beforeEntry & onSuccess & onFailure attributes for codepipeline #40454

Open
@chaaben-axa

Description

Description

In order to control the codepipeline stages behavior, codepipeline provides 3 attributes: onFailure, onSuccess, beforeEntry.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

stage {
    name = "Source"

    action {
      name             = "Source"
      category         = "Source"
      owner            = "AWS"
      provider         = "CodeStarSourceConnection"
      version          = "1"
      output_artifacts = ["source_output"]

      configuration = {
        ConnectionArn    = aws_codestarconnections_connection.example.arn
        FullRepositoryId = "my-organization/example"
        BranchName       = "main"
      }
    }
    on_failure {
      result= 'ROLLBACK'|'FAIL'
      condition {
      result= 'ROLLBACK'|'FAIL'
      rule {
        name=string
        ruleTypeId {
          category=Rule
          owner=AWS
          provider=string
          version=string
        }
        configuration={
          string=string
        }
        inputArtifacts=[
        {
          name=string
        }
        ]
        roleArn=string
        region=string
        timeoutInMinutes: 123
        }
      }
    }
  }

References

here the full documentation: https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html
https://boto3.amazonaws.com/v1/documentation/api/1.35.6/reference/services/codepipeline/client/create_pipeline.html
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/codepipeline/codepipeline.go#L129

Would you like to implement a fix?

None

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/codepipelineIssues and PRs that pertain to the codepipeline service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions