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 aws_amplify_app resource #15966

Merged
merged 30 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d5fa36e
Add aws_amplify_app resource
k24d Feb 6, 2020
3a88502
Ensure that the number of tags is 0
k24d Feb 7, 2020
c8bd2b3
Add a note why we ignore access_token state
k24d Feb 7, 2020
0bbbcfc
Fixes for 'make website-lint'
k24d Mar 13, 2020
e444048
[FIX] Upgrade to v2
ashishmohite Nov 2, 2020
c60fdeb
Fix linting error
ashishmohite Nov 7, 2020
7a3fca3
Fix documentation linting
ashishmohite Nov 7, 2020
153c411
Add CHANGELOG.
ewbankkit May 18, 2021
5754c4a
r/aws_amplify_app: Standard 'name' and 'tags' handling.
ewbankkit May 18, 2021
4f7eda0
r/aws_amplify_app: Standard attribute handling.
ewbankkit May 19, 2021
bcec1a5
r/aws_amplify_app: Get simple tests working.
ewbankkit May 19, 2021
e638796
Suppress diff for 'basic_auth_credentials' if basic auth isn't enabled.
ewbankkit May 19, 2021
335160c
r/aws_amplify_app: Remove 'name_prefix' as it's not compatible with n…
ewbankkit May 19, 2021
94a9d17
r/aws_amplify_app: ForceNew if 'description' changes to "".
ewbankkit May 19, 2021
407f9fe
r/aws_amplify_app: ForceNew if 'build_spec' changes to "".
ewbankkit May 19, 2021
6bc6406
r/aws_amplify_app: Add test sweeper.
ewbankkit May 20, 2021
9b05180
r/aws_amplify_app: Add '_disappears' test (#15945).
ewbankkit May 20, 2021
f3f3ac0
r/aws_amplify_app: Send empty array to clear 'custom_rule'.
ewbankkit May 20, 2021
4b781c8
r/aws_amplify_app: Send map with empty key and value to clear 'enviro…
ewbankkit May 20, 2021
b418fe7
r/aws_amplify_app: Get branch auto-creation working.
ewbankkit May 20, 2021
76e401e
r/aws_amplify_app: ForceNew if 'iam_service_role_arn' changes to "".
ewbankkit May 20, 2021
f88c0fd
r/aws_amplify_app: Remove 'custom_headers' - Not amenable to IaC.
ewbankkit May 20, 2021
96f76cb
r/aws_amplify_app: Environment variables for 'TestAccAWSAmplifyApp_Re…
ewbankkit May 21, 2021
b964ecf
r/aws_amplify_app: Get all acceptance tests passing.
ewbankkit May 21, 2021
1643971
r/aws_amplify_app: Serialize acceptance tests to limit API rate-limit…
ewbankkit May 21, 2021
dc8b24e
r/aws_amplify_app: Update documentation.
ewbankkit May 21, 2021
769b5ce
Add 'resource_aws_amplify_test.go'.
ewbankkit May 21, 2021
ee538b0
Fix 'terrafmt' errors.
ewbankkit May 21, 2021
ad4df30
Fix 'tfproviderdocs' errors.
ewbankkit May 21, 2021
70526bf
Fix 'tfproviderdocs' errors.
ewbankkit May 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/15966.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_amplify_app
```
5 changes: 5 additions & 0 deletions aws/internal/service/amplify/consts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package amplify

const (
StageNone = "NONE"
)
36 changes: 36 additions & 0 deletions aws/internal/service/amplify/finder/finder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package finder

import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/amplify"
"github.com/hashicorp/aws-sdk-go-base/tfawserr"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func AppByID(conn *amplify.Amplify, id string) (*amplify.App, error) {
input := &amplify.GetAppInput{
AppId: aws.String(id),
}

output, err := conn.GetApp(input)

if tfawserr.ErrCodeEquals(err, amplify.ErrCodeNotFoundException) {
return nil, &resource.NotFoundError{
LastError: err,
LastRequest: input,
}
}

if err != nil {
return nil, err
}

if output == nil || output.App == nil {
return nil, &resource.NotFoundError{
Message: "Empty result",
LastRequest: input,
}
}

return output.App, nil
}
3 changes: 3 additions & 0 deletions aws/internal/service/amplify/lister/list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//go:generate go run ../../../generators/listpages/main.go -function=ListApps github.com/aws/aws-sdk-go/service/amplify

package lister
31 changes: 31 additions & 0 deletions aws/internal/service/amplify/lister/list_pages_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ func Provider() *schema.Provider {
"aws_ami_copy": resourceAwsAmiCopy(),
"aws_ami_from_instance": resourceAwsAmiFromInstance(),
"aws_ami_launch_permission": resourceAwsAmiLaunchPermission(),
"aws_amplify_app": resourceAwsAmplifyApp(),
"aws_api_gateway_account": resourceAwsApiGatewayAccount(),
"aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(),
"aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(),
Expand Down
Loading