mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
feat(AWS HTTP API): Deprecate provider.httpApi.useProviderTags
This commit is contained in:
parent
afc0955093
commit
650ed37db3
@ -38,6 +38,14 @@ Note:
|
||||
- The `serverless.yml` setting is ineffective for deprecations reported before the configuration is read.
|
||||
- `SLS_DEPRECATION_DISABLE` and `disabledDeprecations` remain respected, and no errors will be thrown for mentioned deprecation codes.
|
||||
|
||||
<a name="AWS_HTTP_API_USE_PROVIDER_TAGS_PROPERTY"><div> </div></a>
|
||||
|
||||
## Ineffective property `provider.httpApi.useProviderTags`
|
||||
|
||||
Deprecation code: `AWS_HTTP_API_USE_PROVIDER_TAGS_PROPERTY`
|
||||
|
||||
Starting with "v3.0.0", property `provider.httpApi.useProviderTags` is no longer effective as provider tags are applied to Http Api Gateway by default. You can safely remove this property from your configuration.
|
||||
|
||||
<a name="S3_TRANSFER_ACCELERATION_ON_EXISTING_BUCKET"><div> </div></a>
|
||||
|
||||
## Attempt to enable S3 Transfer Acceleration on provided S3 buckets
|
||||
|
||||
@ -43,6 +43,17 @@ class HttpApiEvents {
|
||||
serverless.httpApiEventsPlugin = this;
|
||||
|
||||
this.hooks = {
|
||||
'initialize': () => {
|
||||
if (
|
||||
this.serverless.service.provider.name === 'aws' &&
|
||||
_.get(this.serverless.service.provider.httpApi, 'useProviderTags')
|
||||
) {
|
||||
this.serverless._logDeprecation(
|
||||
'AWS_HTTP_API_USE_PROVIDER_TAGS_PROPERTY',
|
||||
'Property "provider.httpApi.useProviderTags" is no longer effective as provider tags are applied to Http Api Gateway by default. You can safely remove this property from your configuration.'
|
||||
);
|
||||
}
|
||||
},
|
||||
'package:compileEvents': () => {
|
||||
this.resolveConfiguration();
|
||||
if (!this.config.routes.size) return;
|
||||
|
||||
@ -1188,4 +1188,23 @@ describe('lib/plugins/aws/package/compile/events/httpApi.test.js', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should trigger a deprecation when `provider.httpApi.useProviderTags` is set', async () => {
|
||||
await expect(
|
||||
runServerless({
|
||||
fixture: 'httpApi',
|
||||
configExt: {
|
||||
provider: {
|
||||
httpApi: {
|
||||
useProviderTags: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
command: 'package',
|
||||
})
|
||||
).to.eventually.be.rejected.and.have.property(
|
||||
'code',
|
||||
'REJECTED_DEPRECATION_AWS_HTTP_API_USE_PROVIDER_TAGS_PROPERTY'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user