-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(as): [119585998] add new resource (#2814)
* add * add
- Loading branch information
1 parent
365d6e6
commit 4389a82
Showing
16 changed files
with
2,682 additions
and
1,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:new-resource | ||
tencentcloud_as_start_instance_refresh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
185 changes: 185 additions & 0 deletions
185
tencentcloud/services/as/resource_tc_as_start_instance_refresh.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
tencentcloud/services/as/resource_tc_as_start_instance_refresh.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Provides a resource to create as instance refresh | ||
|
||
Example Usage | ||
|
||
```hcl | ||
resource "tencentcloud_as_start_instance_refresh" "example" { | ||
auto_scaling_group_id = "asg-9dn1a5y6" | ||
refresh_mode = "ROLLING_UPDATE_RESET" | ||
refresh_settings { | ||
check_instance_target_health = false | ||
rolling_update_settings { | ||
batch_number = 1 | ||
batch_pause = "AUTOMATIC" | ||
} | ||
} | ||
} | ||
``` |
42 changes: 42 additions & 0 deletions
42
tencentcloud/services/as/resource_tc_as_start_instance_refresh_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package as_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
|
||
tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" | ||
) | ||
|
||
// go test -i; go test -test.run TestAccTencentCloudAsStartInstanceRefreshResource_basic -v | ||
func TestAccTencentCloudAsStartInstanceRefreshResource_basic(t *testing.T) { | ||
t.Parallel() | ||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { | ||
tcacctest.AccPreCheck(t) | ||
}, | ||
Providers: tcacctest.AccProviders, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccAsStartInstanceRefresh, | ||
Check: resource.ComposeTestCheckFunc( | ||
resource.TestCheckResourceAttrSet("tencentcloud_as_start_instance_refresh.example", "id"), | ||
), | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
const testAccAsStartInstanceRefresh = ` | ||
resource "tencentcloud_as_start_instance_refresh" "example" { | ||
auto_scaling_group_id = "asg-2l55y7u7" | ||
refresh_mode = "ROLLING_UPDATE_RESET" | ||
refresh_settings { | ||
check_instance_target_health = false | ||
rolling_update_settings { | ||
batch_number = 1 | ||
batch_pause = "AUTOMATIC" | ||
} | ||
} | ||
} | ||
` |
Oops, something went wrong.