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

Enable cross-region deploy in CodePipeline #8444

Closed
JWasdin opened this issue Apr 25, 2019 · 2 comments
Closed

Enable cross-region deploy in CodePipeline #8444

JWasdin opened this issue Apr 25, 2019 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope.

Comments

@JWasdin
Copy link

JWasdin commented Apr 25, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

CodePipelines allows for cross-region deploys but this cannot be set via Terraform. My use case is initiating a deploy stage from a CodePipeline in us-east-2 to an ECS Fargate cluster in us-east-1.

In the AWS CodePipeline docs, Add a Cross-Region Action in CodePipeline, the region can be set programatically in CloudFormation JSON:

 {
                "name": "Deploy",
                "actions": [
                    {
                        "inputArtifacts": [
                            {
                                "name": "SourceArtifact"
                            }
                        ],
                        "name": "Deploy",
                        "region": "RegionB",
                        "actionTypeId": {
                            "category": "Deploy",
                            "owner": "AWS",
                            "version": "1",
                            "provider": "CodeDeploy"
                        },
                        "outputArtifacts": [],
                        "configuration": {
                            "ApplicationName": "name",
                            "DeploymentGroupName": "name"
                        },
                        "runOrder": 1
                    }

However, the current aws_codepipeline resource documentation, does not have an argument reference for region.

This is not a blocking issue as it can easily be remedied in the console. Even so, it would be nice to have the ability to set region for cross-region deploys within the code itself.

New or Affected Resource(s)

  • aws_codepipeline

Potential Terraform Configuration

  stage {
    name = "Deploy_Stage"

    action {
      name            = "Deploy_In_Another_Region"
      category        = "Deploy"
      owner           = "AWS"
      provider        = "ECS"
      input_artifacts = ["input_artifact"]
      version         = "1"
      region          = "us-east-1" 

      configuration {
        ClusterName = "${data.terraform_remote_state.other_region.cluster_name}"
        FileName    = "imagedefinitions.json"
        ServiceName = "${data.terraform_remote_state.other_region.service_name}"
      }
    }
  }

References

@JWasdin JWasdin added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 25, 2019
@JWasdin
Copy link
Author

JWasdin commented Apr 25, 2019

Closing due to similarities to #6871

@JWasdin JWasdin closed this as completed Apr 25, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

No branches or pull requests

1 participant