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

exposing internet & microsoft routing endpoints and hostnames #23517

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 202 additions & 2 deletions internal/services/storage/storage_account_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"primary_blob_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_blob_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_blob_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_blob_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_blob_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -132,6 +152,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"secondary_blob_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_blob_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_blob_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_blob_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_queue_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -142,6 +182,16 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"primary_queue_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_queue_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_queue_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -152,6 +202,16 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"secondary_queue_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_queue_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_table_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -162,6 +222,16 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"primary_table_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_table_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_table_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -172,6 +242,16 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"secondary_table_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_table_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_web_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -182,6 +262,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"primary_web_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_web_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_web_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_web_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_web_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -192,6 +292,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"secondary_web_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_web_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_web_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_web_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_dfs_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -202,6 +322,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"primary_dfs_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_dfs_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_dfs_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_dfs_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_dfs_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -212,6 +352,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"secondary_dfs_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_dfs_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_dfs_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_dfs_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_file_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -222,6 +382,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"primary_file_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_file_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_file_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_file_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_file_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
Expand All @@ -232,6 +412,26 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
Computed: true,
},

"secondary_file_internet_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_file_internet_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_file_microsoft_host": {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_file_microsoft_endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"primary_access_key": {
Type: pluginsdk.TypeString,
Computed: true,
Expand Down Expand Up @@ -417,7 +617,7 @@ func dataSourceStorageAccountRead(d *pluginsdk.ResourceData, meta interface{}) e
}
}

if err := flattenAndSetAzureRmStorageAccountPrimaryEndpoints(d, props.PrimaryEndpoints); err != nil {
if err := flattenAndSetAzureRmStorageAccountPrimaryEndpoints(d, props.PrimaryEndpoints, resp.RoutingPreference); err != nil {
return fmt.Errorf("setting primary endpoints and hosts for blob, queue, table and file: %+v", err)
}

Expand All @@ -429,7 +629,7 @@ func dataSourceStorageAccountRead(d *pluginsdk.ResourceData, meta interface{}) e
d.Set("primary_blob_connection_string", primaryBlobConnectStr)
}

if err := flattenAndSetAzureRmStorageAccountSecondaryEndpoints(d, props.SecondaryEndpoints); err != nil {
if err := flattenAndSetAzureRmStorageAccountSecondaryEndpoints(d, props.SecondaryEndpoints, resp.RoutingPreference); err != nil {
return fmt.Errorf("setting secondary endpoints and hosts for blob, queue, table: %+v", err)
}

Expand Down
Loading
Loading