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

chore(secrets): bump semanticVersion for aws-cn #30201

Merged
merged 3 commits into from
May 17, 2024

Conversation

pahud
Copy link
Contributor

@pahud pahud commented May 15, 2024

Issue # (if applicable)

Similar to #28733 , this PR bumps the default version for aws-cn partition ro 1.1.237 as the current version comes with deprecated lambda python runtime.

aws --profile bjs serverlessrepo get-application --application-id arn:aws-cn:serverlessrepo:cn-north-1:193023089310:applications/SecretsManagerRDSPostgreSQLRotationSingleUser --query Version.SemanticVersion --output text
1.1.237

I was evaluating a fix for #30200 but unfortunately that would require a lot of refactor so I am opening this tiny PR to get it bumped.

internal tracking: P128811127

Closes #.

Reason for this change

Description of changes

Description of how you validated changes

Checklist

How to find the serverless applicationId and semanticVersion

  1. Go to the serverlessrepo console and search SecretsManagerRDSPostgreSQLRotationSingleUser. Make sure to check Show apps that create custom IAM roles or resource policies
image
  1. Click into the application
  2. Find the applicationId from the URL. For example, in us-east-1 the id is
    arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser
  3. Find out the semanticVersion using AWS CLI:
$ appid='arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser'
$ aws serverlessrepo get-application --application-id $appid --query Version.SemanticVersion --output text

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team May 15, 2024 03:20
@github-actions github-actions bot added the p2 label May 15, 2024
@pahud pahud added p1 and removed p2 labels May 15, 2024
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 15, 2024
@pahud pahud added effort/small Small work item – less than a day of effort @aws-cdk/aws-secretsmanager Related to AWS Secrets Manager and removed contribution/core This is a PR that came from AWS. labels May 15, 2024
@pahud pahud marked this pull request as ready for review May 15, 2024 03:21
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 15, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 15, 2024
@rstevens011
Copy link

I would recommend bumping the GovCloud version string as well while you’re at it.

@pahud
Copy link
Contributor Author

pahud commented May 15, 2024

Before the PR being merged, you have two workarounds:

Given:

const app = new App();

const stack = new Stack(app, 'demo-stack');

const vpc = new ec2.Vpc(stack, 'Vpc', { natGateways: 1 });
const instance = new rds.DatabaseInstance(stack, 'Instance', {
  vpc,
  engine: rds.DatabaseInstanceEngine.MARIADB,
});

OPTION 1:

// option 1: override by escape hatches
const cfnapp = instance.node.tryFindChild('rotationMulti') as sam.CfnApplication
const cfnmapping = cfnapp.node.tryFindChild('SARMapping') as CfnMapping
cfnmapping.setValue('aws-cn', 'semanticVersion', '1.1.237');

OPTION 2:

class MyAspect implements IAspect {
  public visit(node: IConstruct): void {
    if (node instanceof CfnMapping && node.node.id === 'SARMapping') {
      node.setValue('aws-cn', 'semanticVersion', '1.1.237');
    }
  }
}
Aspects.of(instance).add(new MyAspect());

On cdk synth, you will override the semanticVersion of the mapping:

    aws-cn:
      applicationId: arn:aws-cn:serverlessrepo:cn-north-1:193023089310:applications/SecretsManagerRDSMariaDBRotationMultiUser
      semanticVersion: 1.1.237

@pahud
Copy link
Contributor Author

pahud commented May 15, 2024

@rstevens011

Can I check current version of GovCloud without having an account on it?

Copy link
Contributor

mergify bot commented May 17, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 17, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 2a97ea7
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit dca7efe into aws:main May 17, 2024
12 checks passed
Copy link
Contributor

mergify bot commented May 17, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

atanaspam pushed a commit to atanaspam/aws-cdk that referenced this pull request Jun 3, 2024
### Issue # (if applicable)

Similar to aws#28733 , this PR bumps the default version for aws-cn partition ro `1.1.237` as the current version comes with deprecated lambda python runtime.

```
aws --profile bjs serverlessrepo get-application --application-id arn:aws-cn:serverlessrepo:cn-north-1:193023089310:applications/SecretsManagerRDSPostgreSQLRotationSingleUser --query Version.SemanticVersion --output text
1.1.237
```

I was evaluating a fix for aws#30200 but unfortunately that would require a lot of refactor so I am opening this tiny PR to get it bumped.

internal tracking: P128811127





Closes #<issue number here>.

### Reason for this change



### Description of changes



### Description of how you validated changes



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

### How to find the serverless `applicationId` and `semanticVersion`
1. Go to the serverlessrepo console and search `SecretsManagerRDSPostgreSQLRotationSingleUser`. Make sure to check `Show apps that create custom IAM roles or resource policies`

<img width="434" alt="image" src="https://github.com/aws/aws-cdk/assets/278432/f3fbd9e8-64b0-4c84-b877-dc5bdef1e9f8">


2. Click into the application
3. Find the `applicationId` from the URL. For example, in `us-east-1` the id is
`arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser`
4. Find out the semanticVersion using AWS CLI:

```sh
$ appid='arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser'
$ aws serverlessrepo get-application --application-id $appid --query Version.SemanticVersion --output text
```
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@pahud pahud added the bug This issue is a bug. label Jun 12, 2024
@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-secretsmanager Related to AWS Secrets Manager bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants