-
Notifications
You must be signed in to change notification settings - Fork 142
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
feat(mutual_authentication): implement mTLS resource #702
Conversation
7e149ef
to
72bbc55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, one question.
{ | ||
ResourceName: "fastly_tls_mutual_authentication.test", | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
// These attributes are not stored on the Fastly API and must be ignored. | ||
ImportStateVerifyIgnore: []string{"cert_bundle"}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Integralist what does this block do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validates that Terraform is able to import the resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah makes sense. Thank you!
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestAccFastlyMTLS_validate(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(just vocalizing my mental model)
- generated key and cert for
<random-prefix>.example.com
domain - creates and checks resource
fastly_tls_mutual_authentication
withname=<random-prefix>
- updates resource and sets
name=<random-prefix>updated
Implements https://developer.fastly.com/reference/api/tls/mutual-tls/authentication/