-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resource & DataSource: azurerm_healthcare_service #4221
Conversation
have been performed using the Azure SDK for Go and the fiunctionality added to the functions in resource_arm_fhir_api_service. DEVOPS-1201
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.
Thanks for the pr @kutsovmqs,
I wonder if this resource would be better named azurerm_healthcare_service
? the kind property indicates it might support other types then FHIR eventually.
Hi @katbyte, thank you for your comment and updates, and sorry we didn't put a description of what this PR is. I can see we need to resolve some conflicts, and I have a couple of questions, if you have the time. Also, this is our first adventure into extending the Azure Provider, so please don't hesitate to let us know what else we may need to do. If it helps, I am on the Terraform-Azure Slack channel. You are correct about the general aspect of the healthcare services client vs. being FHIR specific. Since this is still in preview mode, there hasn't been a lot of information released as to what other kinds of services (and their requirements) will be offered. Since our organization is primarily interested in the FHIR API, we made our changes with this in mind. We will rename the resources, and do you think we need to do anything else in that regard? At least for now? Also, the Azure healthcare apis package is still in preview mode, and is projected to be released this quarter (2019Q3). We do not know what, if any, changes will be made. Is it better to wait until the formal Azure release, or can we look to merge this now and update it afterwards? Thank you so much, |
…rovider-azurerm into fhir-api-rm-tests
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.
Hi @kutsovmqs,
Thank you for the revisions. This is looking pretty good now. I've left some more comments inline with the biggest change being the switch to use TypeSet
s. Sorry i missed that earlier, this change is so that if a user rearranges the items it won't trigger a plan.
|
||
func TestAccAzureRMDataSourceHealthcareService(t *testing.T) { | ||
dataSourceName := "data.azurerm_healthcare_service.test" | ||
ri := acctest.RandIntRange(10000, 99999) |
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.
I think testacc19101706384399625
is 24 characters 🤔
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
ValidateFunc: validate.NoEmptyStrings, | ||
}, |
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.
Type int shouldn't have Elem
set?
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.
Removed.
* `cosmosdb_offer_throughput` - The provisioned throughput for the backing database. Range of `400`-`1000`. Defaults to `400`. | ||
* `tags` - A mapping of tags to assign to the resource. | ||
|
||
Authentication Configuration |
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.
Could we use the same pattern here as the rest of the provider docs? ie:
* `identity` - An `identity` block as defined below, which contains the Managed Service Identity information for this App Service.
---
A `identity` block exports the following:
* `principal_id` - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service.
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.
The resource documentation has been updated with this suggestion and more.
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Co-Authored-By: kt <[email protected]>
Some typing changes to TypeSet. Minor refactoring. Documentation updates.
Hi @katbyte, thank you for the review. We've made some more changes to accommodate almost all of your requests and suggestions. There is one request for capitalization that we can not accommodate, and that is mentioned above. Also, could you please expand on your comments regarding the random int. All acceptance tests pass with the code as it is now. We'd love to get this into 1.36, and I'll be available to work on any additional requests. I am on the Azure Provider Slack channel (MedalLance) if you'd like to chat. Thank you very much. |
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.
Thanks for the revisions @kutsovmqs,
Not to much left now, look forward to getting this merged once the comments i've left inline are addressed.
A `cors_configuration` exports the following: | ||
|
||
* `allow_credentials` - (Boolean) If credentials are allowed via CORS. | ||
* `allowed_headers` - A set of headers allowed via CORS. | ||
* `allowed_methods` - The methods allowed via CORS. | ||
* `allowed_origins` - A set of origins allowed via CORS. | ||
* `max_age_in_seconds` - The max age allowed via CORS. |
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.
as these are set above we don't need to add them to the list of exported properties
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.
Removed
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The name of the service instance. Used for service endpoint, must be unique within the audience and can contain only lowercase letters, numbers and the '-' character. |
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.
We usually don't detail the valid names here, instead we catch them with validation functions.
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.
Removed
* `access_policy_object_ids` - A set of Azure object id's that are allowed to access the Service. | ||
* `authentication_configuration` - An `authentication_configuration` block as defined below. | ||
* `cors_configuration` - A `cors_configuration` object as defined below. | ||
* `cosmosdb_throughput` - The provisioned throughput for the backing database. | ||
* `kind` - The kind or type of Healthcare Service defined. | ||
* `location` - The Azure Region where the Service should was created. | ||
* `name` - The account name of the Service. | ||
* `resource_group_name` - The resource group in which the Service was created. | ||
* `tags` - The mapping of tags to assigned to the resource. | ||
|
||
--- | ||
An `authentication_configuration` exports the following: | ||
|
||
* `audience` - The audience that receives authentication tokens for the service. | ||
* `authority` - The Azure Active Directory (tenant) that serves as the authentication authority to access the service. | ||
* `smart_proxy_enabled` - (Boolean) If the 'SMART on FHIR' option is enabled for mobile and web implementations. |
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.
These are all assignable and above so we don't need to relist them here
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.
Removed
|
||
~> **Please Note**: Not all locations support this resource. Some are `West US 2`, `North Central US`, and `UK West`. | ||
|
||
* `kind` - The type of the service. i.e.: "fhir", "fhir-Stu3" and "fhir-R4". |
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.
We don't usually list possible types in the dat source
* `kind` - The type of the service. i.e.: "fhir", "fhir-Stu3" and "fhir-R4". | |
* `kind` - The type of the service. i.e. |
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.
Removed in commit
* `tags` - A mapping of tags to assign to the resource. | ||
|
||
Authentication Configuration | ||
|
||
* `authority` - The Azure Active Directory (tenant) that serves as the authentication authority to access the service. | ||
* `audience` - The intended audience to receive authentication tokens for the service.. | ||
* `smart_proxy_enabled` - Enabled status of the 'SMART on FHIR' option for mobile and web implementations. | ||
|
||
CORS Configuration | ||
|
||
* `allowed_origins` - The origins to be allowed via CORS. | ||
* `allowed_headers` - The headers to be allowed via CORS. | ||
* `allowed_methods` - The methods to be allowed via CORS. | ||
* `max_age_in_seconds` - The max age to be allowed via CORS. | ||
* `allow_credentials` - If credentials are allowed via CORS. |
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.
Could we make these the same as the resource?
* `authentication_configuration` - An `authentication_configuration` block as defined below.
...
---
An `authentication_configuration` exports the following:
* `audience` - The audience that receives authentication tokens for the service.
* `authority` - The Azure Active Directory (tenant) that serves as the authentication authority to access the service.
* `smart_proxy_enabled` - (Boolean) If the 'SMART on FHIR' option is enabled for mobile and web implementations.
...
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.
Done
) | ||
|
||
func TestAccAzureRMHealthcareService_basic(t *testing.T) { | ||
ri := acctest.RandIntRange(10000, 99999) |
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.
Could we use the standard tf.AccRandTimeInt
here? if need /10 or /100 for it to fit
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.
Done
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.
For this and the data source test, we switched to tf. AccRandTimeInt / 10
and changed the prefix to testacc
for a format of testacc19102406571368976
, as suggested. Hopefully this will be random enough to be unique and still be 24 chars.
|
||
func TestAccAzureRMDataSourceHealthcareService(t *testing.T) { | ||
dataSourceName := "data.azurerm_healthcare_service.test" | ||
ri := acctest.RandIntRange(10000, 99999) |
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 is still a concern
Hi @katbyte, I've made the requested changes. Please take a look and let me know you think. Thank you. |
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.
Thanks for the updates @kutsovmqs! Aside from a few minor changes to the docs which i just pushed this LGTM 👍
This has been released in version 1.36.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.36.0"
}
# ... other configuration ... |
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. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Fixes #3989