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

add edas_k8s_application. #2729

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

Heleninsa
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Aug 14, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

if response.Code != 200 {
return WrapError(Error("Create k8s application failed for " + response.Message))
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d.setId 是不是应该放到response.code的下面

}
if d.Get("package_type") == "Image" {
d.Set("image_url", response.ImageInfo.ImageUrl)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确定其他schema中的参数,describe方法没有返回值
package_type 为FatJar, War时,属性不写入state文件吗

Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"application_name": name,
"replicas": "1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package_type和image_url也需要check

"application_name": CHECKSET,
"replicas": "1",
"image_url": CHECKSET,
}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

"replicas": CHECKSET,
"package_type": CHECKSET,
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

application_name,replicas,package_type checkset 可以去掉吧

@@ -31,7 +31,7 @@ func resourceAlicloudEdasK8sCluster() *schema.Resource {
"namespace_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么要修改

Create an EDAS k8s application.

-> **NOTE:** Available in 1.92.0+

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

版本号改为新版本

Basic Usage

```
resource "alicloud_edas_k8s_application" "default" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加terraform

* `replicas` - Number of application instances.
* `package_type` - Application package type. Optional parameter values include: FatJar, WAR and Image.
* `image_url` - Mirror address. When the package_type is set to 'Image', this parameter item is available.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里写出参和id


```
$ terraform import alicloud_edas_k8s_application.new_k8s_application application_id
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new_k8s_application和文档保持一致写default,id用字母数字星号组合

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants