Skip to content

Commit

Permalink
add test ErrorChecks; docs
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Apr 16, 2021
1 parent 8aaa01b commit 23adde2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions aws/resource_aws_config_organization_conformance_pack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func testAccConfigOrganizationConformancePack_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -52,6 +53,7 @@ func testAccConfigOrganizationConformancePack_disappears(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand All @@ -74,6 +76,7 @@ func testAccConfigOrganizationConformancePack_excludedAccounts(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -122,6 +125,7 @@ func testAccConfigOrganizationConformancePack_forceNew(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -163,6 +167,7 @@ func testAccConfigOrganizationConformancePack_inputParameters(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -195,6 +200,7 @@ func testAccConfigOrganizationConformancePack_S3Delivery(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -223,6 +229,7 @@ func testAccConfigOrganizationConformancePack_S3Template(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -255,6 +262,7 @@ func testAccConfigOrganizationConformancePack_updateInputParameters(t *testing.T

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -305,6 +313,7 @@ func testAccConfigOrganizationConformancePack_updateS3Delivery(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -342,6 +351,7 @@ func testAccConfigOrganizationConformancePack_updateS3Template(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -374,6 +384,7 @@ func testAccConfigOrganizationConformancePack_updateTemplateBody(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, configservice.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckConfigOrganizationConformancePackDestroy,
Steps: []resource.TestStep{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Manages a Config Organization Conformance Pack. More information can be found in

~> **NOTE:** This resource must be created in the Organization master account or a delegated administrator account, and the Organization must have all features enabled. Every Organization account except those configured in the `excluded_accounts` argument must have a Configuration Recorder with proper IAM permissions before the Organization Conformance Pack will successfully create or update. See also the [`aws_config_configuration_recorder` resource](/docs/providers/aws/r/config_configuration_recorder.html).

## Example Usage with Template Body
## Example Usage

### Using Template Body

```hcl
resource "aws_config_organization_conformance_pack" "example" {
Expand Down Expand Up @@ -46,7 +48,7 @@ resource "aws_organizations_organization" "example" {
}
```

## Example Usage with Template S3 URI
### Using Template S3 URI

```hcl
resource "aws_config_organization_conformance_pack" "example" {
Expand Down Expand Up @@ -102,7 +104,7 @@ The `input_parameter` configuration block supports the following arguments:

## Attributes Reference

In addition to all arguments above (except for `template_body` and `template_s3_uri`), the following attributes are exported:
In addition to all arguments above, the following attributes are exported:

* `arn` - Amazon Resource Name (ARN) of the organization conformance pack.

Expand Down

0 comments on commit 23adde2

Please sign in to comment.