aliyun-cli icon indicating copy to clipboard operation
aliyun-cli copied to clipboard

ROS not able to create resources that name contians hyphen

Open Blankll opened this issue 1 year ago • 6 comments

  • Command Format: ROS yaml
  ApiGateway:
    Type: 'ALIYUN::ApiGateway::Group'
    Properties:
      GroupName: !Join [ '-', [ !Ref AppName, 'api-gateway', !Ref AppEnv] ]

execute command to create stack:

 ros CreateStack \
--StackName $STACK_NAME \
--TemplateBody "$(cat ./iac/stack.yml)" \
--Parameters ParameterKey=AppName,ParameterValue=$APP_NAME,ParameterKey=AppEnv,ParameterValue=$APP_ENV

  • Execution Command: resource can create successfully since I can create ApiGateway::Group resource that GroupName contains - through the web console
  • Output: Message: Property error: : Resources.ApiGatewayApi.Properties.ApiName: : Resource [ApiGatewayApi]: xxx-api-gateway-api-dev is invalid. Its length should be 4-50 characters, and should begin with upper or lower case letter or Chinese. Numbers or "_" are included.

Blankll avatar May 10 '24 11:05 Blankll

--TemplateBody="$(cat ./iac/stack.yml)"

这样试下

JacksonTian avatar May 13 '24 03:05 JacksonTian

@JacksonTian ,还是一样的错误

Blankll avatar May 16 '24 15:05 Blankll

看起来是不满足 API 的要求,问题本身不是 CLI 导致的。请修改模版。

JacksonTian avatar Jul 02 '24 03:07 JacksonTian

不是,如果不满足需求,为什么没有validation给出明确的错误?而且这里的错误信息和实际情况也不是一个回事呀 你怎么就吧issue关了呢? 如果是模版问题我也给出sample了那么修改建议是什么呢?

plus:我等了两个月你就给这么个敷衍的回复?

@JacksonTian

Blankll avatar Jul 03 '24 11:07 Blankll

@Blankll 这个报错背后的校验逻辑不是 cli 提供的,是背后的 ROS 的。业务层面的问题,工具层面修复不了,这是关 issue 的原因。不过如果还有任何疑问,我们都可以 re-open。

您可以在工单系统提交该问题,带上相关的 Request ID,会有专人来跟进你的问题。

JacksonTian avatar Jul 12 '24 13:07 JacksonTian

@Blankll 这是ApiGateway分组名称规则允许范围扩大,但ROS未对齐导致。我们本周四会发布解决此问题,感谢反馈!

Prodesire avatar Jul 15 '24 01:07 Prodesire

Hi @Prodesire 我想问一下fix是否已经release了?

Blankll avatar Sep 10 '24 14:09 Blankll

Hi @Prodesire 我想问一下fix是否已经release了?

已经发布了,请再试试

image

Prodesire avatar Sep 13 '24 02:09 Prodesire

确认已修复,感谢🙏

Blankll avatar Sep 19 '24 13:09 Blankll