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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_ecs_container_definition
missing several properties from the specification
#25794
Comments
Are there any workarounds on this one? For example, how can I enable container health checks? |
The workaround I used was using the |
Hey @nhubbard 馃憢 Thank you for taking the time to raise this! I'm a bit unclear on what you're looking to accomplish, so wanted to follow up to try to gain a better understanding. Are you looking to read an existing container within ECS using the |
See my next comment. I've fundamentally misinterpreted the point of data sources. My mistake was assuming that all data sources work the same way as the AWS IAM policy documents, which just render the policy definition into JSON instead of querying the data. |
I might have misunderstood the purpose of data sources if I'm reading your comment correctly. I'm quite new to the use of data sources, so it makes sense why these properties might be missing. However, I still think that it should be possible to query for Additionally, I'm curious as to whether you can create a container definition like a resource, in the same vein as |
No, that's not possible right now. The container definitions are contained within the
Given that data sources are used to query existing resources in AWS, coupled with the fact that container definitions don't exist outside of task definitions I suspect that may be the case. I say that, because it looks like from your original report, you're trying to create a task definition containing a container definition that is coming from an existing task definition resource. At that point, you can probably cut out the round trip by removing the data source. It may be that what you wanted to do, instead, is specify the container definition outside of Terraform (because mixing HCL and JSON can definitely get gnarly). If that's the case, you may want to write the container definition in a plain JSON file and read the contents of that in using the
Looking at the code, this should be possible, but I'm not sure there's a reasonable use case for it given the above? i.e. under what circumstances would you have the name of a |
Hello
|
Community Note
Description
I'm trying to create a container definition using a data definition with the
aws_ecs_container_definition
data source, but it appears to be missing several properties from the Container definition specification.Note: I'm not trying to use all of these properties together, but this is just a list of all of the missing properties that I found by comparing the
aws_ecs_container_definition
data source to the container definition spec.Here's a complete list of all of the missing properties that I found:
portMappings
healthCheck
gpu
essential
entryPoint
command
workingDirectory
environmentFiles
secrets
links
dnsServers
dnsSearchDomains
extraHosts
hostname
ipAddress
readonlyRootFilesystem
mountPoints
volumesFrom
logConfiguration
firelensConfiguration
privileged
user
dockerSecurityOptions
ulimits
linuxParameters
dependsOn
startTimeout
stopTimeout
systemControls
interactive
pseudoTerminal
New or Affected Resource(s)
aws_ecs_container_definition
Potential Terraform Configuration
Workaround
Use the
jsonencode
function or a JSON-encoded heredoc string to supply the extra arguments to theaws_ecs_task_definition
resource:References
The text was updated successfully, but these errors were encountered: