-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Region config for S3DeployAction #7012
Comments
Hey @handk85 , how are you referencing this bucket created by the CF action and used in |
Yes, I am using |
Then you need to import the Bucket with |
Any progress on this one? |
Any updates on this? :) I would also like to specify the bucket region, cause my pipeline is in eu-west-2 and my bucket is in us-east-1. Since it can be done manually from the GUI, I'm guessing there's a way to be done from CDK as well. |
@adrian-hincu yes. We're very close to finalizing this in #8280 . Then, you would be able to do: const myBucket = s3.Bucket.fromBucketAttributes(this, 'Bucket', {
bucketName: 'my-bucket',
region: 'my-region',
}); And when you used that Bucket in the deploy Action, it would correctly set its region to |
Add the `account` and `region` properties to the `IResource` interface and `Resource` class. By default, these are equal to the account and region of the Stack the resource belongs to; however, they can be set to different values in resources that are imported. Use those new properties in two places: * In CodePipeline, to determine whether a given action is cross-account (with support for specifying the account and region in S3's `BucketAttributes`, as a first use case). * IAM's `addToPrincipalOrResource()`, to correctly know when to modify the receiver's resource policy. This is aided by adding an optional `principalAccount` property to `IPrincipal`, as a way to compare to the account present in the passed `IResource` instance. Fixes #2807 Fixes #5740 Fixes #7012 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@skinny85, was this just released in 1.61.0? :) |
In |
Trying to pass |
Yes. The Bucket for artifacts must be in the same region as the pipeline itself. This issue is about S3DeployAction. |
Please add
region
configuration in S3DeployAction for cross-region deployment.Use Case
I have a pipeline that supports cross-region deployment in us-west-2. A deployment stage of my pipeline looks like:
I can set
region
for CloudFormationCreateUpdateStackAction, so it can support cross region deployment. However, S3DeployAction does not haveregion
config in S3DeployActionProps. The target S3 bucket is created by the us-east-1 CF action above and the bucket is located in us-east-1. Therefore, S3DeployAction fails with the below message in console:I manually changed the region of the action in the console to resolve the problem.
Proposed Solution
It would be great if you can add
region
to S3DeployActionProps and support cross-region deployment for S3DeployAction.Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: