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

resource/ssm_resource_data_sync: Support import #3232

Merged

Conversation

atsushi-ishibashi
Copy link
Contributor

TF_ACC=1 go test ./aws -v -run=TestAccAWSSsmResourceDataSync_import -timeout 120m
=== RUN   TestAccAWSSsmResourceDataSync_import
--- PASS: TestAccAWSSsmResourceDataSync_import (67.45s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	67.480s

@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Feb 1, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service. labels Feb 1, 2018
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

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

Hi @atsushi-ishibashi

This is looking good, thanks!
Just left a comment to discuss before we run tests and merge :)

Thanks!

@@ -15,6 +15,13 @@ func resourceAwsSsmResourceDataSync() *schema.Resource {
Read: resourceAwsSsmResourceDataSyncRead,
Delete: resourceAwsSsmResourceDataSyncDelete,

Importer: &schema.ResourceImporter{
State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
d.Set("name", d.Id())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not reading the name line 103? as in: d.Set("name", syncItem.SyncName)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right! Thank you!

TF_ACC=1 go test ./aws -v -run=TestAccAWSSsmResourceDataSync_import -timeout 120m
=== RUN   TestAccAWSSsmResourceDataSync_import
--- PASS: TestAccAWSSsmResourceDataSync_import (68.67s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	68.710s

@Ninir Ninir added the waiting-response Maintainers are waiting on response from community or contributor. label Feb 1, 2018
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Feb 2, 2018
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

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

Hey @atsushi-ishibashi

This is looking very good, thanks for taking the time to do it! 🚀 👍

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSSsmResourceDataSync_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSsmResourceDataSync_ -timeout 120m
=== RUN   TestAccAWSSsmResourceDataSync_basic
--- PASS: TestAccAWSSsmResourceDataSync_basic (58.74s)
=== RUN   TestAccAWSSsmResourceDataSync_import
--- PASS: TestAccAWSSsmResourceDataSync_import (62.62s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	121.427s

@Ninir Ninir merged commit 7a2e0df into hashicorp:master Feb 2, 2018
Ninir added a commit that referenced this pull request Feb 2, 2018
@radeksimko radeksimko added this to the v1.9.0 milestone Feb 9, 2018
@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 8, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants