-
Notifications
You must be signed in to change notification settings - Fork 626
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 type to Access applications #1076
Add type to Access applications #1076
Conversation
f0be70b
to
ba3ac88
Compare
CI is green
|
@@ -27,13 +27,11 @@ func resourceCloudflareAccessApplication() *schema.Resource { | |||
"account_id": { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
Computed: true, |
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.
Why is this computed field removed? https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/cloudflare/resource_cloudflare_access_mutual_tls_certificate.go#L28 also uses computed=true with a choice between account_id and zone_id.
Since upgrading to 2.21.0 to 2.22.0 I am unable to render cloudflare_access_application resources. It used to work without account_id and zone_id on the resource, as the account_id is supplied to the provider. This now results in Error: error creating Access resource: zone_id or account_id required
. Supplying either account_id or zone_id explicitly to the resource throws the same error. If you define both account_id and zone_id at the same time it throws the expected errors: Error: "account_id": conflicts with zone_id
and Error: "zone_id": conflicts with account_id
State (notice the empty account_id):
"resources": [
{
"type": "cloudflare_access_application",
"provider_name": "registry.terraform.io/cloudflare/cloudflare",
"schema_version": 0,
"values": {
"account_id": "",
"zone_id": null
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.
please open an issue following the issue template; this PR has already been merged.
Supports the type field for Access applications.
Requires cloudflare/cloudflare-go#646 before this can be merged.