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

Support EFS replication overwrite protection values #5114

Closed
1 of 2 tasks
yaronya opened this issue Dec 16, 2023 · 4 comments
Closed
1 of 2 tasks

Support EFS replication overwrite protection values #5114

yaronya opened this issue Dec 16, 2023 · 4 comments
Assignees
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@yaronya
Copy link

yaronya commented Dec 16, 2023

Describe the feature

AWS recently added EFS protection to its API, yet the constant values listed here are not supported in the SDK

Use Case

I wish to add support for this in terraform-provider-aws and prefer to import those values from the SDK

Proposed Solution

Pretty straightforward, add some new constants to api.go

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

1.48.16

Environment details (Version of Go (go version)? OS name and version, etc.)

1.20

@yaronya yaronya added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2023
@yaronya
Copy link
Author

yaronya commented Dec 16, 2023

I'd be happy to open a quick PR, just give me the signal 🙂

@RanVaknin RanVaknin self-assigned this Dec 18, 2023
@RanVaknin
Copy link
Contributor

RanVaknin commented Dec 18, 2023

Hi @yaronya ,

Thanks for reaching out. I can see that this feature was already added a couple of week ago.
https://github.com/aws/aws-sdk-go-v2/blob/27acb6b46ccb55caf3efbfbd19e575dfdfe6cf2a/service/efs/api_op_UpdateFileSystemProtection.go#L51

So you can use this directly via the SDK like so:

v2:

func main() {
	cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-east-1"))
	if err != nil {
		log.Fatalf("unable to load SDK config, %v", err)
	}

	client := efs.NewFromConfig(cfg)

	out, err := client.UpdateFileSystemProtection(context.Background(), &efs.UpdateFileSystemProtectionInput{
		FileSystemId:                   aws.String("foo"),
		ReplicationOverwriteProtection: types.ReplicationOverwriteProtectionEnabled,
	})
	// .. more code
}

v1:

func main() {
	sess, err := session.NewSession(&aws.Config{
		Region: aws.String("us-east-1"),
	})
	if err != nil {
		panic(err)
	}

	client := efs.New(sess)

	out, err := client.UpdateFileSystemProtectionWithContext(context.Background(), &efs.UpdateFileSystemProtectionInput{
		FileSystemId:                   aws.String("foo"),
		ReplicationOverwriteProtection: aws.String(efs.ReplicationOverwriteProtectionEnabled),
	})
}

Can you pull the latest version and give it another try?

Thanks,
Ran~

@RanVaknin RanVaknin added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2023
@yaronya
Copy link
Author

yaronya commented Dec 19, 2023

Hi @RanVaknin
Dunno why I missed it - it's indeed there, my bad 😅

Thanks!

@yaronya yaronya closed this as completed Dec 19, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants